DLL调用,实时错误“49”:DLL调用约定错误

tongfeng1981 2010-11-28 11:07:42
小弟做一个摄像头控制程序,需要调用摄像头厂家给的DLL,厂家给的VC.NET函数声明如下:
extern "C"
{

//how to enumerate multi-device, and select one to handle.
//first enumerate devices that are connecting to the PC(call GetVMCUVCDevCount()s).
//if you would like to print the device name string (call GetDevFriendlyNameByIndex())
//second, attach the special device you like.(using AttachUVCDeviceByIndex() function)
//end, detach all device(using DetachUVCDeviceALL())
DECLDIR ULONG GetVMCUVCDevCount();
DECLDIR ULONG GetDevFriendlyNameByIndex(ULONG iIndex,TCHAR *DevName, ULONG DevNamesize);
DECLDIR BOOL AttachUVCDeviceByIndex(ULONG iIndex);
DECLDIR VOID DetachUVCDeviceALL();

//TRUE for a successful call, FALSE for any error.
//1 for Pressing the Snapshot key, 0 for no operation.
DECLDIR BOOL GetSnapShotStatus(BYTE *SnapShotbStatus);
}
我在VB中声明如下:
Private Declare Function GetSnapShotStatus Lib "UVCXUControl.dll" (ByRef Parm As Long) As Boolean
Private Declare Function GetVMCUVCDevCount Lib "UVCXUControl.dll" () As Long
Private Declare Function AttachUVCDeviceByIndex Lib "UVCXUControl.dll" (ByVal iIndex As Long) As Boolean
Private Declare Sub DetachUVCDeviceALL Lib "UVCXUControl.dll" ()
其中GetVMCUVCDevCount 可用,调用GetSnapShotStatus 时一直提醒实时错误“49”:DLL调用约定错误,
望高人帮忙解决!
谢谢
...全文
153 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
dbcontrols 2010-11-28
  • 打赏
  • 举报
回复

7,763

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧