02-22-2013 5:37 PM
Hi,
does anyone know, if there is a RFC Library (sapnwrfc.dll) out there newer than
"SAP NetWeaver RFC SDK 7.20, Patchlevel 8"?
The 7.20 version of sapnwrfc.dll seems to be compiled with VS 2005 using MSVCR80.DLL.
I'd like to get in touch with someone who could tell whether this version is compatible with
VS 2008's MSVCR90.DLL in regard to heap allocations. It would even help if someone
suggested a good place to ask such questions. Thanks in advance.
Regards,
Chris
03-29-2013 5:27 PM
Hello Chris,
the actual version is patch level 15 - major version 7200, minor version 0 and patch level 15 - from 16.02.2013.
This version of sapnwrfc.dll necessarily needs MSVCR80.dll, the Microsoft Visual C++ Runtime 2005.
I don't know a way around.
Cheers
Stefan
03-29-2013 5:27 PM
Hello Chris,
the actual version is patch level 15 - major version 7200, minor version 0 and patch level 15 - from 16.02.2013.
This version of sapnwrfc.dll necessarily needs MSVCR80.dll, the Microsoft Visual C++ Runtime 2005.
I don't know a way around.
Cheers
Stefan
12-10-2015 2:18 PM
Hello Chris,
the current 7.20 release (no matter which patch level) is compiled with VS 2005 SP1 and consequently requires msvcr80.dll, version "8.0.50727.4053" (described in SAP note 1375494).
However, it is possible to use the sapnwrfc.dll in Visual Studio 2008, 2010 and 2013 projects without problems. The Windows OS is able to load multiple different versions of the MS C/C++ runtime into the same process, if the executable and the dependent DLLs require them.
But be careful: the libsapucum.dll (also contained in the NW RFC SDK) is not backward compatible to newer Visual Studio releases! Fortunately, on Windows libsapucum.dll is not necessary: instead of the "U-functions" from sapuc.h (like printfU) you can use the standard Microsoft wide-character functions from wchar.h (like wprintf). This is because on Windows the datatype "SAP_UC" is just a typedef to wchar_t.
Best Regards, Ulrich
01-19-2016 5:06 PM
Some of the standard methods such as RfcSetChars and RfcGetTable use parameters of type SAP_UC. Is it possible to call these methods without libsapucum.dll?
01-20-2016 8:48 AM
01-20-2016 9:02 AM
Right now, Windows. Eventually we need to support more platforms but the immediate concern is getting a Windows proof of concept working.
01-20-2016 11:28 AM
On Windows, SAP_UC is equivalent to wchar_t, so you can replace the functions from sapuc.h/libsapucum.dll with the corresponding standard Microsoft functions from wchar.h.
E.g. printfU() --> wprintf(), getcU() --> _getws(), etc. (In fact, on Windows you even have to use this alternative, if using a Visual Studio release newer than 2005... This is also mentioned at the end of note 1056696. See also my answer a few comments further up... )
01-20-2016 11:35 AM
Understood and thanks, but what do we do about the methods, e.g. RfcGetString, that use SAP_UC as input parameters?
01-20-2016 11:46 AM
Nothing...
I just checked: on Windows, sapnwrfc.h already pulls in <wchar.h> and has a "typedef wchar_t SAP_UC" somewhere in its interiors. So just pass parameters of type wchar_t[] to these functions.
01-20-2016 12:56 PM
Ah, OK that makes sense! Really appreciate your help here Ulrich, thanks!