include: Use long type by default in GUID definition.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b89eaba003
commit
ae2693e2c4
|
@ -79,7 +79,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3dxof_parsing);
|
|||
#define TOKEN_CSTRING 51
|
||||
#define TOKEN_ARRAY 52
|
||||
|
||||
#define CLSIDFMT "<%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X>"
|
||||
#define CLSIDFMT "<%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X>"
|
||||
|
||||
/* FOURCC to string conversion for debug messages */
|
||||
static const char *debugstr_fourcc(DWORD fourcc)
|
||||
|
|
|
@ -152,7 +152,7 @@ static inline dispex *impl_from_IDispatchEx(IDispatchEx *iface)
|
|||
static HRESULT WINAPI dispex_QueryInterface(IDispatchEx* iface,
|
||||
REFIID iid, void **obj)
|
||||
{
|
||||
trace("QI {%08x-...}\n", iid->Data1);
|
||||
trace("QI %s\n", debugstr_guid(iid));
|
||||
if(IsEqualIID(iid, &IID_IUnknown) ||
|
||||
IsEqualIID(iid, &IID_IDispatchEx))
|
||||
{
|
||||
|
|
|
@ -2017,7 +2017,7 @@ static void test_interface_identifier_conversion(void)
|
|||
memset( &guid, 0xff, sizeof(guid) );
|
||||
ret = ConvertInterfaceLuidToGuid( NULL, &guid );
|
||||
ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret );
|
||||
ok( guid.Data1 == 0xffffffff, "got %x\n", guid.Data1 );
|
||||
ok( guid.Data1 == 0xffffffff, "got %s\n", debugstr_guid(&guid) );
|
||||
|
||||
ret = ConvertInterfaceLuidToGuid( &luid, NULL );
|
||||
ok( ret == ERROR_INVALID_PARAMETER, "got %u\n", ret );
|
||||
|
|
|
@ -97,7 +97,7 @@ static GUID *parse_uuid( GUID *guid, const char *str )
|
|||
int i;
|
||||
unsigned char *out = guid->Data4;
|
||||
|
||||
if (sscanf( str, "%x-%hx-%hx-", &guid->Data1, &guid->Data2, &guid->Data3 ) != 3) return NULL;
|
||||
if (sscanf( str, "%x-%hx-%hx-", (int *)&guid->Data1, &guid->Data2, &guid->Data3 ) != 3) return NULL;
|
||||
for (i = 19; i < 36; i++)
|
||||
{
|
||||
unsigned char val;
|
||||
|
|
|
@ -6971,7 +6971,7 @@ void StorageUtl_WriteULargeInteger(void *buffer, ULONG offset, const ULARGE_INTE
|
|||
|
||||
void StorageUtl_ReadGUID(const BYTE* buffer, ULONG offset, GUID* value)
|
||||
{
|
||||
StorageUtl_ReadDWord(buffer, offset, &(value->Data1));
|
||||
StorageUtl_ReadDWord(buffer, offset, (DWORD *)&value->Data1);
|
||||
StorageUtl_ReadWord(buffer, offset+4, &(value->Data2));
|
||||
StorageUtl_ReadWord(buffer, offset+6, &(value->Data3));
|
||||
|
||||
|
|
|
@ -552,21 +552,21 @@ static void test_CLSIDFromString(void)
|
|||
memset(&clsid, 0xcc, sizeof(CLSID));
|
||||
hr = CLSIDFromString(wszCLSID_Broken, &clsid);
|
||||
ok(hr == CO_E_CLASSSTRING, "Got %08x\n", hr);
|
||||
ok(clsid.Data1 == CLSID_StdFont.Data1, "Got %08x\n", clsid.Data1);
|
||||
ok(clsid.Data1 == CLSID_StdFont.Data1, "Got %s\n", debugstr_guid(&clsid));
|
||||
ok(clsid.Data2 == 0xcccc, "Got %04x\n", clsid.Data2);
|
||||
|
||||
wszCLSID_Broken[3] = '*';
|
||||
memset(&clsid, 0xcc, sizeof(CLSID));
|
||||
hr = CLSIDFromString(wszCLSID_Broken, &clsid);
|
||||
ok(hr == CO_E_CLASSSTRING, "Got %08x\n", hr);
|
||||
ok(clsid.Data1 == 0xb, "Got %08x\n", clsid.Data1);
|
||||
ok(clsid.Data1 == 0xb, "Got %s\n", debugstr_guid(&clsid));
|
||||
ok(clsid.Data2 == 0xcccc, "Got %04x\n", clsid.Data2);
|
||||
|
||||
wszCLSID_Broken[3] = '\0';
|
||||
memset(&clsid, 0xcc, sizeof(CLSID));
|
||||
hr = CLSIDFromString(wszCLSID_Broken, &clsid);
|
||||
ok(hr == CO_E_CLASSSTRING, "Got %08x\n", hr);
|
||||
ok(clsid.Data1 == 0xb, "Got %08x\n", clsid.Data1);
|
||||
ok(clsid.Data1 == 0xb, "Got %s\n", debugstr_guid(&clsid));
|
||||
ok(clsid.Data2 == 0xcccc, "Got %04x\n", clsid.Data2);
|
||||
}
|
||||
|
||||
|
@ -600,36 +600,36 @@ static void test_IIDFromString(void)
|
|||
memset(&iid, 0xab, sizeof(iid));
|
||||
hr = IIDFromString(cf_brokenW, &iid);
|
||||
ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
|
||||
ok(iid.Data1 == 0xabababab, "Got %08x\n", iid.Data1);
|
||||
ok(iid.Data1 == 0xabababab, "Got %s\n", debugstr_guid(&iid));
|
||||
|
||||
/* invalid IID in a valid format */
|
||||
memset(&iid, 0xab, sizeof(iid));
|
||||
hr = IIDFromString(brokenW, &iid);
|
||||
ok(hr == CO_E_IIDSTRING, "got 0x%08x\n", hr);
|
||||
ok(iid.Data1 == 0x00000001, "Got %08x\n", iid.Data1);
|
||||
ok(iid.Data1 == 0x00000001, "Got %s\n", debugstr_guid(&iid));
|
||||
|
||||
memset(&iid, 0xab, sizeof(iid));
|
||||
hr = IIDFromString(broken2W, &iid);
|
||||
ok(hr == CO_E_IIDSTRING, "got 0x%08x\n", hr);
|
||||
ok(iid.Data1 == 0x00000001, "Got %08x\n", iid.Data1);
|
||||
ok(iid.Data1 == 0x00000001, "Got %s\n", debugstr_guid(&iid));
|
||||
|
||||
/* format is broken, but string length is okay */
|
||||
memset(&iid, 0xab, sizeof(iid));
|
||||
hr = IIDFromString(broken3W, &iid);
|
||||
ok(hr == CO_E_IIDSTRING, "got 0x%08x\n", hr);
|
||||
ok(iid.Data1 == 0xabababab, "Got %08x\n", iid.Data1);
|
||||
ok(iid.Data1 == 0xabababab, "Got %s\n", debugstr_guid(&iid));
|
||||
|
||||
/* invalid string */
|
||||
memset(&iid, 0xab, sizeof(iid));
|
||||
hr = IIDFromString(wszNonExistent, &iid);
|
||||
ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
|
||||
ok(iid.Data1 == 0xabababab, "Got %08x\n", iid.Data1);
|
||||
ok(iid.Data1 == 0xabababab, "Got %s\n", debugstr_guid(&iid));
|
||||
|
||||
/* valid ProgID */
|
||||
memset(&iid, 0xab, sizeof(iid));
|
||||
hr = IIDFromString(stdfont, &iid);
|
||||
ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
|
||||
ok(iid.Data1 == 0xabababab, "Got %08x\n", iid.Data1);
|
||||
ok(iid.Data1 == 0xabababab, "Got %s\n", debugstr_guid(&iid));
|
||||
}
|
||||
|
||||
static void test_StringFromGUID2(void)
|
||||
|
|
|
@ -694,7 +694,7 @@ static void test_CreateDispTypeInfo(void)
|
|||
ok(hr == S_OK, "hr %08x\n", hr);
|
||||
ok(pTypeAttr->typekind == TKIND_INTERFACE, "typekind %0x\n", pTypeAttr->typekind);
|
||||
ok(pTypeAttr->cFuncs == 4, "cFuncs %d\n", pTypeAttr->cFuncs);
|
||||
ok(IsEqualGUID(&pTypeAttr->guid, &GUID_NULL), "guid {%08x-...}\n", pTypeAttr->guid.Data1);
|
||||
ok(IsEqualGUID(&pTypeAttr->guid, &GUID_NULL), "guid %s\n", debugstr_guid(&pTypeAttr->guid));
|
||||
ok(pTypeAttr->wTypeFlags == 0, "typeflags %08x\n", pTypeAttr->wTypeFlags);
|
||||
|
||||
ITypeInfo_ReleaseTypeAttr(pTI2, pTypeAttr);
|
||||
|
@ -1657,7 +1657,7 @@ static void test_inheritance(void)
|
|||
ok(hr == S_OK, "hr %08x\n", hr);
|
||||
hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA);
|
||||
ok(hr == S_OK, "got %08x\n", hr);
|
||||
ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid {%08x-....\n", pTA->guid.Data1);
|
||||
ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid %s\n", debugstr_guid(&pTA->guid));
|
||||
ITypeInfo_ReleaseTypeAttr(pTI_p, pTA);
|
||||
ITypeInfo_Release(pTI_p);
|
||||
|
||||
|
@ -1691,7 +1691,7 @@ static void test_inheritance(void)
|
|||
ok(hr == S_OK, "hr %08x\n", hr);
|
||||
hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA);
|
||||
ok(hr == S_OK, "got %08x\n", hr);
|
||||
ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid {%08x-....\n", pTA->guid.Data1);
|
||||
ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid %s\n", debugstr_guid(&pTA->guid));
|
||||
ITypeInfo_ReleaseTypeAttr(pTI_p, pTA);
|
||||
ITypeInfo_Release(pTI_p);
|
||||
hr = ITypeInfo_GetFuncDesc(pTI, 1, &pFD);
|
||||
|
@ -1722,7 +1722,7 @@ static void test_inheritance(void)
|
|||
ok(hr == S_OK, "hr %08x\n", hr);
|
||||
hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA);
|
||||
ok(hr == S_OK, "got %08x\n", hr);
|
||||
ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid {%08x-....\n", pTA->guid.Data1);
|
||||
ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid %s\n", debugstr_guid(&pTA->guid));
|
||||
ITypeInfo_ReleaseTypeAttr(pTI_p, pTA);
|
||||
ITypeInfo_Release(pTI_p);
|
||||
hr = ITypeInfo_GetFuncDesc(pTI, 6, &pFD);
|
||||
|
@ -1750,7 +1750,7 @@ static void test_inheritance(void)
|
|||
ok(hr == S_OK, "hr %08x\n", hr);
|
||||
hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA);
|
||||
ok(hr == S_OK, "got %08x\n", hr);
|
||||
ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid {%08x-....\n", pTA->guid.Data1);
|
||||
ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid %s\n", debugstr_guid(&pTA->guid));
|
||||
ITypeInfo_ReleaseTypeAttr(pTI_p, pTA);
|
||||
ITypeInfo_Release(pTI_p);
|
||||
|
||||
|
@ -1781,7 +1781,7 @@ static void test_inheritance(void)
|
|||
ok(hr == S_OK, "hr %08x\n", hr);
|
||||
hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA);
|
||||
ok(hr == S_OK, "got %08x\n", hr);
|
||||
ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid {%08x-....\n", pTA->guid.Data1);
|
||||
ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid %s\n", debugstr_guid(&pTA->guid));
|
||||
ITypeInfo_ReleaseTypeAttr(pTI_p, pTA);
|
||||
ITypeInfo_Release(pTI_p);
|
||||
|
||||
|
@ -1814,7 +1814,7 @@ static void test_inheritance(void)
|
|||
ok(hr == S_OK, "hr %08x\n", hr);
|
||||
hr = ITypeInfo_GetTypeAttr(pTI_p, &pTA);
|
||||
ok(hr == S_OK, "got %08x\n", hr);
|
||||
ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid {%08x-....\n", pTA->guid.Data1);
|
||||
ok(IsEqualGUID(&pTA->guid, &IID_IDispatch), "guid %s\n", debugstr_guid(&pTA->guid));
|
||||
ITypeInfo_ReleaseTypeAttr(pTI_p, pTA);
|
||||
ITypeInfo_Release(pTI_p);
|
||||
|
||||
|
|
|
@ -2280,7 +2280,7 @@ static void test_bsc_marshaling(void)
|
|||
ok(!in_bindinfo.dwOptions, "dwOptions = %u\n", in_bindinfo.dwOptions);
|
||||
ok(!in_bindinfo.dwOptionsFlags, "dwOptionsFlags = %u\n", in_bindinfo.dwOptionsFlags);
|
||||
ok(!in_bindinfo.dwCodePage, "dwCodePage = %u\n", in_bindinfo.dwCodePage);
|
||||
ok(!in_bindinfo.iid.Data1, "iid.Data1 = %u\n", in_bindinfo.iid.Data1);
|
||||
ok(!in_bindinfo.iid.Data1, "iid = %s\n", debugstr_guid(&in_bindinfo.iid));
|
||||
ok(!in_bindinfo.pUnk, "pUnk = %p\n", in_bindinfo.pUnk);
|
||||
ok(!in_bindinfo.dwReserved, "dwReserved = %u\n", in_bindinfo.dwReserved);
|
||||
ok(!in_bindinfo.securityAttributes.nLength, "securityAttributes.nLength = %u\n",
|
||||
|
@ -2305,7 +2305,7 @@ static void test_bsc_marshaling(void)
|
|||
ok(bindinfo.dwOptions == 24, "dwOptions = %u\n", bindinfo.dwOptions);
|
||||
ok(bindinfo.dwOptionsFlags == 25, "dwOptionsFlags = %u\n", bindinfo.dwOptionsFlags);
|
||||
ok(bindinfo.dwCodePage, "dwCodePage = %u\n", bindinfo.dwCodePage);
|
||||
ok(!bindinfo.iid.Data1, "iid.Data1 = %u\n", bindinfo.iid.Data1);
|
||||
ok(!bindinfo.iid.Data1, "iid = %s\n", debugstr_guid(&bindinfo.iid));
|
||||
ok(!bindinfo.pUnk, "pUnk = %p\n", bindinfo.pUnk);
|
||||
ok(bindinfo.dwReserved == 18, "dwReserved = %u\n", bindinfo.dwReserved);
|
||||
ok(bindinfo.securityAttributes.nLength == 30, "securityAttributes.nLength = %u\n",
|
||||
|
@ -2497,7 +2497,7 @@ static void test_bsc_marshaling(void)
|
|||
ok(!in_bindinfo.dwOptions, "dwOptions = %u\n", in_bindinfo.dwOptions);
|
||||
ok(!in_bindinfo.dwOptionsFlags, "dwOptionsFlags = %u\n", in_bindinfo.dwOptionsFlags);
|
||||
ok(!in_bindinfo.dwCodePage, "dwCodePage = %u\n", in_bindinfo.dwCodePage);
|
||||
ok(!in_bindinfo.iid.Data1, "iid.Data1 = %u\n", in_bindinfo.iid.Data1);
|
||||
ok(!in_bindinfo.iid.Data1, "iid = %s\n", debugstr_guid(&in_bindinfo.iid));
|
||||
ok(!in_bindinfo.pUnk, "pUnk = %p\n", in_bindinfo.pUnk);
|
||||
ok(!in_bindinfo.dwReserved, "dwReserved = %u\n", in_bindinfo.dwReserved);
|
||||
ok(!in_bindinfo.securityAttributes.nLength, "securityAttributes.nLength = %u\n",
|
||||
|
@ -2521,7 +2521,7 @@ static void test_bsc_marshaling(void)
|
|||
ok(bindinfo.dwOptions == 24, "dwOptions = %u\n", bindinfo.dwOptions);
|
||||
ok(bindinfo.dwOptionsFlags == 25, "dwOptionsFlags = %u\n", bindinfo.dwOptionsFlags);
|
||||
ok(bindinfo.dwCodePage, "dwCodePage = %u\n", bindinfo.dwCodePage);
|
||||
ok(!bindinfo.iid.Data1, "iid.Data1 = %u\n", bindinfo.iid.Data1);
|
||||
ok(!bindinfo.iid.Data1, "iid = %s\n", debugstr_guid(&bindinfo.iid));
|
||||
ok(!bindinfo.pUnk, "pUnk = %p\n", bindinfo.pUnk);
|
||||
ok(bindinfo.dwReserved == 18, "dwReserved = %u\n", bindinfo.dwReserved);
|
||||
ok(bindinfo.securityAttributes.nLength == 30, "securityAttributes.nLength = %u\n",
|
||||
|
|
|
@ -898,7 +898,7 @@ static void add_gpu( const struct gdi_gpu *gpu, void *param )
|
|||
GUID guid;
|
||||
uuid_create( &guid );
|
||||
sprintf( buffer, "{%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],
|
||||
(unsigned int)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] );
|
||||
size = asciiz_to_unicode( ctx->gpu_guid, buffer );
|
||||
TRACE( "created guid %s\n", debugstr_w(ctx->gpu_guid) );
|
||||
|
|
|
@ -30,7 +30,7 @@ typedef struct
|
|||
#else
|
||||
typedef struct _GUID
|
||||
{
|
||||
#ifdef WINE_USE_LONG
|
||||
#ifndef __LP64__
|
||||
unsigned long Data1;
|
||||
#else
|
||||
unsigned int Data1;
|
||||
|
|
|
@ -211,7 +211,7 @@ void memory_examine(const struct dbg_lvalue *lvalue, int count, char format)
|
|||
memory_report_invalid_addr(linear);
|
||||
break;
|
||||
}
|
||||
dbg_printf("{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
|
||||
dbg_printf("{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
|
||||
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]);
|
||||
|
|
|
@ -191,7 +191,7 @@ const char* get_guid_str(const GUID* guid)
|
|||
str = dump_want_n(39);
|
||||
if (str)
|
||||
sprintf(str, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
|
||||
guid->Data1, guid->Data2, guid->Data3,
|
||||
(unsigned int)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 str;
|
||||
|
|
|
@ -257,7 +257,7 @@ static void print_guid(const char *name)
|
|||
print_offset();
|
||||
|
||||
printf("%s = {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n", name,
|
||||
guid.Data1, guid.Data2, guid.Data3, guid.Data4[0],
|
||||
(unsigned int)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]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue