DELPHI中该怎样调用DLL中的函数
编号:QA004260
建立日期: 2001年6月20日 最后修改日期:2001年6月20日
所属类别:
robin:
操作系统: win98
编程工具: delphi5.0 bc++
问题: 问题:
请问在BC++中这样的两个函数在DELPHI中该怎样调用?
#define DLLEXPORT __declspec(dllexport)
//初始化图形参数
DLLEXPORT void APIENTRY EW_GetImagePara(short *iImageWidth,short *iImageHeight)
//采集图形信息
DLLEXPORT void APIENTRY EW_GetDeviceImage(unsigned char *pImage)
#endif
希望能给出代码,谢谢了。
水平: 刚入门
回答:
你这两个函数都有APIENTRY,说明是stdcall的。
Procedure EW_GetImagePara(var iImageWidth: word; var iImageHeight:word); stdcall; external 'your.dll';
由于是指针,所以这里使用var进行定义。当然你也可以使用Delphi的指针类型。
相关问题:
QA004250 "如何在Delphi中调用DLL中没有名字的函数"
此问题由李海回答。
| |
|
|
| |
|
|