mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-01-11 00:48:05 +01:00
Airbag client libraries should compile under MSVC .NET 2003/7.1 (#64).
r=bryner http://groups.google.com/group/airbag-dev/browse_thread/thread/b838faeb50f71818 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@64 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
8647dde8cc
commit
73cd14b4af
10 changed files with 207 additions and 31 deletions
|
|
@ -33,6 +33,8 @@
|
|||
|
||||
#include <wchar.h>
|
||||
|
||||
#include "common/windows/string_utils-inl.h"
|
||||
|
||||
#include "common/windows/guid_string.h"
|
||||
|
||||
namespace google_airbag {
|
||||
|
|
@ -40,12 +42,13 @@ namespace google_airbag {
|
|||
// static
|
||||
wstring GUIDString::GUIDToWString(GUID *guid) {
|
||||
wchar_t guid_string[37];
|
||||
_snwprintf_s(guid_string, sizeof(guid_string) / sizeof(wchar_t), _TRUNCATE,
|
||||
L"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
|
||||
guid->Data1, guid->Data2, guid->Data3,
|
||||
guid->Data4[0], guid->Data4[1], guid->Data4[2],
|
||||
guid->Data4[3], guid->Data4[4], guid->Data4[5],
|
||||
guid->Data4[6], guid->Data4[7]);
|
||||
WindowsStringUtils::safe_swprintf(
|
||||
guid_string, sizeof(guid_string) / sizeof(guid_string[0]),
|
||||
L"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
|
||||
guid->Data1, guid->Data2, guid->Data3,
|
||||
guid->Data4[0], guid->Data4[1], guid->Data4[2],
|
||||
guid->Data4[3], guid->Data4[4], guid->Data4[5],
|
||||
guid->Data4[6], guid->Data4[7]);
|
||||
return wstring(guid_string);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue