Results 1 to 2 of 2

Thread: Passing Control Codes (IOCTL) to DLLs from VB ?

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2001
    Location
    Los Angeles
    Posts
    1

    Passing Control Codes (IOCTL) to DLLs from VB ?

    Does anyone know if it is possible to pass IO Control Codes (IOCTL) to DLLs from VB ? I have come across the format of the codes in C++ documentation but I am not sure how to declare and pass them from VB. Hoping someone here as done it before and can advise. My email is [email protected]. Thanks in advance.

    Dan Spence

  2. #2
    jim mcnamara
    Guest
    You mean like 0x41 == semaphore... ?

    They are enumerations in C++ - that means the compiler puts them into the smallest possible datatype. If I remember these things correctly, they are all less than 0xFF - so they are unsigned char in C++, Byte in VB. Assuming I'm right use Byte datatypes.

    Watch out for C expecting pointers. like myDll(char *i) - this expects a pointer. You can pass them either way. but they have to match what C wants:

    (ByVal Iocode as Byte)
    (ByRef Iocode as Byte)

    Be sure to use hex codes to assign them in VB:
    Iocode = &H41, for example.

    That what you meant?

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