Debug a bad DLL calling convention

前端 未结 6 869
轻奢々
轻奢々 2020-12-09 10:20

How do I debug a bad DLL calling convention error in MSAccess VBA code?

I made some changes to a function in a module and then got the error. How do a debug it to fi

6条回答
  •  情歌与酒
    2020-12-09 10:28

    I experienced and worked around this error using the .NET library for WinSCP from MS Access VBA.

    What happened was:

    1. A function UploadSomething for connecting to an SFTP server and uploading a file worked fine.
    2. Within the function UploadSomething changed the "resume support" option with this code: myTransferOptions.ResumeSupport.State = TransferResumeSupportState.TransferResumeSupportState_Off

    After the change, the code worked as desired. However in the code that called UploadSomething, Error 49 was thrown after the function had finished.

    The error happened both when stepping through the code using the debugger and when executing at once outside of the debugger. Recompiling the project didn't work for me.

    What did work was this:

    1. Remove the reference to the COM component
    2. Add the reference to the COM component
    3. Recompile

提交回复
热议问题