How to convert INT into DWORD return code from GetExitCodeProcess [C#]
<p>I am usisng GetExitCodeProcess(processInfo.hProcess, out returnCode) as a p/invoke in C# to get the turn code of a process I started using CreateProcess - everything works fine ...</p>

<p>This is the code:</p>

<pre><code>UInt32 returnCode = 0xFFFFFFFF;     // default
GetExitCodeProcess(processInfo.hProcess, out returnCode);
</code></pre>

<p>The issue is the return code itself ... the application I am launching returns codes in DWORD, for example it returns 0XB2100000 but returnCode has 2987393024 (which is the correct INT conversion).</p>

<p>Now,  I would like to show (log to my trace file) the value in DWORD (that is what we are used to) - anyway I can do this?</p>

<p>Thanks,</p>
