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.
Platform:
- Windows Server 2016, 64 bit
- Microsoft Access 365 32 bit
- SAP GUI 7.40 patch level 13 front end tools application - SAP NetWeaver v7400.3.13.1130 - build 1756678 - patch level 13
- Librfc32.dll is part of the SAP 7.40 GUI front end tools application
Notes:
- We can't upgrade to SAP GUI 7.5 or later because it is used by other applications on the same machine
- The MSAccess application is just upgraded from MSAccess 2010
- The MSAccess application does not have any dependencies set for SAP DLLs or OCX files
- Librfc32.dll depends on these other DLLs base on "dumpbin.exe /dependents librfc32.dll". Dumpbin.exe is part of Visual Studio 2019. Visual Studio 2019 is not installed on the machine having the cannot load DLL error.
- Librfc32.dll dependencies - All of them are in C:\Windows\SysWow64. ole32.dll, RPCRT4.dll, OLEAUT32.dll, KERNEL32.dll, ADVAPI32.dll, USER32.dll, WS2_32.dll, IPHLPAPI.DLL, NETAPI32.dll, SHELL32.dll, dbghelp.dll, VERSION.dll, MSVCR110.dll
What we have tried so far and all gave the same cannot load DLL error:
- Trial 1 - Run MSAccess application before SAP GUI 7.40 is installed
- Trial 2 - Install SAP GUI 7.40
- Trial 3 - In MSAccess application, add reference to C:\Windows\SysWow64\librfc32.dll
- Trial 4 - Register librfd32.dll using "regsvr32 librfc32.dll"
- Trial 5 - In MSAccess application, add references to the following DLLs from the SAP GUI application. This is from a similar Access 2010 SAP GUI 7.20 question from 2009 here
and all of the DLLs exist on the machine having the error: https://answers.sap.com/questions/6537228/access-calls-sap-rfc-function-modules.html
- regsvr32 c:\program files (x86)\sap\frontend\sapgui\wdobapi.ocx
- regsvr32 c:\program files (x86)\common files\sap shared\wdtlog.ocx
- regsvr32 c:\windows\SysWOW64\librfc32.dll
- regsvr32 c:\program files (x86)\sap\frontend\sapgui\wdtaocx.ocx
- regsvr32 c:\program files (x86)\sap\frontend\sapgui\wdtfuncs.ocx
- Trial 6 - Examine the Windows event logs. Run the MSAccess application and produce the error message. Examine the Windows event logs again. No messages were found related to this error
- Trial 7 - Copy librfc32.dll and librfc32u.dll to the Microsoft Office executable directory where MSAccess.exe is located
- Trial 8 - Add C:\Windows\SysWow64 to PATH environment variable did not work. Start DOS, "SET PATH=%PATH%;C:\Windows\SysWow65; and then run MSAccess from the DOS command line
- Trial 9 - Verified that msvcr110.dll, msvcp110.dll, MFC*.dll are in C:\Windows\SysWow64. Dumpbin.exe shows v110 of these DLLs as needed by librfc32.dll. This was referenced by https://answers.sap.com/questions/3505999/librfc32dll-not-found-on-windows-server-2003.html
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
https://docs.oracle.com/cd/E28280_01/doc.1111/e16597/app_librfc.htm#SAPBW222
https://pocketprograms.com/kb/when-i-connect-to-sap-i-get-the-error-librc32-dll-not-found/
https://www.google.com/search?source=hp&ei=83KQX6iiAoXYsAW5-p64DQ&q=librfc32.dll&oq=librfc32.dll&gs_lcp=CgZwc3ktYWIQAzIFCAAQyQMyAggAMgIIADICCAAyBAgAEB4yBAgAEB4yBAgAEB4yBAgAEB4yBAgAEB4yBAgAEB46DgguELEDEMcBEKMCEJMCOgUIABCxAzoICC4QxwEQowI6BQguELEDOgsILhCxAxDHARCjAjoICC4QsQMQgwE6AgguOggIABCxAxDJAzoFCAAQkgM6CAgAELEDEIMBOgQIABAKOgoIABCxAxDJAxAKOgcIABCxAxAKOgoIABCxAxCDARAKUE1Y5Bxgih9oAHAAeACAAbYBiAGCCJIBBDExLjGYAQCgAQGqAQdnd3Mtd2l6&sclient=psy- ab&ved=0ahUKEwjo5_PvncbsAhUFLKwKHTm9B9cQ4dUDCAg&uact=5
Sap Logon Control - SAP Q&A - https://answers.sap.com/questions/13152769/sap-logon-control-2.html
https://answers.sap.com/questions/913490/librfc32dll.html?childToView=915447#comment-915447
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
(and I think that it's not part of SAP GUI but part of SAP RFC SDK/maybe there's an option to install it with SAP GUI though). I usewdtfuncs.ocx
of SAP GUI, it is sufficient to do RFC calls to SAP ABAP server. – Sandra Rossilibrfc32.dll
are no more supported by SAP. – Sandra Rossi