Search code examples
vb6windows-api-code-pack

What is a Null value for a Long variable type in a Windows API call?


Stupid question. I think this should be 0, but I can't seem to find it.

So, if I want to pass a Null value to a Windows API call (this happens to be in VB6), what value would I use? I think 0, but I guess it could be VBNull.


Solution

  • If the API argument is a LONG (and not, say, an LPVOID), try passing the zero long integer literal 0&.