vb封装c++写的标准dll的参数问题

foxwangshuohan 2006-03-14 03:55:47
我有一个c++写的dll使用来从pos机读取数据的,现在我想在asp中用,所以想用vb封装成activex.dll共asp掉用.函数原型如下:
函数原型:int GetLog(char *sLogData);
入口参数:无
出口参数:无
返回值 :返回值 = 0 表示函数调用正确,否则表示错误。

int GetLog(char *sLogData);
sLogData : 读取第一条未采集的日志
日志的格式: 每条记录长度为48字节,具体格式说明如下:
0002002002-03-2007:55:04000102999900000100000852
000200 2002-03-20 07:55:04 0001 029999000001 00 000852
如果sLogData[0] ... sLogData[5] = “999999” 表示Pos机没有日志
vb中应该如何声明该函数?
望各位高手给与指点!!谢谢了!!
...全文
90 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
foxwangshuohan 2006-03-17
  • 打赏
  • 举报
回复
问题已经解决!!谢谢!!
还有个问题请教!
Function GetLog(cardid As Byte, carddate As Byte, cashmode As Byte, cashmoney As Byte, cashtype As Byte, cashtime As Byte) As Long
在asp中如何调用!!
goodloop 2006-03-17
  • 打赏
  • 举报
回复
MARK 以后我也会用到
51365133 2006-03-16
  • 打赏
  • 举报
回复
你把C++的调用发上来看看先
foxwangshuohan 2006-03-16
  • 打赏
  • 举报
回复
我测试了一下,如果有日志的话,却返不回值。望给予执教!谢谢!!
supergreenbean 2006-03-16
  • 打赏
  • 举报
回复
你确定 sLogData 是48字节长?对于函数GetLog的其他语言的调用例子你有么
supergreenbean 2006-03-15
  • 打赏
  • 举报
回复
declare function GetLog lib "xx.dll" (byval sLogData as string) as long

dim s as string*48
dim r as long
r=GetLog(s)
if left(s,6)="999999" then
'没有日志
else
'有日志
end if

1,453

社区成员

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

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