Stupid question. I thi开发者_JAVA百科nk 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.
If the API argument is a LONG (and not, say, an LPVOID), try passing the zero long integer literal 0&.
Often this would be a null pointer and not a null value.
Then it depends on the Declare syntax actually used. If the declared argument was a ByRef ... As ... item then you'd say ByVal 0& (or sometimes vbNullString) in your call.
However if you declared pointers as ByVal ... As Long in the declaration (for use with VarPtr(), StrPtr(), etc.) simply using 0& in the call is what you want.
加载中,请稍侯......
精彩评论