Damjan Jovanovic wrote:
- guidStringWithBraces[0] = (WCHAR) '{';
- CopyMemory(&guidStringWithBraces[1], lpGuidString,
(MAX_GUID_STRING_LEN - 3)*sizeof(WCHAR));
- guidStringWithBraces[MAX_GUID_STRING_LEN - 2] = (WCHAR) '}';
- guidStringWithBraces[MAX_GUID_STRING_LEN - 1] = 0;
- RpcStringFreeW(&lpGuidString);
Just wondering, shouldn't that be something like
guidStringWithBraces[0] = (WCHAR) '{'; CopyMemory(&guidStringWithBraces[1], lpGuidString, (MAX_GUID_STRING_LEN - 3)*sizeof(WCHAR)); guidStringWithBraces[1 + strlenW(lpGuidString)] = (WCHAR) '}'; guidStringWithBraces[2 + strlenW(lpGuidString)] = 0; RpcStringFreeW(&lpGuidString);
HTH,
Joris