Is IntPtr.Zero equivalent to null?

后端 未结 3 1639
鱼传尺愫
鱼传尺愫 2020-12-05 09:41

I am trying to setup ReadFile to run asynchronously and according to MSDN, I need to set lpNumberOfBytesRead to null:

3条回答
  •  再見小時候
    2020-12-05 10:07

    For P/Invoke purposes like you've listed, you should use IntPtr.Zero in place of NULL. Note that this is not equivalent to the C# null keyword, however.

提交回复
热议问题