如何从VB中的XLDownload.dll调用此函数?
DWORD __stdcall QueryTaskInfo(LONG lTaskId, LONG *plStatus, ULONGLONG *pullFileSize, ULONGLONG *pullRecvSize);
我尝试使用ByRef ULong和ByVal IntPtr来调用但不起作用。它们都会导致PInvokeStackImbalance错误。
答案 0 :(得分:1)
<DllImport("XLDownload.dll", CharSet := CharSet.Auto, SetLastError := True, BestFitMapping := False, CallingConvention := CallingConvention.StdCall)> _
Private Shared Function QueryTaskInfo(lTaskId As UInt32, ByRef plStatus As UInt32, ByRef pullFileSize As UInt64, ByRef pullRecvSize As UInt64) As UInt32
End Function