how can I create dmp files when a program crash in release build? I think I should trigger the exceptions but I don't know how
On Windows you can use the Debug Helper API to write a minidump file to any location you choose. This file does not need to be sent to Microsoft.
http://msdn.microsoft.com/en-us/library/ms680369(v=vs.85).aspx
As others have mentioned, the dump file will be useless without PDB files from the correct build. You may want to consider using Microsoft's symbol server to index and manage the PDB files.
You may also want to use Breakpad to report client errors directly to you: