|
86 | 86 | <remarks>
|
87 | 87 | <format type="text/markdown"><]
|
2162 | 2158 |
|
2163 | 2159 | > [!NOTE]
|
2164 |
| -> Although <xref:System.IntPtr.Zero> is equivalent to `null` for Windows API functions with parameters or return values that can be either pointers or `null`, <xref:System.IntPtr.Zero> is not equivalent to `null`. Passing `null` to the `IntPtr.Zero.Equals` method always returns `false`. |
| 2160 | +> Although <xref:System.IntPtr.Zero> is equivalent to `null` for Windows API functions with parameters or return values that can be either pointers or `null`, <xref:System.IntPtr.Zero> is not equivalent to `null`. Passing `null` to the `IntPtr.Zero.Equals` method always returns `false`. |
2165 | 2161 |
|
2166 | 2162 | You can also test for a `null` return value from Windows API function calls that return either a pointer or a `null` by comparing the returned value with <xref:System.IntPtr.Zero?displayProperty=nameWithType>. For example, the call to the `GetWindow` function in the following example tries to retrieve the handle of a non-existent window. If it were called from unmanaged code, the function would return `null`, but when it is called from managed code, it returns <xref:System.IntPtr.Zero?displayProperty=nameWithType>.
|
2167 | 2163 |
|
|
0 commit comments