LPCTSTR lpszString = T2A((LPTSTR)(LPCTSTR) strString );
HDDEDATA hData1 = DdeCreateDataHandle( m_dwID,
(unsigned char*)lpszString,
(_tcslen( lpszString
)+1)*sizeof(TCHAR), 0L, 0L, 0, 0 );
HDDEDATA hData2 = DdeClientTransaction( (LPBYTE)hData1, .......);
Now with _UNICODE defined, the above stopped working.
Is there anything I miss?
TIA.
There are no different version for DdeCreateDataHandle in Unicode and
MBCS! The data handle you create just depends on the clipboardformat you
choose and transfer.
Your way to transmit the data should not change.
Strange to me is that you use the clipboard format 0. From my point of
view this is an error!
Either use CF_TEXT and store the data in MBCS or use CF_UNICODETEXT.
--
Martin Richter [MVP] WWJD
"In C we had to code our own bugs. In C++ we can inherit them."
FAQ : http://www.mpdvc.de
Samples: http://www.codeguru.com http://www.codeproject.com