RfcOpen 
The following function opens an RFC connection
RFC_HANDLE SAP_API RfcOpen(RFC_OPTIONS * options)
according to the given options and returns a handle for the connection established. The structure RFC_OPTIONS contains the data needed to open the connection:
Syntax
typedef struct
{char * destination;
RFC_MODE mode;
void * connopt;
char * client;
char * user;
char * password;
char * language;
int trace;
}
RFC_OPTIONS;
This function is defined in SAPRFC.H.
Returns a handle to the RFC connection (RFC_HANDLE) or RFC_HANDLE_NULL if the connection cannot be opened.
options
connection parameters as described at structure RFC_OPTIONS.
Note
If you call RfcOpen with an invalid password, the function does not immediately fail. However, the subsequent call to RfcCall (or RfcCallReceive) will fail.
See also RfcOpenExt and RfcOpenExtV3.