winapi - C++ UUID to stl string -
Trying to convert to a string without promoting a UUID. I have the following, but string does not work to assign wszUuid to guid. Does anybody know how I can do this so that I can return a stale string?
string server :: GetNewGUID () {UUID UUID; :: zoramori (& amp; uuid, sizeof (UUID)); // Create UUID or load with string by UIIIDFramString () function :: UUIDCrite (and UUID); // If you want to convert uuid into a string, use the UuidToString () function WCHAR * wszUuid = NULL; :: UUITTostring (and uuid, (RPC_WSTR *) and wszUuid); If (wszUuid! = NULL) {: RPC stringfree (RPCCRTR) and YSSUUID); WszUuid = NULL; } String guide; Guid = wszUuid; // Error: No operator "=" matches these operant types type: std :: string = WCHAR * Return Gid; }
Use wstring instead of string.
Wstring guid; Guid = wszUuid;
Comments
Post a Comment