compobj.dll16: Fix implementation of StringFromGUID2.

Signed-off-by: Michael Müller <michael@fds-team.de>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Müller 2016-04-14 21:01:03 +02:00 committed by Alexandre Julliard
parent 2f74d91d87
commit 7e1d1aa573
2 changed files with 9 additions and 3 deletions

View File

@ -54,6 +54,7 @@ typedef LPCSTR LPCOLESTR16;
#define STDMETHOD16(m) HRESULT (STDMETHOD16CALLTYPE *m) #define STDMETHOD16(m) HRESULT (STDMETHOD16CALLTYPE *m)
#define STDMETHOD16_(t,m) t (STDMETHOD16CALLTYPE *m) #define STDMETHOD16_(t,m) t (STDMETHOD16CALLTYPE *m)
#define CHARS_IN_GUID 39
/*********************************************************************** /***********************************************************************
* IMalloc16 interface * IMalloc16 interface
@ -689,9 +690,14 @@ HRESULT WINAPI CLSIDFromProgID16(LPCOLESTR16 progid, LPCLSID riid)
/****************************************************************************** /******************************************************************************
* StringFromGUID2 [COMPOBJ.76] * 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;
} }

View File

@ -72,7 +72,7 @@
72 stub _IID_IEXTERNALCONNECTION 72 stub _IID_IEXTERNALCONNECTION
73 pascal CoCreateGuid(ptr) CoCreateGuid16 73 pascal CoCreateGuid(ptr) CoCreateGuid16
75 stub FNASSERT 75 stub FNASSERT
76 pascal StringFromGUID2(ptr ptr word) StringFromGUID216 76 pascal -ret16 StringFromGUID2(ptr ptr word) StringFromGUID216
77 stub COGETCLASSEXT 77 stub COGETCLASSEXT
78 stub OLE1CLASSFROMCLSID2 78 stub OLE1CLASSFROMCLSID2
79 stub CLSIDFROMOLE1CLASS 79 stub CLSIDFROMOLE1CLASS