User Tools

Site Tools


ddeexecute_send_command_to_dde_server_.htm
Navigation:  Language Reference > App A - DDE, OLE, and OCX > DDE Procedures >====== DDEEXECUTE (send command to DDE server) ====== Previous pageReturn to chapter overviewNext page

DDEEXECUTE( channel, command )

blk2blue.jpg

DDEEXECUTE Sends a command string to an open DDE client channel.
channel A LONG integer constant or variable containing the client channel–the value returned by the DDECLIENT procedure.
command A string constant or variable containing the application-specific command for the server to execute.

The DDEEXECUTE procedure allows a DDE client program to communicate a command to the server. The command must be in a format the server application can recognize and act on. The server does not need to be a Clarion program. By convention, the entire command string is normally contained within square brackets ( [ ] ).

A Clarion DDE server can use the DDEVALUE() procedure to determine what command the client has sent.The CYCLE statement after an EVENT:DDEexecute signals positive acknowledgement to the client that sent the command. DDEACKNOWLEDGE can send either positive or negative acknowledgement.

Errors Posted:

601 Invalid DDE Channel
602 DDE Channel Not Open
603 DDEEXECUTE Failed
605 Time Out

Events Generated:

EVENT:DDEexecute     A client has sent a command.

Example:

 !The client application's code contains:

WinOne  WINDOW,AT(0,0,160,400)

       END

SomeServer LONG

DDEChannel LONG

CODE

OPEN(WinOne)

!Open a channel to Windows Program Manager:

DDEChannel = DDECLIENT('PROGMAN','PROGMAN')

!Create a new program group:

DDEEXECUTE(DDEChannel,'[CreateGroup(Clarion Applications)]')

!Display it:

DDEEXECUTE(DDEChannel,'[ShowGroup(1)]')

!Create new item in the group using second icon in progman.exe

DDEEXECUTE(DDEChannel,'[AddItem(MYAPP.EXE,My Program,PROGMAN.EXE,2)]')

See Also:

DDEACKNOWLEDGE

DDEVALUE

ddeexecute_send_command_to_dde_server_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1