VB调用C++写的dll库后的问题!
引用一个dll
Dim telconnobj As New FAXCOMXLib.FaxClientX
Dim telnumobj As New FAXCOMXLib.SendTask
Dim telresultobj As New FAXCOMXLib.ResultTask
dim numOfTasks as long
ReDim starttime() as string
ReDim faxendtime()as string
ReDim sendjg()as string
ReDim sendid()as string
ReDim starttime(numOfTasks)as string
ReDim faxendtime(numOfTasks)as string
ReDim sendjg(numOfTasks)as string
ReDim sendid(numOfTasks)as string
telconnobj.PickResultTask mCid, telresultobj
'telresultobj是一个自定义结构,是dll函数库中的!
'telconnobj.PickResultTask mCid, telresultobj他是调用一个c++的dll函数!
for j=0 to numoftasks-1
MsgBox telresultobj.starttime'这是调完dll之后,返回的 telresultobj 这个结构中的!
MsgBox telresultobj.EndTime'这是调完dll之后,返回的 telresultobj 这个结构中的!
到这,,返回的两个时间是正确的!
starttime(j) = telresultobj.starttime
faxendtime(j) = telresultobj.EndTime
MsgBox starttime(j)
MsgBox faxendtime(j)
到这,,这两个时间就都变成telresultobj.starttime了!
next
原本代码中有很多代码,检查到最后,一一删除,就剩这些了,才发现是此问题,请高手帮下兄弟!
Dim telconnobj As New FAXCOMXLib.FaxClientX
Dim telnumobj As New FAXCOMXLib.SendTask
Dim telresultobj As New FAXCOMXLib.ResultTask
dim numOfTasks as long
ReDim starttime() as string
ReDim faxendtime()as string
ReDim sendjg()as string
ReDim sendid()as string
ReDim starttime(numOfTasks)as string
ReDim faxendtime(numOfTasks)as string
ReDim sendjg(numOfTasks)as string
ReDim sendid(numOfTasks)as string
telconnobj.PickResultTask mCid, telresultobj
'telresultobj是一个自定义结构,是dll函数库中的!
'telconnobj.PickResultTask mCid, telresultobj他是调用一个c++的dll函数!
for j=0 to numoftasks-1
MsgBox telresultobj.starttime'这是调完dll之后,返回的 telresultobj 这个结构中的!
MsgBox telresultobj.EndTime'这是调完dll之后,返回的 telresultobj 这个结构中的!
到这,,返回的两个时间是正确的!
starttime(j) = telresultobj.starttime
faxendtime(j) = telresultobj.EndTime
MsgBox starttime(j)
MsgBox faxendtime(j)
到这,,这两个时间就都变成telresultobj.starttime了!
next
原本代码中有很多代码,检查到最后,一一删除,就剩这些了,才发现是此问题,请高手帮下兄弟!
...全文
相关推荐
VS2010使用VB.NET调用C++的DLL例子
DLL是一种可执行文件,它包含可被其他应用程序或库使用的函数和资源。在C++中,我们可以通过导出函数来创建可供外部调用的接口。
C++调用vb6.0制作的Activex DLL
**调用DLL方法**:通过接口指针调用ActiveX DLL的方法。注意,由于VB6.0的函数参数传递方式与C++不同,可能需要进行适当的类型转换。
C写的DLL给C/C++和VB调用
"C写的DLL给C/C++和VB调用"本文将详细介绍如何使用C语言编写动态链接库(DLL),并将其用于C/C++和VB语言的调用。
c# / VB 调用refprop.dll
在C#或VB.NET中调用`refprop.dll`,你需要利用.NET Framework的P/Invoke(Platform Invoke)特性,它允许.NET代码调用非托管(如C或C++编写的)DLL
vb调用vc写的dll截获修改封包源代码
标题中的“vb调用vc写的dll截获修改封包源代码”涉及到的是计算机网络通信中的数据包捕获和修改技术,通常在网络安全分析、软件开发和调试等领域有广泛应用。


VB基础类
