c# - Difference between SafeProcessHandle and IntPtr for an API call -


While working with WinAPI, I decided to implement a call in my C # application. However, I have seen two different signatures for this function. [DllImport ("kernel32.dll", Charset = CharSet.Auto, SetLastError =

true)] Public stable extern bool GetProcessAffinityMask (Secure Procedure Handle Handle, Out IntPtr Process Mask, IntPtr System Mask Out); Other possible versions () IntPtr :

  [Using DllImport ("kernel32.dll", SetLastError = true) Does] static externor bulgate processAfinantmask (intruder hprosis, outside UIintPtr lpProcessAffinityMask, UIintPtr lpSystemAffinityMask out);  

Given that the two functions return the same value, what is the difference between passing the safe proxy thread code? Example or IntPtr ?

Describing this difference.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -