Advanced PowerBuilder

HomePrevious Lesson: PowerBuilder As a DDE Server
Next Lesson: The RemoteSend Event

The RemoteExec Event

When PowerBuilder receives a request from a client, a RemoteExec event occurs. We use this event to determine which client has sent the commands:
// Object: w_dde_server
// Event: Remoteexec
String lApplication
int lRetVal
lRetVal = GetCommandDDEOrigin( lApplication )
If lRetVal = 1 then
   RespondRemote( TRUE )
End if

The GetCommandDDEOrigin() function determines the client, and if it is successful, we set RespondRemote to TRUE. In this example, we aren't doing any checks for the application name. Add an IF statement to check it.
HomePrevious Lesson: PowerBuilder As a DDE Server
Next Lesson: The RemoteSend Event