T
tanke
Unregistered / Unconfirmed
GUEST, unregistred user!
我现在有个DLL库(CP2101.DLL),只能知道DLL中的这么多东西。
Prototype: CP2101_STATUS CP2101_Open( DWORD DeviceNum, HANDLE* Handle )
Prototype: CP2101_STATUS CP2101_GetDevicePid( HANDLE Handle, LPWORD Pid )
Parameters: 1. Handle - Handle to the device to close as returned by CP2101_Open().
2. Pid - Pointer to a 2-byte value that returns the Product ID of the CP2101 device.
Return Value: CP2101_STATUS = CP2101_SUCCESS,
CP2101_INVALID_PARAMETER,
CP2101_INVALID_HANDLE,
CP2101_DEVICE_IO_FAILED
Type Definitions from C++ Header File CP2101.h
// GetProductString() function flags #define CP2101_RETURN_SERIAL_NUMBER 0x00 #define CP2101_RETURN_DESCRIPTION 0x01 #define CP2101_RETURN_FULL_PATH 0x02
// Return codes #define CP2101_SUCCESS 0x00 #define CP2101_DEVICE_NOT_FOUND 0xFF #define CP2101_INVALID_HANDLE 0x01 #define CP2101_INVALID_PARAMETER 0x02 #define CP2101_DEVICE_IO_FAILED 0x03
// Buffer size limits #define CP2101_MAX_DEVICE_STRLEN 256 #define CP2101_MAX_PRODUCT_STRLEN 126 #define CP2101_MAX_SERIAL_STRLEN 63 #define CP2101_MAX_MAXPOWER 250
// Type definitions typedef int CP2101_STATUS;
typedef char CP2101_DEVICE_STRING[CP2101_MAX_DEVICE_STRLEN];
typedef char CP2101_PRODUCT_STRING[CP2101_MAX_PRODUCT_STRLEN];
typedef char CP2101_SERIAL_STRING[CP2101_MAX_SERIAL_STRLEN];
本人是DELPHI新手,不知如何在DELPHI中调用,请教高手哦。请说明白点
Prototype: CP2101_STATUS CP2101_Open( DWORD DeviceNum, HANDLE* Handle )
Prototype: CP2101_STATUS CP2101_GetDevicePid( HANDLE Handle, LPWORD Pid )
Parameters: 1. Handle - Handle to the device to close as returned by CP2101_Open().
2. Pid - Pointer to a 2-byte value that returns the Product ID of the CP2101 device.
Return Value: CP2101_STATUS = CP2101_SUCCESS,
CP2101_INVALID_PARAMETER,
CP2101_INVALID_HANDLE,
CP2101_DEVICE_IO_FAILED
Type Definitions from C++ Header File CP2101.h
// GetProductString() function flags #define CP2101_RETURN_SERIAL_NUMBER 0x00 #define CP2101_RETURN_DESCRIPTION 0x01 #define CP2101_RETURN_FULL_PATH 0x02
// Return codes #define CP2101_SUCCESS 0x00 #define CP2101_DEVICE_NOT_FOUND 0xFF #define CP2101_INVALID_HANDLE 0x01 #define CP2101_INVALID_PARAMETER 0x02 #define CP2101_DEVICE_IO_FAILED 0x03
// Buffer size limits #define CP2101_MAX_DEVICE_STRLEN 256 #define CP2101_MAX_PRODUCT_STRLEN 126 #define CP2101_MAX_SERIAL_STRLEN 63 #define CP2101_MAX_MAXPOWER 250
// Type definitions typedef int CP2101_STATUS;
typedef char CP2101_DEVICE_STRING[CP2101_MAX_DEVICE_STRLEN];
typedef char CP2101_PRODUCT_STRING[CP2101_MAX_PRODUCT_STRLEN];
typedef char CP2101_SERIAL_STRING[CP2101_MAX_SERIAL_STRLEN];
本人是DELPHI新手,不知如何在DELPHI中调用,请教高手哦。请说明白点