p7zip-rar/CPP/Windows/COM.cpp

42 lines
708 B
C++
Raw Permalink Normal View History

2017-10-11 12:40:22 +02:00
// Windows/COM.cpp
#include "StdAfx.h"
/*
#include "COM.h"
#include "../Common/StringConvert.h"
namespace NWindows {
namespace NCOM {
// CoInitialize (NULL); must be called!
UString GUIDToStringW(REFGUID guid)
{
UString s;
const unsigned kSize = 48;
StringFromGUID2(guid, s.GetBuf(kSize), kSize);
s.ReleaseBuf_CalcLen(kSize);
return s;
}
AString GUIDToStringA(REFGUID guid)
{
return UnicodeStringToMultiByte(GUIDToStringW(guid));
}
HRESULT StringToGUIDW(const wchar_t *string, GUID &classID)
{
return CLSIDFromString((wchar_t *)string, &classID);
}
HRESULT StringToGUIDA(const char *string, GUID &classID)
{
return StringToGUIDW(MultiByteToUnicodeString(string), classID);
}
}}
*/