高手请教啊!!!
如何将DLL中引用函数(C语言格式)转为VB定义格式?
例如:
typedef struct _DRIVER_INFO_OK
{
char ModalNumber[40];
char SerialNumber[20];
char ControlNum[8];
DWORD DriveType;
DWORD Cylinders;
DWORD Heads;
DWORD Sectors;
} DRIVER_INFO_OK, *PDRIVE_INFO_OK;int ReadPhysicalDriveInNT(const int idrive,PDRIVE_INFO_OK buf,int buflen)
其中,buf变量是指针.上面的定义在VB中如何引用啊!!!
如何将DLL中引用函数(C语言格式)转为VB定义格式?
例如:
typedef struct _DRIVER_INFO_OK
{
char ModalNumber[40];
char SerialNumber[20];
char ControlNum[8];
DWORD DriveType;
DWORD Cylinders;
DWORD Heads;
DWORD Sectors;
} DRIVER_INFO_OK, *PDRIVE_INFO_OK;int ReadPhysicalDriveInNT(const int idrive,PDRIVE_INFO_OK buf,int buflen)
其中,buf变量是指针.上面的定义在VB中如何引用啊!!!
解决方案 »
- 疑难问题答疑!请高手帮忙!谢谢!万分感谢!
- 高手们,帮忙看看,这个问题很棘手!!!
- 哪位能给推荐一个支持VB的UML建模工具啊,要求体积要小,实用!
- 有一个sql语句运行时一直有问题,别的地方都查过了,肯定是句子的问题,请帮忙看看!谢谢了,在线等待!
- 请问:vb中的设计器起什么作用?具体什么时候会用到设计器.
- 有谁知道用什么图书阅读器来打开后缀名为*.nlc,*.pdf的文件呢
- 请问如何判断一个路径下的文件夹是否存在?请看我的代码,提出意见
- 讨论一下:如果CSDN取消了每天的加分,会怎么样?
- 请教vb7调用函数的问题?
- command的结果给datagrid为何出错?
- MAC address
- 在VB里面怎么实现多线程?
是VC编的DLL , 如何转换啊???
ModalNumber(39) As Byte
SerialNumber(19) As Byte
ControlNum(7) As Byte
DriveType As Long
Cylinders As Long
Heads As Long
Sectors As Long
End TypePublic Declare ReadPhysicalDriveInNT Lib "xx.dll" (ByVal idrive As Long ,buf As DRIVE_INFO_OK,ByVal buflen As Long) As Long
DLL 与 VB 数据类型对应表
类型 C 语言中的声明 VB 中的声明
8 位数值参数 char chMyChar ByVal chMyChar As Byte
BYTE chMyByte ByVal chMyByte As Byte
16 位数值参数 short nMyShort ByVal nMyShort As Integer
WORD wMyWord ByVal wMyWord As Integer
32 位数值参数 int nMyInt ByVal nMyInt As Long
UINT wMyUint ByVal nMyUint As Long
BOOL bMyBool ByVal nMyBool As Long
DWORD dwMyDWord ByVal dwMyDWord As Long
LONG lMyLong ByVal lMyLong As Long
浮点数 float MyFloat ByVal MyFloat As Single
double MyDouble ByVal MyDouble As Double
变体 VARIANT MyVar ByVal MyVar As VARIANT
VARIANTARG MyVar ByVal MyVar As VARIANT
句柄 HWND hWnd ByVal hWnd As Long
HPEN hPen ByVal hPen As Long
HGLOBAL hglbl ByVal hglbl As Long--