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: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.
Return Value:
Function Parameter:
connection parameters as described at structure RFC_OPTIONS.

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.