Whenever a DDEML function fails, an application can call the DdeGetLastError function to determine the cause of the failure. The DdeGetLastError function returns an error value that specifies the cause of the most recent error.
For a list of possible error values for each DDEML function, see the individual function descriptions in the Microsoft Windows Programmer's Reference, Volume 2.