Im looking for a way to generate minidump files in my applications simular to what ProcDump does but prefarably with code and not having to extract a 3dparty tool to do it.
You can call MiniDumpWriteDump from AppDomain.UnhandledException or Application.ThreadException event handler to create the minidump. This article explains the function in great details: Effective minidumps
You can also use this library which has other functionality too: Catch All Bugs with BugTrap!
Edit
Looks like getting a useful minidump is not that easy. First of all sos.dll complains when the dump is not full (full dumps are about 100-150MB). Secondly, writing dump in catch block is not recommended: Getting good dumps when an exception is thrown.
If you have a winforms application this question has some usefull info: How does SetUnhandledExceptionFilter work in .NET WinForms applications?