User Tools

Site Tools


ddeapp_return_server_application_.htm
Navigation:  Language Reference > App A - DDE, OLE, and OCX > DDE Procedures >====== DDEAPP (return server application) ====== Previous pageReturn to chapter overviewNext page

DDEAPP( )

blk2blue.jpg

The DDEAPP procedure returns a string containing the application name in the DDE channel that has just posted a DDE event. This is usually the same as the first parameter to the DDESERVER or DDECLIENT procedure when the DDE channel is established.

Return Data Type:     STRING

Example:

ClientApp STRING(20)

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

        STRING(@S20),AT(5,5,90,20),USE(ClientApp)

       END

TimeServer LONG

DateServer LONG

FormatTime STRING(5)

FormatDate STRING(8)

CODE

OPEN(WinOne)

TimeServer = DDESERVER('SomeApp','Time')    !Open as server

DateServer = DDESERVER('SomeApp','Date')    !Open as server

ACCEPT

 CASE EVENT()

 OF EVENT:DDErequest

  CASE DDECHANNEL()

  OF TimeServer

   ClientApp = DDEAPP()                     !Get client's name

   DISPLAY                                  !and display on screen

   FormatTime = FORMAT(CLOCK(),@T1)

   DDEWRITE(TimeServer,DDE:manual,'Time',FormatTime)

  OF DateServer

   ClientApp = DDEAPP()                     !Get client's name

   DISPLAY                                  !and display on screen

   FormatDate = FORMAT(TODAY(),@D1)

   DDEWRITE(DateServer,DDE:manual,'Date',FormatDate)

  END

 END

END

See Also:

DDECLIENT

DDESERVER

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