on 11-25-2011 1:56 PM
Hello,
I just got the SAP NW RFC SDK from the marketplace (Windows Server IA32 32bit).
I created a new console application using Visual Studio 2010.
I added the include and lib folder from the extracted archive to the VC++ Directories (include and lib directory).
Then I added sapnwrfc.lib to the additional dependencies to linker->input.
I used the following code from the example:
#include "stdafx.h"
#include <sapnwrfc.h>
int _tmain(int argc, _TCHAR* argv[])
{
RFC_RC rc = RFC_OK;
RFC_ERROR_INFO error;
memsetR(&error, 0, sizeofR(RFC_ERROR_INFO));
RFC_CONNECTION_PARAMETER connParams[] = {
{cU("ashost"), cU("")},
{cU("sysnr"), cU("")},
{cU("client"), cU("")},
{cU("lang"), cU("") ? cU("") : cU("E")},
{cU("user"), cU("")},
{cU("passwd"), cU("")},
{cU("dest"), cU("") ? cU("") : cU("")}};
RFC_CONNECTION_HANDLE connHandle = RfcOpenConnection(connParams,
sizeofR(connParams) / sizeofR(RFC_CONNECTION_PARAMETER),
&error);
if(connHandle){
}
return 0;
}
So far the program compiles ok. I copied the .dll files to the debug folder and started the application. At the moment the method RfcOpenConnection is called I get the following message:
Unhandeled exception at 0x7c93a958 in SAPRFC.exe: 0xC0000005: Access violation while writing to position 0x00040ff8.
Can anybody help me what I did wrong? As far as I see there should be everything fine. Could it be that the SAP NW RFC SDK is incompatible with Visual Studio 2010 and the toolset v100?
Kind regards,
Michael
Edited by: Michael Belz on Nov 25, 2011 2:56 PM
Hi,
i've got the same problem..
have you solved it?
Edit:
There was someting wrong in my VS properties.
In this article on page 4 is a short and helpful list.
http://www.sdn.sap.com/irj/sdn/index?rid=/library/uuid/302f1a30-f4cb-2c10-e985-c8a280a96e43
Kind regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.