如何在 VB 中从 XLDownload.dll 调用此函数?
DWORD __stdcall QueryTaskInfo(LONG lTaskId, LONG *plStatus, ULONGLONG *pullFileSize, ULONGLONG *pullRecvSize);
我尝试使用 ByRef ULong 和 ByVal IntPtr 来调用,但都不起作用。它们都导致 PInvokeStackImbalance 错误。
<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