I have resubmitted this patch for discussion purposes.
Patch "user32/tests: Clarify the msgs to differentiate Unicode and ASCII in tests" cleans up existing tests for this situation and demonstrates the functionality.
The problem remains that the application passes to the dde/ddeml data that is of type LPBYTE. This can occur as a message post or a DDEML call. DDE operates in two ways.
* The first is the native DDE using POST and GET messaging. In this case data is passed without translation. * The second case uses DDEML. When using DDEML, the data is translated to and from Unicode depending on the server client window type. * However, there is a third case, the hybrid. In this case if the client uses messaging and posts a message, and the server uses DDEML translation will occur. If the client uses DDEML and the server uses a get to retrieve the message translation will not occur.
The data passed to DDE/DDEML is LPBYTE but it can be Unicode or ASCII regardless of the interface type of the client. In all cases the data is translated into the type of the server.
The issue is that the client passes data using messaging or DDEML there is no method in the api to inform the server whether the data is Unicode or not. The only method I have determined is to use IsTextUnicode() but that is guessing. However, it looks like Windows guesses too.
Can I get some advice on this as the existing code does need to be fixed.
Jeff