The information in this article applies to:
SUMMARY
A DDEML client application can use the XTYP_EXECUTE transaction to
cause a server to execute a command or a series of commands. To do
this, the client creates a buffer that contains the command string,
and passes either a pointer to this buffer or a data handle
identifying the buffer, to the DdeClientTransaction() call.
MORE INFORMATION
For an XTYP_EXECUTE transaction, the DdeClientTransaction() function
returns TRUE to indicate success, or FALSE to indicate failure. In
most cases, this provides inadequate information to the client
regarding the actual result of the XTYP_EXECUTE command.
Method 1The client can issue an XTYP_REQUEST transaction (with the item name set to "ExecuteResult", for example) immediately after its XTYP_EXECUTE transaction call returns successfully. The server can then return a data handle in response to this request, out of the data generated from executing the command. Method 2The client can establish an ADVISE loop with the server (with topic!item name appropriately set to Execute!Result, for example) just before issuing the XTYP_EXECUTE transaction. As soon as the server then executes the command, it can immediately update the advise link by calling DdePostAdvise(), and return a data handle out of the data generated from executing the command. The client then receives the data handle in its callback function, as an XTYP_ADVDATA transaction. Note that these workarounds apply only if one has access to the server application's code. Third-party server applications that provide no means to modify their code as described above can't obtain any data generated by the application as a result of an XTYP_EXECUTE back to the client. Additional query words: 3.10 3.50 4.00
Keywords : |
Last Reviewed: September 21, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |