Sends data between client and server applications in a dynamic data exchange (DDE) conversation.
DDEPoke(nChannelNumber, cItemName, cDataSent [, cDataFormat [, cUDFName]])
- Specifies the channel number of the application data is sent to. If the channel number is a server channel, DDEPoke(В ) sends the data in response to a request or a previously established notify or automatic link.
- Specifies the item name to which data is sent. The item name is application-specific and must be understood by the application. For example, Microsoft Excel supports R1C1 as a valid item name that refers to the first cell in a worksheet.
- Specifies the data sent to the item name specified with cItemName.
- Specifies the format used to send the data. The default format is CF_TEXT. In this format, fields are delimited with tabs and records are delimited with a carriage return and a linefeed.
Allows asynchronous data transfer. If cUDFName is omitted, a client waits for the period specified with DDESetOption(В ). If you specify the name of a user-defined function with cUDFName, client program execution continues immediately after the request is made.
When the data is available from the server application, the user-defined function specified with cUDFName is executed. The user-defined function is passed six parameters in this order:
Use DDEAbortTrans(В ) to cancel an uncompleted transaction. If the transaction fails, you can use DDELastError(В ) to determine why it failed. When you include cUDFName, DDEPoke(В ) returns a transaction number if successful or вЂ“1 if an error occurs.
The channel number of the server application.
XACTCOMPLETE (successful transaction).XACTFAIL (failed transaction).
The item name; for example, R1C1 for a Microsoft Excel worksheet cell.
The new data (REQUEST) or data passed (POKE or EXECUTED).
The data format; for example, CF_TEXT.
The transaction number returned by DDEPoke(В ).
DDEPoke(В ) sends data as a character string to the item name in the application specified by the channel number.
If the data is successfully sent, DDEPoke(В ) returns true (.T.). If the data cannot be sent, DDEPoke(В ) returns false (.F.). If the asynchronous user-defined function cUDFName is included, DDEPoke(В ) returns a transaction number; if an error occurs, DDEPoke(В ) returns вЂ“1.