Signed-off-by: Hans Leidekker hans@codeweavers.com --- dlls/mscms/Makefile.in | 1 - dlls/mscms/mscms_main.c | 4 +- dlls/mscms/profile.c | 38 ++-- dlls/mscms/stub.c | 30 +-- dlls/mscms/tests/Makefile.in | 1 - dlls/mscms/tests/profile.c | 373 +++++++++++++++++------------------ dlls/mscms/transform.c | 25 ++- 7 files changed, 232 insertions(+), 240 deletions(-)
diff --git a/dlls/mscms/Makefile.in b/dlls/mscms/Makefile.in index f28f90327f4..d57cc54e3c6 100644 --- a/dlls/mscms/Makefile.in +++ b/dlls/mscms/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES MODULE = mscms.dll IMPORTLIB = mscms IMPORTS = $(LCMS2_PE_LIBS) shlwapi advapi32 diff --git a/dlls/mscms/mscms_main.c b/dlls/mscms/mscms_main.c index 1ea2eaef832..8c7e7c9e498 100644 --- a/dlls/mscms/mscms_main.c +++ b/dlls/mscms/mscms_main.c @@ -37,9 +37,9 @@ static void lcms_error_handler(cmsContext ctx, cmsUInt32Number error, const char TRACE("%u %s\n", error, debugstr_a(text)); }
-BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) +BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, void *reserved ) { - TRACE( "(%p, %d, %p)\n", hinst, reason, reserved ); + TRACE( "(%p, %lu, %p)\n", hinst, reason, reserved );
switch (reason) { diff --git a/dlls/mscms/profile.c b/dlls/mscms/profile.c index 5bc5df0712d..b6c2b5cb797 100644 --- a/dlls/mscms/profile.c +++ b/dlls/mscms/profile.c @@ -327,7 +327,7 @@ BOOL WINAPI GetColorProfileElement( HPROFILE handle, TAGTYPE type, DWORD offset, BOOL ret; struct profile *profile = grab_profile( handle );
- TRACE( "( %p, 0x%08x, %d, %p, %p, %p )\n", handle, type, offset, size, buffer, ref ); + TRACE( "( %p, %#lx, %lu, %p, %p, %p )\n", handle, type, offset, size, buffer, ref );
if (!profile) return FALSE;
@@ -365,7 +365,7 @@ BOOL WINAPI GetColorProfileElementTag( HPROFILE handle, DWORD index, PTAGTYPE ty struct profile *profile = grab_profile( handle ); struct tag_entry tag;
- TRACE( "( %p, %d, %p )\n", handle, index, type ); + TRACE( "( %p, %lu, %p )\n", handle, index, type );
if (!profile) return FALSE;
@@ -506,7 +506,7 @@ BOOL WINAPI GetStandardColorSpaceProfileA( PCSTR machine, DWORD id, PSTR profile BOOL ret = FALSE; DWORD sizeW;
- TRACE( "( 0x%08x, %p, %p )\n", id, profile, size ); + TRACE( "( %#lx, %p, %p )\n", id, profile, size );
if (machine) { @@ -565,7 +565,7 @@ BOOL WINAPI GetStandardColorSpaceProfileW( PCWSTR machine, DWORD id, PWSTR profi WCHAR rgbprofile[MAX_PATH]; DWORD len = sizeof(rgbprofile);
- TRACE( "( 0x%08x, %p, %p )\n", id, profile, size ); + TRACE( "( %#lx, %p, %p )\n", id, profile, size );
if (machine) { @@ -661,15 +661,15 @@ static BOOL match_profile( PENUMTYPEW rec, PPROFILEHEADER hdr ) } if (rec->dwFields & ET_MEDIATYPE) { - FIXME( "ET_MEDIATYPE: 0x%08x\n", rec->dwMediaType ); + FIXME( "ET_MEDIATYPE: %#lx\n", rec->dwMediaType ); } if (rec->dwFields & ET_DITHERMODE) { - FIXME( "ET_DITHERMODE: 0x%08x\n", rec->dwDitheringMode ); + FIXME( "ET_DITHERMODE: %#lx\n", rec->dwDitheringMode ); } if (rec->dwFields & ET_RESOLUTION) { - FIXME( "ET_RESOLUTION: 0x%08x, 0x%08x\n", + FIXME( "ET_RESOLUTION: %#lx, %#lx\n", rec->dwResolution[0], rec->dwResolution[1] ); } if (rec->dwFields & ET_DEVICECLASS) @@ -708,7 +708,7 @@ static BOOL match_profile( PENUMTYPEW rec, PPROFILEHEADER hdr ) } if (rec->dwFields & ET_PROFILEFLAGS) { - TRACE( "ET_PROFILEFLAGS: 0x%08x\n", rec->dwProfileFlags ); + TRACE( "ET_PROFILEFLAGS: %#lx\n", rec->dwProfileFlags ); if (rec->dwProfileFlags != hdr->phProfileFlags) return FALSE; } if (rec->dwFields & ET_MANUFACTURER) @@ -723,14 +723,14 @@ static BOOL match_profile( PENUMTYPEW rec, PPROFILEHEADER hdr ) } if (rec->dwFields & ET_ATTRIBUTES) { - TRACE( "ET_ATTRIBUTES: 0x%08x, 0x%08x\n", + TRACE( "ET_ATTRIBUTES: %#lx, %#lx\n", rec->dwAttributes[0], rec->dwAttributes[1] ); if (rec->dwAttributes[0] != hdr->phAttributes[0] || rec->dwAttributes[1] != hdr->phAttributes[1]) return FALSE; } if (rec->dwFields & ET_RENDERINGINTENT) { - TRACE( "ET_RENDERINGINTENT: 0x%08x\n", rec->dwRenderingIntent ); + TRACE( "ET_RENDERINGINTENT: %#lx\n", rec->dwRenderingIntent ); if (rec->dwRenderingIntent != hdr->phRenderingIntent) return FALSE; } if (rec->dwFields & ET_CREATOR) @@ -1084,7 +1084,7 @@ BOOL WINAPI IsColorProfileTagPresent( HPROFILE handle, TAGTYPE type, PBOOL prese struct profile *profile = grab_profile( handle ); struct tag_entry tag;
- TRACE( "( %p, 0x%08x, %p )\n", handle, type, present ); + TRACE( "( %p, %#lx, %p )\n", handle, type, present );
if (!profile) return FALSE;
@@ -1153,7 +1153,7 @@ BOOL WINAPI SetColorProfileElement( HPROFILE handle, TAGTYPE type, DWORD offset, BOOL ret; struct profile *profile = grab_profile( handle );
- TRACE( "( %p, 0x%08x, %d, %p, %p )\n", handle, type, offset, size, buffer ); + TRACE( "( %p, %#lx, %lu, %p, %p )\n", handle, type, offset, size, buffer );
if (!profile) return FALSE;
@@ -1271,7 +1271,7 @@ HPROFILE WINAPI OpenColorProfileA( PPROFILE profile, DWORD access, DWORD sharing HPROFILE handle = NULL; PROFILE profileW;
- TRACE( "( %p, 0x%08x, 0x%08x, 0x%08x )\n", profile, access, sharing, creation ); + TRACE( "( %p, %#lx, %#lx, %#lx )\n", profile, access, sharing, creation );
if (!profile || !profile->pProfileData) return NULL;
@@ -1316,7 +1316,7 @@ HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing HANDLE handle = INVALID_HANDLE_VALUE; DWORD size;
- TRACE( "( %p, 0x%08x, 0x%08x, 0x%08x )\n", profile, access, sharing, creation ); + TRACE( "( %p, %#lx, %#lx, %#lx )\n", profile, access, sharing, creation );
if (!profile || !profile->pProfileData) return NULL;
@@ -1366,7 +1366,7 @@ HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing } if (handle == INVALID_HANDLE_VALUE) { - WARN( "Unable to open color profile %u\n", GetLastError() ); + WARN( "Unable to open color profile %lu\n", GetLastError() ); return NULL; } if ((size = GetFileSize( handle, NULL )) == INVALID_FILE_SIZE) @@ -1398,7 +1398,7 @@ HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing } else { - ERR( "Invalid profile type %u\n", profile->dwType ); + ERR( "Invalid profile type %lu\n", profile->dwType ); return NULL; }
@@ -1461,7 +1461,7 @@ BOOL WINAPI WcsGetDefaultColorProfileSize( WCS_PROFILE_MANAGEMENT_SCOPE scope, P COLORPROFILETYPE type, COLORPROFILESUBTYPE subtype, DWORD profile_id, PDWORD profile_size) { - FIXME( "%d %s %d %d %d %p\n", scope, debugstr_w(device_name), type, subtype, profile_id, profile_size ); + FIXME( "%d, %s, %d, %d, %lu, %p\n", scope, debugstr_w(device_name), type, subtype, profile_id, profile_size ); SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); return FALSE; } @@ -1485,7 +1485,7 @@ HPROFILE WINAPI WcsOpenColorProfileA( PROFILE *cdm, PROFILE *camp, PROFILE *gmmp PROFILE cdmW, campW = {0}, gmmpW = {0}; HPROFILE ret = NULL;
- TRACE( "%p, %p, %p, %08x, %08x, %08x, %08x\n", cdm, camp, gmmp, access, sharing, creation, flags ); + TRACE( "%p, %p, %p, %#lx, %#lx, %#lx, %#lx\n", cdm, camp, gmmp, access, sharing, creation, flags );
if (!cdm || !profile_AtoW( cdm, &cdmW )) return NULL; if (camp && !profile_AtoW( camp, &campW )) goto done; @@ -1506,7 +1506,7 @@ done: HPROFILE WINAPI WcsOpenColorProfileW( PROFILE *cdm, PROFILE *camp, PROFILE *gmmp, DWORD access, DWORD sharing, DWORD creation, DWORD flags ) { - TRACE( "%p, %p, %p, %08x, %08x, %08x, %08x\n", cdm, camp, gmmp, access, sharing, creation, flags ); + TRACE( "%p, %p, %p, %#lx, %#lx, %#lx, %#lx\n", cdm, camp, gmmp, access, sharing, creation, flags ); FIXME("no support for WCS profiles\n" );
return OpenColorProfileW( cdm, access, sharing, creation ); diff --git a/dlls/mscms/stub.c b/dlls/mscms/stub.c index 28c08e20868..6ac777a86f7 100644 --- a/dlls/mscms/stub.c +++ b/dlls/mscms/stub.c @@ -35,7 +35,7 @@ BOOL WINAPI CheckBitmapBits( HTRANSFORM transform, PVOID srcbits, BMFORMAT forma DWORD height, DWORD stride, PBYTE result, PBMCALLBACKFN callback, LPARAM data ) { - FIXME( "( %p, %p, 0x%08x, 0x%08x, 0x%08x, 0x%08x, %p, %p, 0x%08lx ) stub\n", + FIXME( "( %p, %p, %#x, %#lx, %#lx, %#lx, %p, %p, %#Ix ) stub\n", transform, srcbits, format, width, height, stride, result, callback, data );
return FALSE; @@ -44,21 +44,21 @@ BOOL WINAPI CheckBitmapBits( HTRANSFORM transform, PVOID srcbits, BMFORMAT forma BOOL WINAPI CheckColors( HTRANSFORM transform, PCOLOR colors, DWORD number, COLORTYPE type, PBYTE result ) { - FIXME( "( %p, %p, 0x%08x, 0x%08x, %p ) stub\n", transform, colors, number, type, result ); + FIXME( "( %p, %p, %#lx, %#x, %p ) stub\n", transform, colors, number, type, result );
return FALSE; }
BOOL WINAPI ConvertColorNameToIndex( HPROFILE profile, PCOLOR_NAME name, PDWORD index, DWORD count ) { - FIXME( "( %p, %p, %p, 0x%08x ) stub\n", profile, name, index, count ); + FIXME( "( %p, %p, %p, %#lx ) stub\n", profile, name, index, count );
return FALSE; }
BOOL WINAPI ConvertIndexToColorName( HPROFILE profile, PDWORD index, PCOLOR_NAME name, DWORD count ) { - FIXME( "( %p, %p, %p, 0x%08x ) stub\n", profile, index, name, count ); + FIXME( "( %p, %p, %p, %#lx ) stub\n", profile, index, name, count );
return FALSE; } @@ -66,7 +66,7 @@ BOOL WINAPI ConvertIndexToColorName( HPROFILE profile, PDWORD index, PCOLOR_NAME BOOL WINAPI CreateDeviceLinkProfile( PHPROFILE profiles, DWORD nprofiles, PDWORD intents, DWORD nintents, DWORD flags, PBYTE *data, DWORD index ) { - FIXME( "( %p, 0x%08x, %p, 0x%08x, 0x%08x, %p, 0x%08x ) stub\n", + FIXME( "( %p, %#lx, %p, %#lx, %#lx, %p, %#lx ) stub\n", profiles, nprofiles, intents, nintents, flags, data, index );
return FALSE; @@ -90,7 +90,7 @@ DWORD WINAPI GenerateCopyFilePaths( LPCWSTR printer, LPCWSTR directory, LPBYTE c DWORD level, LPWSTR sourcedir, LPDWORD sourcedirsize, LPWSTR targetdir, LPDWORD targetdirsize, DWORD flags ) { - FIXME( "( %s, %s, %p, 0x%08x, %p, %p, %p, %p, 0x%08x ) stub\n", + FIXME( "( %s, %s, %p, %#lx, %p, %p, %p, %p, %#lx ) stub\n", debugstr_w(printer), debugstr_w(directory), clientinfo, level, sourcedir, sourcedirsize, targetdir, targetdirsize, flags ); return ERROR_SUCCESS; @@ -98,7 +98,7 @@ DWORD WINAPI GenerateCopyFilePaths( LPCWSTR printer, LPCWSTR directory, LPBYTE c
DWORD WINAPI GetCMMInfo( HTRANSFORM transform, DWORD info ) { - FIXME( "( %p, 0x%08x ) stub\n", transform, info ); + FIXME( "( %p, %#lx ) stub\n", transform, info );
return 0; } @@ -113,14 +113,14 @@ BOOL WINAPI GetNamedProfileInfo( HPROFILE profile, PNAMED_PROFILE_INFO info ) BOOL WINAPI GetPS2ColorRenderingDictionary( HPROFILE profile, DWORD intent, PBYTE buffer, PDWORD size, PBOOL binary ) { - FIXME( "( %p, 0x%08x, %p, %p, %p ) stub\n", profile, intent, buffer, size, binary ); + FIXME( "( %p, %#lx, %p, %p, %p ) stub\n", profile, intent, buffer, size, binary );
return FALSE; }
BOOL WINAPI GetPS2ColorRenderingIntent( HPROFILE profile, DWORD intent, PBYTE buffer, PDWORD size ) { - FIXME( "( %p, 0x%08x, %p, %p ) stub\n", profile, intent, buffer, size ); + FIXME( "( %p, %#lx, %p, %p ) stub\n", profile, intent, buffer, size );
return FALSE; } @@ -128,7 +128,7 @@ BOOL WINAPI GetPS2ColorRenderingIntent( HPROFILE profile, DWORD intent, PBYTE bu BOOL WINAPI GetPS2ColorSpaceArray( HPROFILE profile, DWORD intent, DWORD type, PBYTE buffer, PDWORD size, PBOOL binary ) { - FIXME( "( %p, 0x%08x, 0x%08x, %p, %p, %p ) stub\n", profile, intent, type, buffer, size, binary ); + FIXME( "( %p, %#lx, %#lx, %p, %p, %p ) stub\n", profile, intent, type, buffer, size, binary );
return FALSE; } @@ -156,33 +156,33 @@ BOOL WINAPI SelectCMM( DWORD id )
BOOL WINAPI SetColorProfileElementReference( HPROFILE profile, TAGTYPE type, TAGTYPE ref ) { - FIXME( "( %p, 0x%08x, 0x%08x ) stub\n", profile, type, ref ); + FIXME( "( %p, %#lx, %#lx ) stub\n", profile, type, ref );
return TRUE; }
BOOL WINAPI SetColorProfileElementSize( HPROFILE profile, TAGTYPE type, DWORD size ) { - FIXME( "( %p, 0x%08x, 0x%08x ) stub\n", profile, type, size ); + FIXME( "( %p, %#lx, %#lx ) stub\n", profile, type, size );
return FALSE; }
BOOL WINAPI SetStandardColorSpaceProfileA( PCSTR machine, DWORD id, PSTR profile ) { - FIXME( "( 0x%08x, %p ) stub\n", id, profile ); + FIXME( "( %#lx, %p ) stub\n", id, profile ); return TRUE; }
BOOL WINAPI SetStandardColorSpaceProfileW( PCWSTR machine, DWORD id, PWSTR profile ) { - FIXME( "( 0x%08x, %p ) stub\n", id, profile ); + FIXME( "( %#lx, %p ) stub\n", id, profile ); return TRUE; }
BOOL WINAPI SpoolerCopyFileEvent( LPWSTR printer, LPWSTR key, DWORD event ) { - FIXME( "( %s, %s, 0x%08x ) stub\n", debugstr_w(printer), debugstr_w(key), event ); + FIXME( "( %s, %s, %#lx ) stub\n", debugstr_w(printer), debugstr_w(key), event ); return TRUE; }
diff --git a/dlls/mscms/tests/Makefile.in b/dlls/mscms/tests/Makefile.in index e9ff9724e2f..2d229c049ab 100644 --- a/dlls/mscms/tests/Makefile.in +++ b/dlls/mscms/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = mscms.dll IMPORTS = advapi32
diff --git a/dlls/mscms/tests/profile.c b/dlls/mscms/tests/profile.c index 7083b56f11d..a3082500fe7 100644 --- a/dlls/mscms/tests/profile.c +++ b/dlls/mscms/tests/profile.c @@ -161,29 +161,25 @@ static void test_GetColorDirectoryA(void) /* Parameter checks */
ret = pGetColorDirectoryA( NULL, NULL, NULL ); - ok( !ret, "GetColorDirectoryA() succeeded (%d)\n", GetLastError() ); + ok( !ret, "GetColorDirectoryA() succeeded (%lu)\n", GetLastError() );
size = 0; - ret = pGetColorDirectoryA( NULL, NULL, &size ); - ok( !ret && size > 0, "GetColorDirectoryA() succeeded (%d)\n", GetLastError() ); + ok( !ret && size > 0, "GetColorDirectoryA() succeeded (%lu)\n", GetLastError() );
size = 0; - ret = pGetColorDirectoryA( NULL, buffer, &size ); - ok( !ret && size > 0, "GetColorDirectoryA() succeeded (%d)\n", GetLastError() ); + ok( !ret && size > 0, "GetColorDirectoryA() succeeded (%lu)\n", GetLastError() );
size = 1; - ret = pGetColorDirectoryA( NULL, buffer, &size ); - ok( !ret && size > 0, "GetColorDirectoryA() succeeded (%d)\n", GetLastError() ); + ok( !ret && size > 0, "GetColorDirectoryA() succeeded (%lu)\n", GetLastError() );
/* Functional checks */
size = sizeof(buffer); - ret = pGetColorDirectoryA( NULL, buffer, &size ); - ok( ret && size > 0, "GetColorDirectoryA() failed (%d)\n", GetLastError() ); + ok( ret && size > 0, "GetColorDirectoryA() failed (%lu)\n", GetLastError() ); }
static void test_GetColorDirectoryW(void) @@ -195,33 +191,27 @@ static void test_GetColorDirectoryW(void) /* Parameter checks */
/* This one crashes win2k - ret = pGetColorDirectoryW( NULL, NULL, NULL ); - ok( !ret, "GetColorDirectoryW() succeeded (%d)\n", GetLastError() ); - + ok( !ret, "GetColorDirectoryW() succeeded (%lu)\n", GetLastError() ); */
size = 0; - ret = pGetColorDirectoryW( NULL, NULL, &size ); - ok( !ret && size > 0, "GetColorDirectoryW() succeeded (%d)\n", GetLastError() ); + ok( !ret && size > 0, "GetColorDirectoryW() succeeded (%lu)\n", GetLastError() );
size = 0; - ret = pGetColorDirectoryW( NULL, buffer, &size ); - ok( !ret && size > 0, "GetColorDirectoryW() succeeded (%d)\n", GetLastError() ); + ok( !ret && size > 0, "GetColorDirectoryW() succeeded (%lu)\n", GetLastError() );
size = 1; - ret = pGetColorDirectoryW( NULL, buffer, &size ); - ok( !ret && size > 0, "GetColorDirectoryW() succeeded (%d)\n", GetLastError() ); + ok( !ret && size > 0, "GetColorDirectoryW() succeeded (%lu)\n", GetLastError() );
/* Functional checks */
size = sizeof(buffer); - ret = pGetColorDirectoryW( NULL, buffer, &size ); - ok( ret && size > 0, "GetColorDirectoryW() failed (%d)\n", GetLastError() ); + ok( ret && size > 0, "GetColorDirectoryW() failed (%lu)\n", GetLastError() ); }
static void test_GetColorProfileElement( char *standardprofile ) @@ -241,15 +231,15 @@ static void test_GetColorProfileElement( char *standardprofile ) profile.cbDataSize = strlen(standardprofile);
handle = pOpenColorProfileA( &profile, PROFILE_READ, 0, OPEN_EXISTING ); - ok( handle != NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); + ok( handle != NULL, "OpenColorProfileA() failed (%lu)\n", GetLastError() );
/* Parameter checks */
ret = pGetColorProfileElement( handle, tag, 0, NULL, NULL, &ref ); - ok( !ret, "GetColorProfileElement() succeeded (%d)\n", GetLastError() ); + ok( !ret, "GetColorProfileElement() succeeded (%lu)\n", GetLastError() );
ret = pGetColorProfileElement( handle, tag, 0, &size, NULL, NULL ); - ok( !ret, "GetColorProfileElement() succeeded (%d)\n", GetLastError() ); + ok( !ret, "GetColorProfileElement() succeeded (%lu)\n", GetLastError() );
size = 0; ret = pGetColorProfileElement( handle, tag, 0, &size, NULL, &ref ); @@ -260,7 +250,7 @@ static void test_GetColorProfileElement( char *standardprofile )
size = sizeof(buffer); ret = pGetColorProfileElement( handle, tag, 0, &size, buffer, &ref ); - ok( ret, "GetColorProfileElement() failed %u\n", GetLastError() ); + ok( ret, "GetColorProfileElement() failed %lu\n", GetLastError() ); ok( size > 0, "wrong size\n" ); ok( !memcmp( buffer, expect, sizeof(expect)-1 ), "Unexpected tag data\n" );
@@ -283,27 +273,26 @@ static void test_GetColorProfileElementTag( char *standardprofile ) profile.cbDataSize = strlen(standardprofile);
handle = pOpenColorProfileA( &profile, PROFILE_READ, 0, OPEN_EXISTING ); - ok( handle != NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); + ok( handle != NULL, "OpenColorProfileA() failed (%lu)\n", GetLastError() );
/* Parameter checks */
ret = pGetColorProfileElementTag( NULL, index, &tag ); - ok( !ret, "GetColorProfileElementTag() succeeded (%d)\n", GetLastError() ); + ok( !ret, "GetColorProfileElementTag() succeeded (%lu)\n", GetLastError() );
ret = pGetColorProfileElementTag( handle, 0, &tag ); - ok( !ret, "GetColorProfileElementTag() succeeded (%d)\n", GetLastError() ); + ok( !ret, "GetColorProfileElementTag() succeeded (%lu)\n", GetLastError() );
ret = pGetColorProfileElementTag( handle, index, NULL ); - ok( !ret, "GetColorProfileElementTag() succeeded (%d)\n", GetLastError() ); + ok( !ret, "GetColorProfileElementTag() succeeded (%lu)\n", GetLastError() );
ret = pGetColorProfileElementTag( handle, 18, NULL ); - ok( !ret, "GetColorProfileElementTag() succeeded (%d)\n", GetLastError() ); + ok( !ret, "GetColorProfileElementTag() succeeded (%lu)\n", GetLastError() );
/* Functional checks */
while ((ret = pGetColorProfileElementTag( handle, index, &tag )) && tag != expect) index++; - ok( ret && tag == expect, "GetColorProfileElementTag() failed (%d)\n", - GetLastError() ); + ok( ret && tag == expect, "GetColorProfileElementTag() failed (%lu)\n", GetLastError() );
pCloseColorProfile( handle ); } @@ -325,38 +314,37 @@ static void test_GetColorProfileFromHandle( char *testprofile ) profile.cbDataSize = strlen(testprofile);
handle = pOpenColorProfileA( &profile, PROFILE_READ, 0, OPEN_EXISTING ); - ok( handle != NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); + ok( handle != NULL, "OpenColorProfileA() failed (%lu)\n", GetLastError() );
/* Parameter checks */
size = 0; - ret = pGetColorProfileFromHandle( handle, NULL, &size ); - ok( !ret && size > 0, "GetColorProfileFromHandle() failed (%d)\n", GetLastError() ); + ok( !ret && size > 0, "GetColorProfileFromHandle() failed (%lu)\n", GetLastError() );
if ((buffer = malloc( size ))) { ret = pGetColorProfileFromHandle( NULL, buffer, &size ); - ok( !ret, "GetColorProfileFromHandle() succeeded (%d)\n", GetLastError() ); + ok( !ret, "GetColorProfileFromHandle() succeeded (%lu)\n", GetLastError() );
ret = pGetColorProfileFromHandle( handle, buffer, NULL ); - ok( !ret, "GetColorProfileFromHandle() succeeded (%d)\n", GetLastError() ); + ok( !ret, "GetColorProfileFromHandle() succeeded (%lu)\n", GetLastError() );
/* Functional checks */
ret = pGetColorProfileFromHandle( handle, buffer, &size ); - ok( ret && size > 0, "GetColorProfileFromHandle() failed (%d)\n", GetLastError() ); + ok( ret && size > 0, "GetColorProfileFromHandle() failed (%lu)\n", GetLastError() );
header = (PROFILEHEADER *)buffer; - ok( header->phClass == 0x72746e6d, "wrong phClass %x\n", header->phClass ); - ok( header->phDataColorSpace == 0x20424752, "wrong phDataColorSpace %x\n", header->phDataColorSpace ); - ok( header->phConnectionSpace == 0x205a5958, "wrong phConnectionSpace %x\n", header->phConnectionSpace ); - ok( header->phSignature == 0x70736361, "wrong phSignature %x\n", header->phSignature ); - ok( header->phProfileFlags == 0x00000000, "wrong phProfileFlags %x\n", header->phProfileFlags ); - ok( header->phRenderingIntent == 0x00000000, "wrong phRenderingIntent %x\n", header->phRenderingIntent ); - ok( header->phIlluminant.ciexyzX == 0xd6f60000, "wrong phIlluminant.ciexyzX %x\n", header->phIlluminant.ciexyzX ); - ok( header->phIlluminant.ciexyzY == 0x00000100, "wrong phIlluminant.ciexyzY %x\n", header->phIlluminant.ciexyzY ); - ok( header->phIlluminant.ciexyzZ == 0x2dd30000, "wrong phIlluminant.ciexyzZ %x\n", header->phIlluminant.ciexyzZ ); + ok( header->phClass == 0x72746e6d, "wrong phClass %#lx\n", header->phClass ); + ok( header->phDataColorSpace == 0x20424752, "wrong phDataColorSpace %#lx\n", header->phDataColorSpace ); + ok( header->phConnectionSpace == 0x205a5958, "wrong phConnectionSpace %#lx\n", header->phConnectionSpace ); + ok( header->phSignature == 0x70736361, "wrong phSignature %#lx\n", header->phSignature ); + ok( header->phProfileFlags == 0x00000000, "wrong phProfileFlags %#lx\n", header->phProfileFlags ); + ok( header->phRenderingIntent == 0x00000000, "wrong phRenderingIntent %#lx\n", header->phRenderingIntent ); + ok( header->phIlluminant.ciexyzX == 0xd6f60000, "wrong phIlluminant.ciexyzX %#lx\n", header->phIlluminant.ciexyzX ); + ok( header->phIlluminant.ciexyzY == 0x00000100, "wrong phIlluminant.ciexyzY %#lx\n", header->phIlluminant.ciexyzY ); + ok( header->phIlluminant.ciexyzZ == 0x2dd30000, "wrong phIlluminant.ciexyzZ %#lx\n", header->phIlluminant.ciexyzZ ); free( buffer ); }
@@ -378,36 +366,36 @@ static void test_GetColorProfileHeader( char *testprofile ) profile.cbDataSize = strlen(testprofile);
handle = pOpenColorProfileA( &profile, PROFILE_READ, 0, OPEN_EXISTING ); - ok( handle != NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); + ok( handle != NULL, "OpenColorProfileA() failed (%lu)\n", GetLastError() );
/* Parameter checks */
ret = pGetColorProfileHeader( NULL, NULL ); - ok( !ret, "GetColorProfileHeader() succeeded (%d)\n", GetLastError() ); + ok( !ret, "GetColorProfileHeader() succeeded (%lu)\n", GetLastError() );
ret = pGetColorProfileHeader( NULL, &header ); - ok( !ret, "GetColorProfileHeader() succeeded (%d)\n", GetLastError() ); + ok( !ret, "GetColorProfileHeader() succeeded (%lu)\n", GetLastError() );
if (0) /* Crashes on Vista */ { ret = pGetColorProfileHeader( handle, NULL ); - ok( !ret, "GetColorProfileHeader() succeeded (%d)\n", GetLastError() ); + ok( !ret, "GetColorProfileHeader() succeeded (%lu)\n", GetLastError() ); }
/* Functional checks */
ret = pGetColorProfileHeader( handle, &header ); - ok( ret, "GetColorProfileHeader() failed (%d)\n", GetLastError() ); - - ok( header.phClass == 0x6d6e7472, "wrong phClass %x\n", header.phClass ); - ok( header.phDataColorSpace == 0x52474220, "wrong phDataColorSpace %x\n", header.phDataColorSpace ); - ok( header.phConnectionSpace == 0x58595a20, "wrong phConnectionSpace %x\n", header.phConnectionSpace ); - ok( header.phSignature == 0x61637370, "wrong phSignature %x\n", header.phSignature ); - ok( header.phProfileFlags == 0x00000000, "wrong phProfileFlags %x\n", header.phProfileFlags ); - ok( header.phRenderingIntent == 0x00000000, "wrong phRenderingIntent %x\n", header.phRenderingIntent ); - ok( header.phIlluminant.ciexyzX == 0x0000f6d6, "wrong phIlluminant.ciexyzX %x\n", header.phIlluminant.ciexyzX ); - ok( header.phIlluminant.ciexyzY == 0x00010000, "wrong phIlluminant.ciexyzY %x\n", header.phIlluminant.ciexyzY ); - ok( header.phIlluminant.ciexyzZ == 0x0000d32d, "wrong phIlluminant.ciexyzZ %x\n", header.phIlluminant.ciexyzZ ); + ok( ret, "GetColorProfileHeader() failed (%lu)\n", GetLastError() ); + + ok( header.phClass == 0x6d6e7472, "wrong phClass %#lx\n", header.phClass ); + ok( header.phDataColorSpace == 0x52474220, "wrong phDataColorSpace %#lx\n", header.phDataColorSpace ); + ok( header.phConnectionSpace == 0x58595a20, "wrong phConnectionSpace %#lx\n", header.phConnectionSpace ); + ok( header.phSignature == 0x61637370, "wrong phSignature %#lx\n", header.phSignature ); + ok( header.phProfileFlags == 0x00000000, "wrong phProfileFlags %#lx\n", header.phProfileFlags ); + ok( header.phRenderingIntent == 0x00000000, "wrong phRenderingIntent %#lx\n", header.phRenderingIntent ); + ok( header.phIlluminant.ciexyzX == 0x0000f6d6, "wrong phIlluminant.ciexyzX %#lx\n", header.phIlluminant.ciexyzX ); + ok( header.phIlluminant.ciexyzY == 0x00010000, "wrong phIlluminant.ciexyzY %#lx\n", header.phIlluminant.ciexyzY ); + ok( header.phIlluminant.ciexyzZ == 0x0000d32d, "wrong phIlluminant.ciexyzZ %#lx\n", header.phIlluminant.ciexyzZ );
pCloseColorProfile( handle ); } @@ -427,23 +415,21 @@ static void test_GetCountColorProfileElements( char *standardprofile ) profile.cbDataSize = strlen(standardprofile);
handle = pOpenColorProfileA( &profile, PROFILE_READ, 0, OPEN_EXISTING ); - ok( handle != NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); + ok( handle != NULL, "OpenColorProfileA() failed (%lu)\n", GetLastError() );
/* Parameter checks */
ret = pGetCountColorProfileElements( NULL, &count ); - ok( !ret, "GetCountColorProfileElements() succeeded (%d)\n", - GetLastError() ); + ok( !ret, "GetCountColorProfileElements() succeeded (%lu)\n", GetLastError() );
ret = pGetCountColorProfileElements( handle, NULL ); - ok( !ret, "GetCountColorProfileElements() succeeded (%d)\n", - GetLastError() ); + ok( !ret, "GetCountColorProfileElements() succeeded (%lu)\n", GetLastError() );
/* Functional checks */
ret = pGetCountColorProfileElements( handle, &count ); ok( ret && count > 15 && count < 20, - "GetCountColorProfileElements() failed (%d) %u\n", GetLastError(), count ); + "GetCountColorProfileElements() failed (%lu) %lu\n", GetLastError(), count );
pCloseColorProfile( handle ); } @@ -463,28 +449,32 @@ static void test_GetStandardColorSpaceProfileA( char *standardprofile ) size = sizeof(newprofile); SetLastError(0xfaceabee); /* 1st param, */ ret = pGetStandardColorSpaceProfileA(machine, LCS_sRGB, newprofile, &size); - ok( !ret && GetLastError() == ERROR_NOT_SUPPORTED, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); + ok( !ret && GetLastError() == ERROR_NOT_SUPPORTED, "GetStandardColorSpaceProfileA() returns %d (GLE=%lu)\n", + ret, GetLastError() );
size = sizeof(newprofile); SetLastError(0xfaceabee); /* 2nd param, */ ret = pGetStandardColorSpaceProfileA(NULL, (DWORD)-1, newprofile, &size); - ok( !ret && GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); + ok( !ret && GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileA() returns %d (GLE=%lu)\n", + ret, GetLastError() );
size = sizeof(newprofile); SetLastError(0xfaceabee); /* 4th param, */ ret = pGetStandardColorSpaceProfileA(NULL, LCS_sRGB, newprofile, NULL); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); + ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, "GetStandardColorSpaceProfileA() returns %d (GLE=%lu)\n", + ret, GetLastError() );
size = sizeof(newprofile); SetLastError(0xfaceabee); /* 3rd param, */ ret = pGetStandardColorSpaceProfileA(NULL, LCS_sRGB, NULL, &size); - ok( !ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); + ok( !ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetStandardColorSpaceProfileA() returns %d (GLE=%lu)\n", + ret, GetLastError() );
size = 0; SetLastError(0xfaceabee); /* dereferenced 4th param, */ ret = pGetStandardColorSpaceProfileA(NULL, LCS_sRGB, newprofile, &size); ok( !ret && (GetLastError() == ERROR_MORE_DATA || GetLastError() == ERROR_INSUFFICIENT_BUFFER), - "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); + "GetStandardColorSpaceProfileA() returns %d (GLE=%lu)\n", ret, GetLastError() );
/* Several invalid parameter checks: */
@@ -492,30 +482,32 @@ static void test_GetStandardColorSpaceProfileA( char *standardprofile ) SetLastError(0xfaceabee); /* 1st, maybe 2nd and then dereferenced 4th param, */ ret = pGetStandardColorSpaceProfileA(machine, 0, newprofile, &size); ok( !ret && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_NOT_SUPPORTED), - "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); + "GetStandardColorSpaceProfileA() returns %d (GLE=%lu)\n", ret, GetLastError() );
SetLastError(0xfaceabee); /* maybe 2nd and then 4th param, */ ret = pGetStandardColorSpaceProfileA(NULL, 0, newprofile, NULL); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); + ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, "GetStandardColorSpaceProfileA() returns %d (GLE=%lu)\n", + ret, GetLastError() );
size = 0; SetLastError(0xfaceabee); /* maybe 2nd, then 3rd and dereferenced 4th param, */ ret = pGetStandardColorSpaceProfileA(NULL, 0, NULL, &size); ok( !ret && (GetLastError() == ERROR_INSUFFICIENT_BUFFER || GetLastError() == ERROR_FILE_NOT_FOUND), - "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); + "GetStandardColorSpaceProfileA() returns %d (GLE=%lu)\n", ret, GetLastError() );
size = sizeof(newprofile); SetLastError(0xfaceabee); /* maybe 2nd param. */ ret = pGetStandardColorSpaceProfileA(NULL, 0, newprofile, &size); - if (!ret) ok( GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); + if (!ret) ok( GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileA() returns %d (GLE=%lu)\n", + ret, GetLastError() ); else ok( !lstrcmpiA( newprofile, "" ) && GetLastError() == 0xfaceabee, - "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() ); + "GetStandardColorSpaceProfileA() returns %d (GLE=%lu)\n", ret, GetLastError() );
/* Functional checks */
size = sizeof(oldprofile); ret = pGetStandardColorSpaceProfileA( NULL, LCS_sRGB, oldprofile, &size ); - ok( ret, "GetStandardColorSpaceProfileA() failed (%d)\n", GetLastError() ); + ok( ret, "GetStandardColorSpaceProfileA() failed (%lu)\n", GetLastError() );
SetLastError(0xdeadbeef); ret = pSetStandardColorSpaceProfileA( NULL, LCS_sRGB, standardprofile ); @@ -524,14 +516,14 @@ static void test_GetStandardColorSpaceProfileA( char *standardprofile ) skip("Not enough rights for SetStandardColorSpaceProfileA\n"); return; } - ok( ret, "SetStandardColorSpaceProfileA() failed (%d)\n", GetLastError() ); + ok( ret, "SetStandardColorSpaceProfileA() failed (%lu)\n", GetLastError() );
size = sizeof(newprofile); ret = pGetStandardColorSpaceProfileA( NULL, LCS_sRGB, newprofile, &size ); - ok( ret, "GetStandardColorSpaceProfileA() failed (%d)\n", GetLastError() ); + ok( ret, "GetStandardColorSpaceProfileA() failed (%lu)\n", GetLastError() );
ret = pSetStandardColorSpaceProfileA( NULL, LCS_sRGB, oldprofile ); - ok( ret, "SetStandardColorSpaceProfileA() failed (%d)\n", GetLastError() ); + ok( ret, "SetStandardColorSpaceProfileA() failed (%lu)\n", GetLastError() ); }
static void test_GetStandardColorSpaceProfileW( WCHAR *standardprofileW ) @@ -549,19 +541,21 @@ static void test_GetStandardColorSpaceProfileW( WCHAR *standardprofileW ) size = sizeof(newprofile); SetLastError(0xfaceabee); /* 1st param, */ ret = pGetStandardColorSpaceProfileW(machineW, LCS_sRGB, newprofile, &size); - ok( !ret && GetLastError() == ERROR_NOT_SUPPORTED, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); + ok( !ret && GetLastError() == ERROR_NOT_SUPPORTED, "GetStandardColorSpaceProfileW() returns %d (GLE=%lu)\n", + ret, GetLastError() );
size = sizeof(newprofile); SetLastError(0xfaceabee); /* 2nd param, */ ret = pGetStandardColorSpaceProfileW(NULL, (DWORD)-1, newprofile, &size); - ok( !ret && GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); + ok( !ret && GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileW() returns %d (GLE=%lu)\n", + ret, GetLastError() );
size = sizeof(newprofile); SetLastError(0xfaceabee); /* 2nd param, */ ret = pGetStandardColorSpaceProfileW(NULL, 0, newprofile, &size); ok( (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) || broken(ret), /* Win98 and WinME */ - "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); + "GetStandardColorSpaceProfileW() returns %d (GLE=%lu)\n", ret, GetLastError() );
size = sizeof(newprofile); SetLastError(0xfaceabee); /* 3rd param, */ @@ -569,12 +563,13 @@ static void test_GetStandardColorSpaceProfileW( WCHAR *standardprofileW ) ok( !ret || broken(ret) /* win98 */, "GetStandardColorSpaceProfileW succeeded\n" ); ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER || broken(GetLastError() == 0xfaceabee) /* win98 */, - "GetStandardColorSpaceProfileW() returns GLE=%u\n", GetLastError() ); + "GetStandardColorSpaceProfileW() returns GLE=%lu\n", GetLastError() );
size = sizeof(newprofile); SetLastError(0xfaceabee); /* 4th param, */ ret = pGetStandardColorSpaceProfileW(NULL, LCS_sRGB, newprofile, NULL); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); + ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, "GetStandardColorSpaceProfileW() returns %d (GLE=%lu)\n", + ret, GetLastError() );
size = 0; SetLastError(0xfaceabee); /* dereferenced 4th param. */ @@ -583,7 +578,7 @@ static void test_GetStandardColorSpaceProfileW( WCHAR *standardprofileW ) ok( GetLastError() == ERROR_MORE_DATA || GetLastError() == ERROR_INSUFFICIENT_BUFFER || broken(GetLastError() == 0xfaceabee) /* win98 */, - "GetStandardColorSpaceProfileW() returns GLE=%u\n", GetLastError() ); + "GetStandardColorSpaceProfileW() returns GLE=%lu\n", GetLastError() );
/* Several invalid parameter checks: */
@@ -591,11 +586,12 @@ static void test_GetStandardColorSpaceProfileW( WCHAR *standardprofileW ) SetLastError(0xfaceabee); /* 1st, maybe 2nd and then dereferenced 4th param, */ ret = pGetStandardColorSpaceProfileW(machineW, 0, newprofile, &size); ok( !ret && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_NOT_SUPPORTED), - "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); + "GetStandardColorSpaceProfileW() returns %d (GLE=%lu)\n", ret, GetLastError() );
SetLastError(0xfaceabee); /* maybe 2nd and then 4th param, */ ret = pGetStandardColorSpaceProfileW(NULL, 0, newprofile, NULL); - ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); + ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, "GetStandardColorSpaceProfileW() returns %d (GLE=%lu)\n", + ret, GetLastError() );
size = 0; SetLastError(0xfaceabee); /* maybe 2nd, then 3rd and dereferenced 4th param, */ @@ -604,24 +600,25 @@ static void test_GetStandardColorSpaceProfileW( WCHAR *standardprofileW ) ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER || GetLastError() == ERROR_FILE_NOT_FOUND || broken(GetLastError() == 0xfaceabee) /* win98 */, - "GetStandardColorSpaceProfileW() returns GLE=%u\n", GetLastError() ); + "GetStandardColorSpaceProfileW() returns GLE=%lu\n", GetLastError() );
size = sizeof(newprofile); SetLastError(0xfaceabee); /* maybe 2nd param. */ ret = pGetStandardColorSpaceProfileW(NULL, 0, newprofile, &size); - if (!ret) ok( GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); + if (!ret) ok( GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileW() returns %d (GLE=%lu)\n", + ret, GetLastError() ); else { WideCharToMultiByte(CP_ACP, 0, newprofile, -1, newprofileA, sizeof(newprofileA), NULL, NULL); ok( !lstrcmpiA( newprofileA, "" ) && GetLastError() == 0xfaceabee, - "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() ); + "GetStandardColorSpaceProfileW() returns %d (GLE=%lu)\n", ret, GetLastError() ); }
/* Functional checks */
size = sizeof(oldprofile); ret = pGetStandardColorSpaceProfileW( NULL, LCS_sRGB, oldprofile, &size ); - ok( ret, "GetStandardColorSpaceProfileW() failed (%d)\n", GetLastError() ); + ok( ret, "GetStandardColorSpaceProfileW() failed (%lu)\n", GetLastError() );
SetLastError(0xdeadbeef); ret = pSetStandardColorSpaceProfileW( NULL, LCS_sRGB, standardprofileW ); @@ -630,14 +627,14 @@ static void test_GetStandardColorSpaceProfileW( WCHAR *standardprofileW ) skip("Not enough rights for SetStandardColorSpaceProfileW\n"); return; } - ok( ret, "SetStandardColorSpaceProfileW() failed (%d)\n", GetLastError() ); + ok( ret, "SetStandardColorSpaceProfileW() failed (%lu)\n", GetLastError() );
size = sizeof(newprofile); ret = pGetStandardColorSpaceProfileW( NULL, LCS_sRGB, newprofile, &size ); - ok( ret, "GetStandardColorSpaceProfileW() failed (%d)\n", GetLastError() ); + ok( ret, "GetStandardColorSpaceProfileW() failed (%lu)\n", GetLastError() );
ret = pSetStandardColorSpaceProfileW( NULL, LCS_sRGB, oldprofile ); - ok( ret, "SetStandardColorSpaceProfileW() failed (%d)\n", GetLastError() ); + ok( ret, "SetStandardColorSpaceProfileW() failed (%lu)\n", GetLastError() ); }
static void test_EnumColorProfilesA( char *standardprofile ) @@ -660,7 +657,7 @@ static void test_EnumColorProfilesA( char *standardprofile ) SetLastError( 0xdeadbeef ); ret = pEnumColorProfilesA( NULL, &record, NULL, &total, &number ); ok( !ret, "EnumColorProfilesA succeeded\n" ); - if (have_color_profile) ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %u\n", GetLastError() ); + if (have_color_profile) ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %lu\n", GetLastError() ); buffer = malloc( total );
size = total; @@ -675,7 +672,7 @@ static void test_EnumColorProfilesA( char *standardprofile )
ret = pEnumColorProfilesA( NULL, &record, buffer, &size, &number ); todo_wine_if (!have_color_profile) - ok( ret, "EnumColorProfilesA failed %u\n", GetLastError() ); + ok( ret, "EnumColorProfilesA failed %lu\n", GetLastError() );
size = 0; ret = pEnumColorProfilesA( NULL, &record, buffer, &size, &number ); @@ -686,7 +683,7 @@ static void test_EnumColorProfilesA( char *standardprofile ) size = total; ret = pEnumColorProfilesA( NULL, &record, buffer, &size, &number ); todo_wine_if (!have_color_profile) - ok( ret, "EnumColorProfilesA failed %u\n", GetLastError() ); + ok( ret, "EnumColorProfilesA failed %lu\n", GetLastError() );
free( buffer ); } @@ -711,7 +708,7 @@ static void test_EnumColorProfilesW( WCHAR *standardprofileW ) SetLastError( 0xdeadbeef ); ret = pEnumColorProfilesW( NULL, &record, NULL, &total, &number ); ok( !ret, "EnumColorProfilesW succeeded\n" ); - if (have_color_profile) ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %u\n", GetLastError() ); + if (have_color_profile) ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %lu\n", GetLastError() ); buffer = malloc( total * sizeof(WCHAR) );
size = total; @@ -726,7 +723,7 @@ static void test_EnumColorProfilesW( WCHAR *standardprofileW )
ret = pEnumColorProfilesW( NULL, &record, buffer, &size, &number ); todo_wine_if (!have_color_profile) - ok( ret, "EnumColorProfilesW failed %u\n", GetLastError() ); + ok( ret, "EnumColorProfilesW failed %lu\n", GetLastError() );
size = 0; ret = pEnumColorProfilesW( NULL, &record, buffer, &size, &number ); @@ -737,7 +734,7 @@ static void test_EnumColorProfilesW( WCHAR *standardprofileW ) size = total; ret = pEnumColorProfilesW( NULL, &record, buffer, &size, &number ); todo_wine_if (!have_color_profile) - ok( ret, "EnumColorProfilesW failed %u\n", GetLastError() ); + ok( ret, "EnumColorProfilesW failed %lu\n", GetLastError() );
free( buffer ); } @@ -749,18 +746,18 @@ static void test_InstallColorProfileA( char *standardprofile, char *testprofile /* Parameter checks */
ret = pInstallColorProfileA( NULL, NULL ); - ok( !ret, "InstallColorProfileA() succeeded (%d)\n", GetLastError() ); + ok( !ret, "InstallColorProfileA() succeeded (%lu)\n", GetLastError() );
ret = pInstallColorProfileA( machine, NULL ); - ok( !ret, "InstallColorProfileA() succeeded (%d)\n", GetLastError() ); + ok( !ret, "InstallColorProfileA() succeeded (%lu)\n", GetLastError() );
ret = pInstallColorProfileA( NULL, machine ); - ok( !ret, "InstallColorProfileA() succeeded (%d)\n", GetLastError() ); + ok( !ret, "InstallColorProfileA() succeeded (%lu)\n", GetLastError() );
if (standardprofile) { ret = pInstallColorProfileA( NULL, standardprofile ); - ok( ret, "InstallColorProfileA() failed (%d)\n", GetLastError() ); + ok( ret, "InstallColorProfileA() failed (%lu)\n", GetLastError() ); }
/* Functional checks */ @@ -778,10 +775,10 @@ static void test_InstallColorProfileA( char *standardprofile, char *testprofile skip("Not enough rights for InstallColorProfileA\n"); return; } - ok( ret, "InstallColorProfileA() failed (%d)\n", GetLastError() ); + ok( ret, "InstallColorProfileA() failed (%lu)\n", GetLastError() );
ret = pGetColorDirectoryA( NULL, dest, &size ); - ok( ret, "GetColorDirectoryA() failed (%d)\n", GetLastError() ); + ok( ret, "GetColorDirectoryA() failed (%lu)\n", GetLastError() );
MSCMS_basenameA( testprofile, base );
@@ -790,11 +787,11 @@ static void test_InstallColorProfileA( char *standardprofile, char *testprofile
/* Check if the profile is really there */ handle = CreateFileA( dest, 0 , 0, NULL, OPEN_EXISTING, 0, NULL ); - ok( handle != INVALID_HANDLE_VALUE, "Couldn't find the profile (%d)\n", GetLastError() ); + ok( handle != INVALID_HANDLE_VALUE, "Couldn't find the profile (%lu)\n", GetLastError() ); CloseHandle( handle );
ret = pUninstallColorProfileA( NULL, dest, TRUE ); - ok( ret, "UninstallColorProfileA() failed (%d)\n", GetLastError() ); + ok( ret, "UninstallColorProfileA() failed (%lu)\n", GetLastError() ); } }
@@ -805,18 +802,18 @@ static void test_InstallColorProfileW( WCHAR *standardprofileW, WCHAR *testprofi /* Parameter checks */
ret = pInstallColorProfileW( NULL, NULL ); - ok( !ret, "InstallColorProfileW() succeeded (%d)\n", GetLastError() ); + ok( !ret, "InstallColorProfileW() succeeded (%lu)\n", GetLastError() );
ret = pInstallColorProfileW( machineW, NULL ); - ok( !ret, "InstallColorProfileW() succeeded (%d)\n", GetLastError() ); + ok( !ret, "InstallColorProfileW() succeeded (%lu)\n", GetLastError() );
ret = pInstallColorProfileW( NULL, machineW ); - ok( !ret, "InstallColorProfileW() failed (%d)\n", GetLastError() ); + ok( !ret, "InstallColorProfileW() failed (%lu)\n", GetLastError() );
if (standardprofileW) { ret = pInstallColorProfileW( NULL, standardprofileW ); - ok( ret, "InstallColorProfileW() failed (%d)\n", GetLastError() ); + ok( ret, "InstallColorProfileW() failed (%lu)\n", GetLastError() ); }
/* Functional checks */ @@ -834,10 +831,10 @@ static void test_InstallColorProfileW( WCHAR *standardprofileW, WCHAR *testprofi skip("Not enough rights for InstallColorProfileW\n"); return; } - ok( ret, "InstallColorProfileW() failed (%d)\n", GetLastError() ); + ok( ret, "InstallColorProfileW() failed (%lu)\n", GetLastError() );
ret = pGetColorDirectoryW( NULL, dest, &size ); - ok( ret, "GetColorDirectoryW() failed (%d)\n", GetLastError() ); + ok( ret, "GetColorDirectoryW() failed (%lu)\n", GetLastError() );
MSCMS_basenameW( testprofileW, base );
@@ -846,11 +843,11 @@ static void test_InstallColorProfileW( WCHAR *standardprofileW, WCHAR *testprofi
/* Check if the profile is really there */ handle = CreateFileW( dest, 0 , 0, NULL, OPEN_EXISTING, 0, NULL ); - ok( handle != INVALID_HANDLE_VALUE, "Couldn't find the profile (%d)\n", GetLastError() ); + ok( handle != INVALID_HANDLE_VALUE, "Couldn't find the profile (%lu)\n", GetLastError() ); CloseHandle( handle );
ret = pUninstallColorProfileW( NULL, dest, TRUE ); - ok( ret, "UninstallColorProfileW() failed (%d)\n", GetLastError() ); + ok( ret, "UninstallColorProfileW() failed (%lu)\n", GetLastError() ); } }
@@ -868,27 +865,27 @@ static void test_IsColorProfileTagPresent( char *standardprofile ) profile.cbDataSize = strlen(standardprofile);
handle = pOpenColorProfileA( &profile, PROFILE_READ, 0, OPEN_EXISTING ); - ok( handle != NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); + ok( handle != NULL, "OpenColorProfileA() failed (%lu)\n", GetLastError() );
/* Parameter checks */
tag = 0;
ret = pIsColorProfileTagPresent( handle, tag, &present ); - ok( !(ret && present), "IsColorProfileTagPresent() succeeded (%d)\n", GetLastError() ); + ok( !(ret && present), "IsColorProfileTagPresent() succeeded (%lu)\n", GetLastError() );
tag = 0x63707274; /* 'cprt' */
ret = pIsColorProfileTagPresent( NULL, tag, &present ); - ok( !ret, "IsColorProfileTagPresent() succeeded (%d)\n", GetLastError() ); + ok( !ret, "IsColorProfileTagPresent() succeeded (%lu)\n", GetLastError() );
ret = pIsColorProfileTagPresent( handle, tag, NULL ); - ok( !ret, "IsColorProfileTagPresent() succeeded (%d)\n", GetLastError() ); + ok( !ret, "IsColorProfileTagPresent() succeeded (%lu)\n", GetLastError() );
/* Functional checks */
ret = pIsColorProfileTagPresent( handle, tag, &present ); - ok( ret && present, "IsColorProfileTagPresent() failed (%d)\n", GetLastError() ); + ok( ret && present, "IsColorProfileTagPresent() failed (%lu)\n", GetLastError() );
pCloseColorProfile( handle ); } @@ -907,16 +904,16 @@ static void test_OpenColorProfileA( char *standardprofile ) /* Parameter checks */
handle = pOpenColorProfileA( NULL, 0, 0, 0 ); - ok( handle == NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); + ok( handle == NULL, "OpenColorProfileA() failed (%lu)\n", GetLastError() );
handle = pOpenColorProfileA( &profile, 0, 0, 0 ); - ok( handle == NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); + ok( handle == NULL, "OpenColorProfileA() failed (%lu)\n", GetLastError() );
handle = pOpenColorProfileA( &profile, PROFILE_READ, 0, 0 ); - ok( handle == NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); + ok( handle == NULL, "OpenColorProfileA() failed (%lu)\n", GetLastError() );
handle = pOpenColorProfileA( &profile, PROFILE_READWRITE, 0, 0 ); - ok( handle == NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); + ok( handle == NULL, "OpenColorProfileA() failed (%lu)\n", GetLastError() );
ok ( !pCloseColorProfile( NULL ), "CloseColorProfile() succeeded\n" );
@@ -926,31 +923,31 @@ static void test_OpenColorProfileA( char *standardprofile ) profile.cbDataSize = strlen(standardprofile);
handle = pOpenColorProfileA( &profile, 0, 0, 0 ); - ok( handle == NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); + ok( handle == NULL, "OpenColorProfileA() failed (%lu)\n", GetLastError() );
handle = pOpenColorProfileA( &profile, PROFILE_READ, 0, 0 ); - ok( handle == NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); + ok( handle == NULL, "OpenColorProfileA() failed (%lu)\n", GetLastError() );
handle = pOpenColorProfileA( &profile, PROFILE_READ|PROFILE_READWRITE, 0, 0 ); - ok( handle == NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); + ok( handle == NULL, "OpenColorProfileA() failed (%lu)\n", GetLastError() );
/* Functional checks */
handle = pOpenColorProfileA( &profile, PROFILE_READ, 0, OPEN_EXISTING ); - ok( handle != NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); + ok( handle != NULL, "OpenColorProfileA() failed (%lu)\n", GetLastError() );
ret = pCloseColorProfile( handle ); - ok( ret, "CloseColorProfile() failed (%d)\n", GetLastError() ); + ok( ret, "CloseColorProfile() failed (%lu)\n", GetLastError() );
profile.dwType = PROFILE_FILENAME; profile.pProfileData = (void *)"sRGB Color Space Profile.icm"; profile.cbDataSize = sizeof("sRGB Color Space Profile.icm");
handle = pOpenColorProfileA( &profile, PROFILE_READ, FILE_SHARE_READ, OPEN_EXISTING ); - ok( handle != NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); + ok( handle != NULL, "OpenColorProfileA() failed (%lu)\n", GetLastError() );
ret = pCloseColorProfile( handle ); - ok( ret, "CloseColorProfile() failed (%d)\n", GetLastError() ); + ok( ret, "CloseColorProfile() failed (%lu)\n", GetLastError() ); } }
@@ -967,16 +964,16 @@ static void test_OpenColorProfileW( WCHAR *standardprofileW ) /* Parameter checks */
handle = pOpenColorProfileW( NULL, 0, 0, 0 ); - ok( handle == NULL, "OpenColorProfileW() failed (%d)\n", GetLastError() ); + ok( handle == NULL, "OpenColorProfileW() failed (%lu)\n", GetLastError() );
handle = pOpenColorProfileW( &profile, 0, 0, 0 ); - ok( handle == NULL, "OpenColorProfileW() failed (%d)\n", GetLastError() ); + ok( handle == NULL, "OpenColorProfileW() failed (%lu)\n", GetLastError() );
handle = pOpenColorProfileW( &profile, PROFILE_READ, 0, 0 ); - ok( handle == NULL, "OpenColorProfileW() failed (%d)\n", GetLastError() ); + ok( handle == NULL, "OpenColorProfileW() failed (%lu)\n", GetLastError() );
handle = pOpenColorProfileW( &profile, PROFILE_READWRITE, 0, 0 ); - ok( handle == NULL, "OpenColorProfileW() failed (%d)\n", GetLastError() ); + ok( handle == NULL, "OpenColorProfileW() failed (%lu)\n", GetLastError() );
ok ( !pCloseColorProfile( NULL ), "CloseColorProfile() succeeded\n" );
@@ -986,21 +983,21 @@ static void test_OpenColorProfileW( WCHAR *standardprofileW ) profile.cbDataSize = lstrlenW(standardprofileW) * sizeof(WCHAR);
handle = pOpenColorProfileW( &profile, 0, 0, 0 ); - ok( handle == NULL, "OpenColorProfileW() failed (%d)\n", GetLastError() ); + ok( handle == NULL, "OpenColorProfileW() failed (%lu)\n", GetLastError() );
handle = pOpenColorProfileW( &profile, PROFILE_READ, 0, 0 ); - ok( handle == NULL, "OpenColorProfileW() failed (%d)\n", GetLastError() ); + ok( handle == NULL, "OpenColorProfileW() failed (%lu)\n", GetLastError() );
handle = pOpenColorProfileW( &profile, PROFILE_READ|PROFILE_READWRITE, 0, 0 ); - ok( handle == NULL, "OpenColorProfileW() failed (%d)\n", GetLastError() ); + ok( handle == NULL, "OpenColorProfileW() failed (%lu)\n", GetLastError() );
/* Functional checks */
handle = pOpenColorProfileW( &profile, PROFILE_READ, 0, OPEN_EXISTING ); - ok( handle != NULL, "OpenColorProfileW() failed (%d)\n", GetLastError() ); + ok( handle != NULL, "OpenColorProfileW() failed (%lu)\n", GetLastError() );
ret = pCloseColorProfile( handle ); - ok( ret, "CloseColorProfile() failed (%d)\n", GetLastError() ); + ok( ret, "CloseColorProfile() failed (%lu)\n", GetLastError() ); } }
@@ -1024,41 +1021,41 @@ static void test_SetColorProfileElement( char *testprofile ) /* Parameter checks */
handle = pOpenColorProfileA( &profile, PROFILE_READ, 0, OPEN_EXISTING ); - ok( handle != NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); + ok( handle != NULL, "OpenColorProfileA() failed (%lu)\n", GetLastError() );
ret = pSetColorProfileElement( handle, tag, 0, &size, data ); - ok( !ret, "SetColorProfileElement() succeeded (%d)\n", GetLastError() ); + ok( !ret, "SetColorProfileElement() succeeded (%lu)\n", GetLastError() );
pCloseColorProfile( handle );
handle = pOpenColorProfileA( &profile, PROFILE_READWRITE, 0, OPEN_EXISTING ); - ok( handle != NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); + ok( handle != NULL, "OpenColorProfileA() failed (%lu)\n", GetLastError() );
ret = pSetColorProfileElement( NULL, 0, 0, NULL, NULL ); - ok( !ret, "SetColorProfileElement() succeeded (%d)\n", GetLastError() ); + ok( !ret, "SetColorProfileElement() succeeded (%lu)\n", GetLastError() );
ret = pSetColorProfileElement( handle, 0, 0, NULL, NULL ); - ok( !ret, "SetColorProfileElement() succeeded (%d)\n", GetLastError() ); + ok( !ret, "SetColorProfileElement() succeeded (%lu)\n", GetLastError() );
ret = pSetColorProfileElement( handle, tag, 0, NULL, NULL ); - ok( !ret, "SetColorProfileElement() succeeded (%d)\n", GetLastError() ); + ok( !ret, "SetColorProfileElement() succeeded (%lu)\n", GetLastError() );
ret = pSetColorProfileElement( handle, tag, 0, &size, NULL ); - ok( !ret, "SetColorProfileElement() succeeded (%d)\n", GetLastError() ); + ok( !ret, "SetColorProfileElement() succeeded (%lu)\n", GetLastError() );
/* Functional checks */
size = sizeof(data); ret = pSetColorProfileElement( handle, tag, 0, &size, data ); - ok( ret, "SetColorProfileElement() failed %u\n", GetLastError() ); + ok( ret, "SetColorProfileElement() failed %lu\n", GetLastError() );
size = sizeof(buffer); ret = pGetColorProfileElement( handle, tag, 0, &size, buffer, &ref ); - ok( ret, "GetColorProfileElement() failed %u\n", GetLastError() ); + ok( ret, "GetColorProfileElement() failed %lu\n", GetLastError() ); ok( size > 0, "wrong size\n" );
ok( !memcmp( data, buffer, sizeof(data) ), - "Unexpected tag data, expected %s, got %s (%u)\n", data, buffer, GetLastError() ); + "Unexpected tag data, expected %s, got %s (%lu)\n", data, buffer, GetLastError() );
pCloseColorProfile( handle ); } @@ -1102,32 +1099,32 @@ static void test_SetColorProfileHeader( char *testprofile ) /* Parameter checks */
handle = pOpenColorProfileA( &profile, PROFILE_READ, 0, OPEN_EXISTING ); - ok( handle != NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); + ok( handle != NULL, "OpenColorProfileA() failed (%lu)\n", GetLastError() );
ret = pSetColorProfileHeader( handle, &header ); - ok( !ret, "SetColorProfileHeader() succeeded (%d)\n", GetLastError() ); + ok( !ret, "SetColorProfileHeader() succeeded (%lu)\n", GetLastError() );
pCloseColorProfile( handle );
handle = pOpenColorProfileA( &profile, PROFILE_READWRITE, 0, OPEN_EXISTING ); - ok( handle != NULL, "OpenColorProfileA() failed (%d)\n", GetLastError() ); + ok( handle != NULL, "OpenColorProfileA() failed (%lu)\n", GetLastError() );
ret = pSetColorProfileHeader( NULL, NULL ); - ok( !ret, "SetColorProfileHeader() succeeded (%d)\n", GetLastError() ); + ok( !ret, "SetColorProfileHeader() succeeded (%lu)\n", GetLastError() );
ret = pSetColorProfileHeader( handle, NULL ); - ok( !ret, "SetColorProfileHeader() succeeded (%d)\n", GetLastError() ); + ok( !ret, "SetColorProfileHeader() succeeded (%lu)\n", GetLastError() );
ret = pSetColorProfileHeader( NULL, &header ); - ok( !ret, "SetColorProfileHeader() succeeded (%d)\n", GetLastError() ); + ok( !ret, "SetColorProfileHeader() succeeded (%lu)\n", GetLastError() );
/* Functional checks */
ret = pSetColorProfileHeader( handle, &header ); - ok( ret, "SetColorProfileHeader() failed (%d)\n", GetLastError() ); + ok( ret, "SetColorProfileHeader() failed (%lu)\n", GetLastError() );
ret = pGetColorProfileHeader( handle, &header ); - ok( ret, "GetColorProfileHeader() failed (%d)\n", GetLastError() ); + ok( ret, "GetColorProfileHeader() failed (%lu)\n", GetLastError() );
ok( !memcmp( &header, rgbheader, sizeof(rgbheader) ), "Unexpected header data\n" );
@@ -1142,10 +1139,10 @@ static void test_UninstallColorProfileA( char *testprofile ) /* Parameter checks */
ret = pUninstallColorProfileA( NULL, NULL, FALSE ); - ok( !ret, "UninstallColorProfileA() succeeded (%d)\n", GetLastError() ); + ok( !ret, "UninstallColorProfileA() succeeded (%lu)\n", GetLastError() );
ret = pUninstallColorProfileA( machine, NULL, FALSE ); - ok( !ret, "UninstallColorProfileA() succeeded (%d)\n", GetLastError() ); + ok( !ret, "UninstallColorProfileA() succeeded (%lu)\n", GetLastError() );
/* Functional checks */
@@ -1162,10 +1159,10 @@ static void test_UninstallColorProfileA( char *testprofile ) skip("Not enough rights for InstallColorProfileA\n"); return; } - ok( ret, "InstallColorProfileA() failed (%d)\n", GetLastError() ); + ok( ret, "InstallColorProfileA() failed (%lu)\n", GetLastError() );
ret = pGetColorDirectoryA( NULL, dest, &size ); - ok( ret, "GetColorDirectoryA() failed (%d)\n", GetLastError() ); + ok( ret, "GetColorDirectoryA() failed (%lu)\n", GetLastError() );
MSCMS_basenameA( testprofile, base );
@@ -1173,11 +1170,11 @@ static void test_UninstallColorProfileA( char *testprofile ) lstrcatA( dest, base );
ret = pUninstallColorProfileA( NULL, dest, TRUE ); - ok( ret, "UninstallColorProfileA() failed (%d)\n", GetLastError() ); + ok( ret, "UninstallColorProfileA() failed (%lu)\n", GetLastError() );
/* Check if the profile is really gone */ handle = CreateFileA( dest, 0 , 0, NULL, OPEN_EXISTING, 0, NULL ); - ok( handle == INVALID_HANDLE_VALUE, "Found the profile (%d)\n", GetLastError() ); + ok( handle == INVALID_HANDLE_VALUE, "Found the profile (%lu)\n", GetLastError() ); CloseHandle( handle ); } } @@ -1189,10 +1186,10 @@ static void test_UninstallColorProfileW( WCHAR *testprofileW ) /* Parameter checks */
ret = pUninstallColorProfileW( NULL, NULL, FALSE ); - ok( !ret, "UninstallColorProfileW() succeeded (%d)\n", GetLastError() ); + ok( !ret, "UninstallColorProfileW() succeeded (%lu)\n", GetLastError() );
ret = pUninstallColorProfileW( machineW, NULL, FALSE ); - ok( !ret, "UninstallColorProfileW() succeeded (%d)\n", GetLastError() ); + ok( !ret, "UninstallColorProfileW() succeeded (%lu)\n", GetLastError() );
/* Functional checks */
@@ -1211,10 +1208,10 @@ static void test_UninstallColorProfileW( WCHAR *testprofileW ) skip("Not enough rights for InstallColorProfileW\n"); return; } - ok( ret, "InstallColorProfileW() failed (%d)\n", GetLastError() ); + ok( ret, "InstallColorProfileW() failed (%lu)\n", GetLastError() );
ret = pGetColorDirectoryW( NULL, dest, &size ); - ok( ret, "GetColorDirectoryW() failed (%d)\n", GetLastError() ); + ok( ret, "GetColorDirectoryW() failed (%lu)\n", GetLastError() );
MSCMS_basenameW( testprofileW, base );
@@ -1222,13 +1219,13 @@ static void test_UninstallColorProfileW( WCHAR *testprofileW ) lstrcatW( dest, base );
ret = pUninstallColorProfileW( NULL, dest, TRUE ); - ok( ret, "UninstallColorProfileW() failed (%d)\n", GetLastError() ); + ok( ret, "UninstallColorProfileW() failed (%lu)\n", GetLastError() );
bytes_copied = WideCharToMultiByte(CP_ACP, 0, dest, -1, destA, MAX_PATH, NULL, NULL); ok( bytes_copied > 0 , "WideCharToMultiByte() returns %d\n", bytes_copied); /* Check if the profile is really gone */ handle = CreateFileA( destA, 0 , 0, NULL, OPEN_EXISTING, 0, NULL ); - ok( handle == INVALID_HANDLE_VALUE, "Found the profile (%d)\n", GetLastError() ); + ok( handle == INVALID_HANDLE_VALUE, "Found the profile (%lu)\n", GetLastError() ); CloseHandle( handle ); } } @@ -1255,56 +1252,56 @@ static void test_AssociateColorProfileWithDeviceA( char *testprofile ) ret = pAssociateColorProfileWithDeviceA( "machine", testprofile, NULL ); error = GetLastError(); ok( !ret, "AssociateColorProfileWithDevice() succeeded\n" ); - ok( error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", error );
SetLastError(0xdeadbeef); ret = pAssociateColorProfileWithDeviceA( "machine", NULL, monitor.DeviceID ); error = GetLastError(); ok( !ret, "AssociateColorProfileWithDevice() succeeded\n" ); - ok( error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", error );
SetLastError(0xdeadbeef); ret = pAssociateColorProfileWithDeviceA( "machine", testprofile, monitor.DeviceID ); error = GetLastError(); ok( !ret, "AssociateColorProfileWithDevice() succeeded\n" ); - ok( error == ERROR_NOT_SUPPORTED, "expected ERROR_NOT_SUPPORTED, got %u\n", error ); + ok( error == ERROR_NOT_SUPPORTED, "expected ERROR_NOT_SUPPORTED, got %lu\n", error );
ret = pInstallColorProfileA( NULL, testprofile ); - ok( ret, "InstallColorProfileA() failed (%u)\n", GetLastError() ); + ok( ret, "InstallColorProfileA() failed (%lu)\n", GetLastError() );
ret = pGetColorDirectoryA( NULL, profile, &size ); - ok( ret, "GetColorDirectoryA() failed (%d)\n", GetLastError() ); + ok( ret, "GetColorDirectoryA() failed (%lu)\n", GetLastError() );
MSCMS_basenameA( testprofile, basename ); lstrcatA( profile, "\" ); lstrcatA( profile, basename );
ret = pAssociateColorProfileWithDeviceA( NULL, profile, monitor.DeviceID ); - ok( ret, "AssociateColorProfileWithDevice() failed (%u)\n", GetLastError() ); + ok( ret, "AssociateColorProfileWithDevice() failed (%lu)\n", GetLastError() );
SetLastError(0xdeadbeef); ret = pDisassociateColorProfileFromDeviceA( "machine", profile, NULL ); error = GetLastError(); ok( !ret, "DisassociateColorProfileFromDeviceA() succeeded\n" ); - ok( error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", error );
SetLastError(0xdeadbeef); ret = pDisassociateColorProfileFromDeviceA( "machine", NULL, monitor.DeviceID ); error = GetLastError(); ok( !ret, "DisassociateColorProfileFromDeviceA() succeeded\n" ); - ok( error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %u\n", error ); + ok( error == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %lu\n", error );
SetLastError(0xdeadbeef); ret = pDisassociateColorProfileFromDeviceA( "machine", profile, monitor.DeviceID ); error = GetLastError(); ok( !ret, "DisassociateColorProfileFromDeviceA() succeeded\n" ); - ok( error == ERROR_NOT_SUPPORTED, "expected ERROR_NOT_SUPPORTED, got %u\n", error ); + ok( error == ERROR_NOT_SUPPORTED, "expected ERROR_NOT_SUPPORTED, got %lu\n", error );
ret = pDisassociateColorProfileFromDeviceA( NULL, profile, monitor.DeviceID ); - ok( ret, "DisassociateColorProfileFromDeviceA() failed (%u)\n", GetLastError() ); + ok( ret, "DisassociateColorProfileFromDeviceA() failed (%lu)\n", GetLastError() );
ret = pUninstallColorProfileA( NULL, profile, TRUE ); - ok( ret, "UninstallColorProfileA() failed (%d)\n", GetLastError() ); + ok( ret, "UninstallColorProfileA() failed (%lu)\n", GetLastError() ); } else skip("Unable to obtain monitor name\n"); @@ -1340,17 +1337,17 @@ static void test_CreateMultiProfileTransform( char *standardprofile, char *testp profile.cbDataSize = strlen(standardprofile);
handle[0] = pOpenColorProfileA( &profile, PROFILE_READ, 0, OPEN_EXISTING ); - ok( handle[0] != NULL, "got %u\n", GetLastError() ); + ok( handle[0] != NULL, "got %lu\n", GetLastError() );
profile.dwType = PROFILE_FILENAME; profile.pProfileData = testprofile; profile.cbDataSize = strlen(testprofile);
handle[1] = pOpenColorProfileA( &profile, PROFILE_READ, 0, OPEN_EXISTING ); - ok( handle[1] != NULL, "got %u\n", GetLastError() ); + ok( handle[1] != NULL, "got %lu\n", GetLastError() );
transform = pCreateMultiProfileTransform( handle, 2, intents, 2, 0, 0 ); - ok( transform != NULL, "got %u\n", GetLastError() ); + ok( transform != NULL, "got %lu\n", GetLastError() );
pDeleteColorTransform( transform ); pCloseColorProfile( handle[0] ); @@ -1387,7 +1384,7 @@ START_TEST(profile)
/* See if we can find the standard color profile */ ret = GetSystemDirectoryA( profilefile1, sizeof(profilefile1) ); - ok( ret > 0, "GetSystemDirectoryA() returns %d, LastError = %d\n", ret, GetLastError()); + ok( ret > 0, "GetSystemDirectoryA() returns %d, LastError = %lu\n", ret, GetLastError()); ok(profilefile1[0] && lstrlenA(profilefile1) < MAX_PATH, "Expected length between 0 and MAX_PATH, got %d\n", lstrlenA(profilefile1)); MultiByteToWideChar(CP_ACP, 0, profilefile1, -1, profilefile1W, MAX_PATH); diff --git a/dlls/mscms/transform.c b/dlls/mscms/transform.c index 8296341f7b7..0d48e217d66 100644 --- a/dlls/mscms/transform.c +++ b/dlls/mscms/transform.c @@ -48,13 +48,13 @@ static DWORD from_bmformat( BMFORMAT format ) default: if (!quietfixme) { - FIXME( "unhandled bitmap format %08x\n", format ); + FIXME( "unhandled bitmap format %#x\n", format ); quietfixme = TRUE; } ret = TYPE_RGB_8; break; } - TRACE( "color space: %08x -> %08x\n", format, ret ); + TRACE( "color space: %#x -> %#lx\n", format, ret ); return ret; }
@@ -76,7 +76,7 @@ static DWORD from_type( COLORTYPE type ) break; }
- TRACE( "color type: %08x -> %08x\n", type, ret ); + TRACE( "color type: %#x -> %#lx\n", type, ret ); return ret; }
@@ -85,13 +85,12 @@ static DWORD from_type( COLORTYPE type ) * * See CreateColorTransformW. */ -HTRANSFORM WINAPI CreateColorTransformA( LPLOGCOLORSPACEA space, HPROFILE dest, - HPROFILE target, DWORD flags ) +HTRANSFORM WINAPI CreateColorTransformA( LPLOGCOLORSPACEA space, HPROFILE dest, HPROFILE target, DWORD flags ) { LOGCOLORSPACEW spaceW; DWORD len;
- TRACE( "( %p, %p, %p, 0x%08x )\n", space, dest, target, flags ); + TRACE( "( %p, %p, %p, %#lx )\n", space, dest, target, flags );
if (!space || !dest) return FALSE;
@@ -119,8 +118,7 @@ HTRANSFORM WINAPI CreateColorTransformA( LPLOGCOLORSPACEA space, HPROFILE dest, * Success: Handle to a transform. * Failure: NULL */ -HTRANSFORM WINAPI CreateColorTransformW( LPLOGCOLORSPACEW space, HPROFILE dest, - HPROFILE target, DWORD flags ) +HTRANSFORM WINAPI CreateColorTransformW( LPLOGCOLORSPACEW space, HPROFILE dest, HPROFILE target, DWORD flags ) { HTRANSFORM ret = NULL; cmsHTRANSFORM transform; @@ -129,7 +127,7 @@ HTRANSFORM WINAPI CreateColorTransformW( LPLOGCOLORSPACEW space, HPROFILE dest, cmsHPROFILE input; int intent;
- TRACE( "( %p, %p, %p, 0x%08x )\n", space, dest, target, flags ); + TRACE( "( %p, %p, %p, %#lx )\n", space, dest, target, flags );
if (!space || !(dst = grab_profile( dest ))) return FALSE;
@@ -140,7 +138,7 @@ HTRANSFORM WINAPI CreateColorTransformW( LPLOGCOLORSPACEW space, HPROFILE dest, } intent = space->lcsIntent > 3 ? INTENT_PERCEPTUAL : space->lcsIntent;
- TRACE( "lcsIntent: %x\n", space->lcsIntent ); + TRACE( "lcsIntent: %#lx\n", space->lcsIntent ); TRACE( "lcsCSType: %s\n", dbgstr_tag( space->lcsCSType ) ); TRACE( "lcsFilename: %s\n", debugstr_w( space->lcsFilename ) );
@@ -186,8 +184,7 @@ HTRANSFORM WINAPI CreateMultiProfileTransform( PHPROFILE profiles, DWORD nprofil cmsHTRANSFORM transform; struct profile *profile0, *profile1;
- TRACE( "( %p, 0x%08x, %p, 0x%08x, 0x%08x, 0x%08x )\n", - profiles, nprofiles, intents, nintents, flags, cmm ); + TRACE( "( %p, %#lx, %p, %lu, %#lx, %#lx )\n", profiles, nprofiles, intents, nintents, flags, cmm );
if (!profiles || !nprofiles || !intents) return NULL;
@@ -265,7 +262,7 @@ BOOL WINAPI TranslateBitmapBits( HTRANSFORM handle, PVOID srcbits, BMFORMAT inpu BOOL ret; cmsHTRANSFORM transform = grab_transform( handle );
- TRACE( "( %p, %p, 0x%08x, 0x%08x, 0x%08x, 0x%08x, %p, 0x%08x, 0x%08x, %p, 0x%08x )\n", + TRACE( "( %p, %p, %#x, %lu, %lu, %lu, %p, %#x, %lu, %p, %#lx )\n", handle, srcbits, input, width, height, inputstride, destbits, output, outputstride, callback, data );
@@ -300,7 +297,7 @@ BOOL WINAPI TranslateColors( HTRANSFORM handle, PCOLOR in, DWORD count, unsigned int i; cmsHTRANSFORM transform = grab_transform( handle );
- TRACE( "( %p, %p, %d, %d, %p, %d )\n", handle, in, count, input_type, out, output_type ); + TRACE( "( %p, %p, %lu, %d, %p, %d )\n", handle, in, count, input_type, out, output_type );
if (!transform) return FALSE;