Results 1 to 6 of 6

Thread: NULL but in VB

  1. #1

    Thread Starter
    Member filburt1's Avatar
    Join Date
    Aug 1999
    Posts
    6,935

    NULL but in VB

    The documentation for some C++ API calls uses NULL for some arguments. Since Null in VB isn't the same as the NULL constant, what should I use to substitute it?

    VB Code:
    1. GetDC(NULL) = GetDC([i]what in VB?[/i])

  2. #2
    WorkHorse
    Guest
    Chr$(0)

    I can't think where that would not be read as Null.

  3. #3

    Thread Starter
    Member filburt1's Avatar
    Join Date
    Aug 1999
    Posts
    6,935
    Not a null character, but a null value (Long data type)

  4. #4
    WorkHorse
    Guest
    A Long can't be null. Try &H0.

  5. #5

    Thread Starter
    Member filburt1's Avatar
    Join Date
    Aug 1999
    Posts
    6,935
    Yeah, I think you're right about 0. *sigh* That's good and bad...

  6. #6
    WorkHorse
    Guest
    Seems manage window handles and device contexts fine. Usually pass &H0 in an API when you mean nothing.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width