How to fix librfc32.dll cannot be loaded error when calling from Microsoft Access 365?
I've tried the common troubleshooting steps found on the net as listed below and need help.
Note: This is a 25 year old complex large application and I cannot upgrade to a newer version than SAP GUI 7.40 as it is required for other applications. I cannot rewrite the web service call inside Access VBA as it is specifically excluded from my project. This is an Access 10 to Access 365 update project and has no time allocated for rewriting.
Note: This is a server machine and I cannot install DependencyWalker, Visual Studio or other diagnostic tools.
I get this error in Microsoft Access 365 when trying to send data to SAP using librfc32.dll:
Unable to load DLL 'librfc32.dll' The specified module could not be found.(Exception from HRESULT 0x8007007E)
The error is that librfc32.dll or one of the DLLs it depends on cannot be loaded.
What we have tried so far and all gave the same cannot load DLL error:
Related reference links to similar problems with librfc32.dll. Note that these are up to 15 years old and many of the suggestions are for out of date applications.
Access calls SAP-RFC-function modules – September 23, 2009 - https://answers.sap.com/questions/6537228/access-calls-sap-rfc-function-modules.html This is about registering DLLs and OCXs
Sap Logon Control - SAP Q&A - https://answers.sap.com/questions/13152769/sap-logon-control-2.html
I posted on StackOveflow after trying many many workarounds and reviewing over 50 web pages. I'd like to include some of the more close to this question links in this question but am limited with a too many links error.
librfc32.dll is the classic RFC library which was also part of the classic RFC SDK. It was also shipped with former SAP GUI releases and other products. But meanwhile the classic RFC library and the classic RFC SDK is out of maintenance and support at SAP. You won't get new releases or updates of this library anymore.
Which Visual C runtime libraries are required for this library depends on the SAP release which the librfc32.dll originates from and the bit width of the library (32-bit vs. 64-bit). Note that you always need the same bit width for all dynamically loaded libraries which must fit to the bit width of your main program that loads these libraries. So check if your MS Access executables are 32-bit or 64-bit programs.
Despite its name the librfc32.dll exists as 32-bit library and also as 64-bit library. In Windows directory SysWOW64 you will usually find 32-bit libraries whereas in directory system32 of a 64-bit Windows installation you will find the 64-bit libraries [Thank you Microsoft for that naming convention]. :)
Anyhow you do not need the librfc32u.dll which is the Unicode version of this library. You cannot use both in one process. Either your code is compiled for Unicode or it is not, and since you try to load librfc32.dll it seems to be compiled for a non-Unicode runtime.
User contributions licensed under CC BY-SA 3.0