Einzelnen Beitrag anzeigen

MrRobot

Registriert seit: 24. Jul 2008
1 Beiträge
 
Delphi 2007 Professional
 
#7

Re: Delphi App soll RFC Bausteine anbieten

  Alt 24. Jul 2008, 19:50
Ich habe das vor einiger Zeit mal mit den LIBRFC Funktionen gebaut und das Prinzip
geht über die RfcInstallFunction() Function. Damit kann man eigene Funktionen als RFC in der Delphi
Anwendung zur Verfügung stellen. Das sieht ungefähr so aus:

Delphi-Quellcode:
  

  rci := RfcInstallFunction('MEIN_FUNTIONSNAME', @MyFunctionToCall, 'Das Ist die Beschreibung');
  RfcInit();
  hndl := RfcAccept(@gateway[0]);

  repeat
     // Waiting for the next RFC request
     repeat
         rc := TRFC_RC(RfcListen( hndl ));
         if rc = RFC_RETRY then
           Sleep(100);

     until not (rc = RFC_RETRY);

     if not (rc = RFC_OK) then
         break;

    rc := TRFC_RC(RfcDispatch( hndl ));

  until not (rc = RFC_OK );
  Mit Zitat antworten Zitat