Whenever the DDE DLL encounters an error, it invokes a DDE_ERROR event. Note that if the error is discovered while processing an ESL response, the DDE_ERROR response is not invoked until the response that caused the error is completed. The DDE DLL also writes the text of the error message to the ESL errorlog. All of the functions that return strings return the string "DDE Error" when an error is encountered.
In an ESL program, you can always test the value of the built-in function errorlevel after calling a DDE subroutine. If an error is encountered, the DDE DLL returns the error ID. This is always a non-zero value, and can be turned into a string by calling DDEGetErrorString. After a successful subroutine call, errorlevel has a value of zero.
The following chart indicates the function calls that are allowed with specific stimuli. If you make a call that is not allowed, you will receive an error message.
Function Calls
Stimulus |
DDEGetFormat |
DDEGetItemName |
DDEGetStringData |
DDEGetStatus |
DDEGetPrivate Status |
NO |
NO |
NO |
NO |
NO |
|
YES |
YES |
NO |
NO |
NO |
|
NO |
YES |
NO |
YES |
YES |
|
NO |
YES |
NO |
YES |
YES |
|
YES |
YES |
YES |
YES |
NO |
|
YES |
YES |
NO |
YES |
NO |
|
YES |
YES |
NO |
NO |
NO |
|
YES |
YES |
YES |
YES |
NO |
|
NO |
NO |
YES |
NO |
NO |
|
NO |
NO |
NO |
NO |
NO |
|
NO |
NO |
NO |
NO |
NO |
|
NO |
NO |
NO |
NO |
NO |