Stefan Leichter Stefan.Leichter@camline.com writes:
+#define MAP_STR(str) \
- do { \
if (configW->str) \{ \DWORD sz = WideCharToMultiByte( CP_ACP, 0, configW->str, -1, p, n, NULL, NULL ); \if (!sz) { \FIXME("WideCharToMultiByte failed for configW->%s\n", #str ); \ret = FALSE; \goto cleanup; \} \configA->str = p; \p += sz; \n -= sz; \} \else configA->str = NULL; \- } while (0)
- switch(dwLevel) {
case SERVICE_CONFIG_DESCRIPTION:{ LPSERVICE_DESCRIPTIONA configA = (LPSERVICE_DESCRIPTIONA) buffer;LPSERVICE_DESCRIPTIONW configW = (LPSERVICE_DESCRIPTIONW) bufferW;p = (LPSTR)(configA + 1);n = size - sizeof(SERVICE_DESCRIPTIONA);MAP_STR(lpDescription);}
That's ugly, please get rid of that macro.