Commit 7e1d1aa5 authored by Michael Müller's avatar Michael Müller Committed by Alexandre Julliard

compobj.dll16: Fix implementation of StringFromGUID2.

parent 2f74d91d
......@@ -54,6 +54,7 @@ typedef LPCSTR LPCOLESTR16;
#define STDMETHOD16(m) HRESULT (STDMETHOD16CALLTYPE *m)
#define STDMETHOD16_(t,m) t (STDMETHOD16CALLTYPE *m)
#define CHARS_IN_GUID 39
/***********************************************************************
* IMalloc16 interface
......@@ -689,9 +690,14 @@ HRESULT WINAPI CLSIDFromProgID16(LPCOLESTR16 progid, LPCLSID riid)
/******************************************************************************
* StringFromGUID2 [COMPOBJ.76]
*/
INT WINAPI StringFromGUID216(REFGUID id, LPOLESTR str, INT cmax)
INT16 WINAPI StringFromGUID216(REFGUID id, LPOLESTR16 str, INT16 cmax)
{
return StringFromGUID2( id, str, cmax );
static const char format[] = "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}";
if (!id || cmax < CHARS_IN_GUID) return 0;
sprintf( str, format, id->Data1, id->Data2, id->Data3,
id->Data4[0], id->Data4[1], id->Data4[2], id->Data4[3],
id->Data4[4], id->Data4[5], id->Data4[6], id->Data4[7] );
return CHARS_IN_GUID;
}
......
......@@ -72,7 +72,7 @@
72 stub _IID_IEXTERNALCONNECTION
73 pascal CoCreateGuid(ptr) CoCreateGuid16
75 stub FNASSERT
76 pascal StringFromGUID2(ptr ptr word) StringFromGUID216
76 pascal -ret16 StringFromGUID2(ptr ptr word) StringFromGUID216
77 stub COGETCLASSEXT
78 stub OLE1CLASSFROMCLSID2
79 stub CLSIDFROMOLE1CLASS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment