How to Pass One-Byte Parameters from VB to DLL RoutinesID: Q71106
|
Calling some routines in dynamic link libraries (DLLs) requires BYTE parameters in the argument list. Visual Basic for Windows possesses no BYTE data type as defined in other languages such as C, which can create DLLs. To pass a BYTE value correctly to an external FUNCTION (in a DLL), which requires a BYTE data type, you must pass an integer data type for the BYTE parameter.
Visual BASIC for Windows has the ability to call external code in the
form of dynamic link libraries (DLLs). Some of these libraries require
BYTE parameters in the argument list. An example of this is located in
the KEYBOARD.DRV FUNCTION as defined below:
FUNCTION GetTempFileName (BYTE cDrive,
LPSTR lpPrefix,
WORD wUnique,
LPSTR lpTempFileName)
DECLARE FUNCTION GetTempFileName LIB "keyboard.drv"
(BYVAL A%, BYVAL B$, BYVAL C%, BYVAL D$)
Additional query words: 2.00 3.00
Keywords :
Version :
Platform :
Issue type :
Last Reviewed: June 24, 1999