* On Thu, 27 Oct 2005, Lionel Ulmer wrote:
You mean, if some day M$ changes ddraw.h so that szDescription type becomes WCHAR, right?
Well, the API is like this: HRESULT WINAPI DirectDrawEnumerateExW( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags);
With: typedef BOOL (CALLBACK *LPDDENUMCALLBACKEXW)(GUID *, LPWSTR, LPWSTR, LPVOID, HMONITOR);
But this doesn't say anything about a type of a string, based on which dll/ddraw code works (or should work).
The question now is wether it is guaranteed to have the string returned by 'DirectDrawEnumerateExW' be the same than the one returned by 'DDRAW->GetDeviceIdentifier()'.
Here I probably stopped following you. GetDeviceIdentifier() fills a struct named DDDEVICEIDENTIFIER2:
| typedef struct tagDDDEVICEIDENTIFIER2 { | char szDriver[MAX_DDDEVICEID_STRING]; /* user readable driver name */ | char szDescription[MAX_DDDEVICEID_STRING]; /* user readable description */ | LARGE_INTEGER liDriverVersion; /* driver version */
This way strings cannot be the same, as one is widechar (passed as LPWSTR to DDENUMCALLBACKEXW) while another is multibyte (defined as char in DDDEVICEIDENTIFIER2). I guess DX SDK headers may not be wrong here.