Commit 15765dd9 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

The Data1 member of the GUID struct needs to be an unsigned int too for Win64 compatibility.

parent 56b87f3a
......@@ -64,7 +64,7 @@ static void CRYPT_guid2wstr( const GUID *guid, LPWSTR wstr )
{
char str[40];
sprintf(str, "{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
sprintf(str, "{%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] );
......
......@@ -40,7 +40,7 @@ static char *show_guid(const GUID *guid)
static char guidstring[39];
sprintf(guidstring,
"{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
"{%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] );
......
......@@ -74,7 +74,7 @@ BOOL CALLBACK callback(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA data,
data->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_RENDER ? "Render" :
data->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE ?
"Capture" : "Unknown");
trace(" DeviceId: {%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
trace(" DeviceId: {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
data->DeviceId.Data1,data->DeviceId.Data2,data->DeviceId.Data3,
data->DeviceId.Data4[0],data->DeviceId.Data4[1],
data->DeviceId.Data4[2],data->DeviceId.Data4[3],
......@@ -103,7 +103,7 @@ BOOL CALLBACK callback1(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA data,
data->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_RENDER ? "Render" :
data->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE ?
"Capture" : "Unknown");
trace(" DeviceId: {%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
trace(" DeviceId: {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
data->DeviceId.Data1,data->DeviceId.Data2,data->DeviceId.Data3,
data->DeviceId.Data4[0],data->DeviceId.Data4[1],
data->DeviceId.Data4[2],data->DeviceId.Data4[3],
......@@ -132,7 +132,7 @@ BOOL CALLBACK callbackA(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA data,
data->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_RENDER ? "Render" :
data->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE ?
"Capture" : "Unknown");
trace(" DeviceId: {%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
trace(" DeviceId: {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
data->DeviceId.Data1,data->DeviceId.Data2,data->DeviceId.Data3,
data->DeviceId.Data4[0],data->DeviceId.Data4[1],
data->DeviceId.Data4[2],data->DeviceId.Data4[3],
......@@ -162,7 +162,7 @@ BOOL CALLBACK callbackW(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA data,
data->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_RENDER ? "Render" :
data->DataFlow == DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE ?
"Capture" : "Unknown");
trace("\tDeviceId: {%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
trace("\tDeviceId: {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
data->DeviceId.Data1,data->DeviceId.Data2,data->DeviceId.Data3,
data->DeviceId.Data4[0],data->DeviceId.Data4[1],
data->DeviceId.Data4[2],data->DeviceId.Data4[3],
......
......@@ -163,7 +163,7 @@ static HRESULT add_wordbreaker_clsid( LPCSTR lang, const CLSID *id)
CHAR key[100], val[50];
strcpy(key, "CLSID\\");
sprintf(key+6, "{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
sprintf(key+6, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
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]);
......
......@@ -344,7 +344,7 @@ static HRESULT register_server(BOOL do_register)
for(i=0; i < sizeof(pse)/sizeof(pse[0]); i++) {
pse[i].pszValue = mshtml_alloc(39);
sprintf(pse[i].pszValue, "{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
sprintf(pse[i].pszValue, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
clsids[i]->Data1, clsids[i]->Data2, clsids[i]->Data3, clsids[i]->Data4[0],
clsids[i]->Data4[1], clsids[i]->Data4[2], clsids[i]->Data4[3], clsids[i]->Data4[4],
clsids[i]->Data4[5], clsids[i]->Data4[6], clsids[i]->Data4[7]);
......
......@@ -1676,7 +1676,7 @@ static void test_freethreadedmarshaldata(IStream *pStream, MSHCTX mshctx, void *
marshal_data += sizeof(void *);
ok(*(DWORD *)marshal_data == 0, "expected 0x0, but got 0x%x\n", *(DWORD *)marshal_data);
marshal_data += sizeof(DWORD);
trace("got guid data: {%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
trace("got guid data: {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
((GUID *)marshal_data)->Data1, ((GUID *)marshal_data)->Data2, ((GUID *)marshal_data)->Data3,
((GUID *)marshal_data)->Data4[0], ((GUID *)marshal_data)->Data4[1], ((GUID *)marshal_data)->Data4[2], ((GUID *)marshal_data)->Data4[3],
((GUID *)marshal_data)->Data4[4], ((GUID *)marshal_data)->Data4[5], ((GUID *)marshal_data)->Data4[6], ((GUID *)marshal_data)->Data4[7]);
......
......@@ -272,7 +272,7 @@ _get_typeinfo_for_iid(REFIID riid, ITypeInfo**ti) {
LONG tlfnlen;
ITypeLib *tl;
sprintf( interfacekey, "Interface\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\\Typelib",
sprintf( interfacekey, "Interface\\{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\\Typelib",
riid->Data1, riid->Data2, riid->Data3,
riid->Data4[0], riid->Data4[1], riid->Data4[2], riid->Data4[3],
riid->Data4[4], riid->Data4[5], riid->Data4[6], riid->Data4[7]
......
......@@ -2542,7 +2542,7 @@ static BOOL TLB_GUIDFromString(char *str, GUID *guid)
int i;
short s;
if(sscanf(str, "%lx-%hx-%hx-%hx", &guid->Data1, &guid->Data2, &guid->Data3, &s) != 4) {
if(sscanf(str, "%x-%hx-%hx-%hx", &guid->Data1, &guid->Data2, &guid->Data3, &s) != 4) {
FIXME("Can't parse guid %s\n", debugstr_guid(guid));
return FALSE;
}
......
......@@ -85,7 +85,7 @@ QueryPathOfRegTypeLib16(
TRACE("\n");
if (HIWORD(guid)) {
sprintf( typelibkey, "SOFTWARE\\Classes\\Typelib\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\\%d.%d\\%x\\win16",
sprintf( typelibkey, "SOFTWARE\\Classes\\Typelib\\{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\\%d.%d\\%x\\win16",
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],
......
......@@ -210,7 +210,7 @@ BOOL HCR_GetExecuteCommandW( HKEY hkeyClass, LPCWSTR szClass, LPCWSTR szVerb, LP
static BOOL HCR_RegOpenClassIDKey(REFIID riid, HKEY *hkey)
{
char xriid[50];
sprintf( xriid, "CLSID\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
sprintf( xriid, "CLSID\\{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
riid->Data1, riid->Data2, riid->Data3,
riid->Data4[0], riid->Data4[1], riid->Data4[2], riid->Data4[3],
riid->Data4[4], riid->Data4[5], riid->Data4[6], riid->Data4[7] );
......
......@@ -167,7 +167,7 @@ void _dbg_ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize)
else if (( riid = _dbg_ILGetGUIDPointer(pidl) ))
{
if (szOut)
sprintf( szOut, "{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
sprintf( szOut, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
riid->Data1, riid->Data2, riid->Data3,
riid->Data4[0], riid->Data4[1], riid->Data4[2], riid->Data4[3],
riid->Data4[4], riid->Data4[5], riid->Data4[6], riid->Data4[7] );
......@@ -330,7 +330,7 @@ const char * shdebugstr_guid( const struct _GUID *id )
name = clsidbuf;
}
return wine_dbg_sprintf( "\n\t{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x} (%s)",
return wine_dbg_sprintf( "\n\t{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x} (%s)",
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], name ? name : "unknown" );
......
......@@ -50,7 +50,7 @@ LPITEMIDLIST SHELL32_CreatePidlFromBindCtx(IBindCtx *pbc, LPCWSTR path);
static inline int SHELL32_GUIDToStringA (REFGUID guid, LPSTR str)
{
return sprintf(str, "{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
return sprintf(str, "{%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]);
......
......@@ -627,7 +627,7 @@ INT WINAPI SHStringFromGUIDA(REFGUID guid, LPSTR lpszDest, INT cchMax)
TRACE("(%s,%p,%d)\n", debugstr_guid(guid), lpszDest, cchMax);
sprintf(xguid, "{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
sprintf(xguid, "{%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]);
......
......@@ -615,7 +615,7 @@ static HRESULT register_inf(BOOL doregister)
for(i = 0; i < sizeof(pse)/sizeof(pse[0]); i++) {
pse[i].pszValue = HeapAlloc(GetProcessHeap(), 0, 39);
sprintf(pse[i].pszValue, "{%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
sprintf(pse[i].pszValue, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
clsids[i]->Data1, clsids[i]->Data2, clsids[i]->Data3, clsids[i]->Data4[0],
clsids[i]->Data4[1], clsids[i]->Data4[2], clsids[i]->Data4[3], clsids[i]->Data4[4],
clsids[i]->Data4[5], clsids[i]->Data4[6], clsids[i]->Data4[7]);
......
......@@ -20,7 +20,11 @@
#define GUID_DEFINED
typedef struct _GUID
{
#if defined(_MSC_VER) || (defined(WINE_NO_LONG_AS_INT) && !defined(_WIN64))
unsigned long Data1;
#else
unsigned int Data1;
#endif
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[ 8 ];
......
......@@ -187,7 +187,11 @@ static inline const char *wine_dbgstr_guid( const GUID *id )
{
if (!id) return "(null)";
if (!((INT_PTR)id >> 16)) return wine_dbg_sprintf( "<guid-0x%04x>", (INT_PTR)id & 0xffff );
#if defined(WINE_NO_LONG_AS_INT) && !defined(_WIN64)
return wine_dbg_sprintf( "{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
#else
return wine_dbg_sprintf( "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
#endif
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] );
......
......@@ -83,7 +83,7 @@ int is_void(const type_t *t, const var_t *v)
void write_guid(FILE *f, const char *guid_prefix, const char *name, const UUID *uuid)
{
if (!uuid) return;
fprintf(f, "DEFINE_GUID(%s_%s, 0x%08lx, 0x%04x, 0x%04x, 0x%02x,0x%02x, 0x%02x,"
fprintf(f, "DEFINE_GUID(%s_%s, 0x%08x, 0x%04x, 0x%04x, 0x%02x,0x%02x, 0x%02x,"
"0x%02x,0x%02x,0x%02x,0x%02x,0x%02x);\n",
guid_prefix, name, uuid->Data1, uuid->Data2, uuid->Data3, uuid->Data4[0],
uuid->Data4[1], uuid->Data4[2], uuid->Data4[3], uuid->Data4[4], uuid->Data4[5],
......
......@@ -105,7 +105,7 @@ typedef struct lnk_string_tag {
static void guid_to_string(LPGUID guid, char *str)
{
sprintf(str, "{%08lx-%04x-%04x-%02X%02X-%02X%02X%02X%02X%02X%02X}",
sprintf(str, "{%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]);
......
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