RfcWinInstallFunction

To call RfcWinInstallFunction, use the calling syntax:

RFC_RC SAP_API
RfcWinInstallFunction(RFC_HANDLE handle,
RFC_FUNCTIONNAME functionname,
RFC_ONCALL * f_ptr,
char * description);

To implement an RFC server, you must register every callable function with RFC. This allows the RfcDispatch routine to route RFC requests properly. To register callable functions when you are programming in the Windows operating system, use the RfcWinInstallFunction routine.

RFC provides both the RfcInstallFunction and RfcWinInstallFunction routines for registering callable functions. Windows programmers may only use RfcWinInstallFunction; all other programmers can use either routine. The only difference between them is that RfcWinInstallFunction requires a handle parameter.

This function is defined in SAPRFC.H.

Return Values:

  • RFC_OK
  • RFC_FAILURE

Function Parameters:

Function parameters:

  • handle

Rfc connection handle

  • functionname

name of the RFC function

  • f_ptr

function pointer

  • description

help text for the function

Once you have used and registered the function with RfcWinInstallFunction, you can use the RfcDispatch routine to execute RFC requests that come in.

The sample programs provide examples of how to use RfcInstallFunction, and you can use RfcWinInstallFunction in the same way. (In particular, the program rfcexec.c which is included in the RFC SDK implements an RFC server.)