#include "wine/test.h"
-HMODULE hmscms;
-HMODULE huser32;
+static HMODULE hmscms;
+static HMODULE huser32;
static BOOL (WINAPI *pAssociateColorProfileWithDeviceA)(PCSTR,PCSTR,PCSTR);
static BOOL (WINAPI *pCloseColorProfile)(HPROFILE);
static BOOL (WINAPI *pUninstallColorProfileA)(PCSTR,PCSTR,BOOL);
static BOOL (WINAPI *pUninstallColorProfileW)(PCWSTR,PCWSTR,BOOL);
-static BOOL (WINAPI *pEnumDisplayDevicesA)(LPCSTR,DWORD,PDISPLAY_DEVICE,DWORD);
+static BOOL (WINAPI *pEnumDisplayDevicesA)(LPCSTR,DWORD,PDISPLAY_DEVICEA,DWORD);
#define GETFUNCPTR(func) p##func = (void *)GetProcAddress( hmscms, #func ); \
if (!p##func) return FALSE;
'c','o','l','o','r','\\','s','r','g','b',' ','c','o','l','o','r',' ',
's','p','a','c','e',' ','p','r','o','f','i','l','e','.','i','c','m',0 };
+static BOOL have_color_profile;
+
static const unsigned char rgbheader[] =
{ 0x48, 0x0c, 0x00, 0x00, 0x6f, 0x6e, 0x69, 0x4c, 0x00, 0x00, 0x10, 0x02,
0x72, 0x74, 0x6e, 0x6d, 0x20, 0x42, 0x47, 0x52, 0x20, 0x5a, 0x59, 0x58,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, 0xf6, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x2d, 0xd3, 0x00, 0x00, 0x20, 0x20, 0x50, 0x48 };
-static LPSTR standardprofile;
-static LPWSTR standardprofileW;
-
-static LPSTR testprofile;
-static LPWSTR testprofileW;
-
#define IS_SEPARATOR(ch) ((ch) == '\\' || (ch) == '/')
static void MSCMS_basenameA( LPCSTR path, LPSTR name )
ok( ret && size > 0, "GetColorDirectoryW() failed (%d)\n", GetLastError() );
}
-static void test_GetColorProfileElement(void)
+static void test_GetColorProfileElement( char *standardprofile )
{
if (standardprofile)
{
ok( !ret, "GetColorProfileElement() succeeded (%d)\n", GetLastError() );
size = 0;
-
ret = pGetColorProfileElement( handle, tag, 0, &size, NULL, &ref );
- ok( !ret && size > 0, "GetColorProfileElement() succeeded (%d)\n", GetLastError() );
-
- size = sizeof(buffer);
+ ok( !ret, "GetColorProfileElement() succeeded\n" );
+ ok( size > 0, "wrong size\n" );
/* Functional checks */
+ size = sizeof(buffer);
ret = pGetColorProfileElement( handle, tag, 0, &size, buffer, &ref );
- ok( ret && size > 0, "GetColorProfileElement() failed (%d)\n", GetLastError() );
-
+ ok( ret, "GetColorProfileElement() failed %u\n", GetLastError() );
+ ok( size > 0, "wrong size\n" );
ok( !memcmp( buffer, expect, sizeof(expect) ), "Unexpected tag data\n" );
pCloseColorProfile( handle );
}
}
-static void test_GetColorProfileElementTag(void)
+static void test_GetColorProfileElementTag( char *standardprofile )
{
if (standardprofile)
{
}
}
-static void test_GetColorProfileFromHandle(void)
+static void test_GetColorProfileFromHandle( char *testprofile )
{
if (testprofile)
{
}
}
-static void test_GetColorProfileHeader(void)
+static void test_GetColorProfileHeader( char *testprofile )
{
if (testprofile)
{
}
}
-static void test_GetCountColorProfileElements(void)
+static void test_GetCountColorProfileElements( char *standardprofile )
{
if (standardprofile)
{
}
}
-static void test_GetStandardColorSpaceProfileA(void)
+static void test_GetStandardColorSpaceProfileA( char *standardprofile )
{
BOOL ret;
DWORD size;
CHAR oldprofile[MAX_PATH];
CHAR newprofile[MAX_PATH];
- const CHAR emptyA[] = "";
- DWORD zero = 0;
- DWORD sizeP = sizeof(newprofile);
/* Parameter checks */
/* Single invalid parameter checks: */
+ size = sizeof(newprofile);
SetLastError(0xfaceabee); /* 1st param, */
- ret = pGetStandardColorSpaceProfileA(machine, LCS_sRGB, newprofile, &sizeP);
+ ret = pGetStandardColorSpaceProfileA(machine, LCS_sRGB, newprofile, &size);
ok( !ret && GetLastError() == ERROR_NOT_SUPPORTED, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() );
+ size = sizeof(newprofile);
SetLastError(0xfaceabee); /* 2nd param, */
- ret = pGetStandardColorSpaceProfileA(NULL, (DWORD)-1, newprofile, &sizeP);
+ ret = pGetStandardColorSpaceProfileA(NULL, (DWORD)-1, newprofile, &size);
ok( !ret && GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\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() );
+ size = sizeof(newprofile);
SetLastError(0xfaceabee); /* 3rd param, */
- ret = pGetStandardColorSpaceProfileA(NULL, LCS_sRGB, NULL, &sizeP);
+ ret = pGetStandardColorSpaceProfileA(NULL, LCS_sRGB, NULL, &size);
ok( !ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() );
+ size = 0;
SetLastError(0xfaceabee); /* dereferenced 4th param, */
- ret = pGetStandardColorSpaceProfileA(NULL, LCS_sRGB, newprofile, &zero);
+ 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() );
/* Several invalid parameter checks: */
+ size = 0;
SetLastError(0xfaceabee); /* 1st, maybe 2nd and then dereferenced 4th param, */
- ret = pGetStandardColorSpaceProfileA(machine, 0, newprofile, &zero);
+ ret = pGetStandardColorSpaceProfileA(machine, 0, newprofile, &size);
ok( !ret && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_NOT_SUPPORTED),
"GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() );
ret = pGetStandardColorSpaceProfileA(NULL, 0, newprofile, NULL);
ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() );
+ size = 0;
SetLastError(0xfaceabee); /* maybe 2nd, then 3rd and dereferenced 4th param, */
- ret = pGetStandardColorSpaceProfileA(NULL, 0, NULL, &zero);
+ 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() );
+ size = sizeof(newprofile);
SetLastError(0xfaceabee); /* maybe 2nd param. */
- ret = pGetStandardColorSpaceProfileA(NULL, 0, newprofile, &sizeP);
+ ret = pGetStandardColorSpaceProfileA(NULL, 0, newprofile, &size);
if (!ret) ok( GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() );
- else ok( !lstrcmpiA( newprofile, emptyA ) && GetLastError() == 0xfaceabee,
+ else ok( !lstrcmpiA( newprofile, "" ) && GetLastError() == 0xfaceabee,
"GetStandardColorSpaceProfileA() returns %d (GLE=%d)\n", ret, GetLastError() );
/* Functional checks */
ok( ret, "SetStandardColorSpaceProfileA() failed (%d)\n", GetLastError() );
}
-static void test_GetStandardColorSpaceProfileW(void)
+static void test_GetStandardColorSpaceProfileW( WCHAR *standardprofileW )
{
BOOL ret;
DWORD size;
WCHAR oldprofile[MAX_PATH];
WCHAR newprofile[MAX_PATH];
CHAR newprofileA[MAX_PATH];
- const CHAR empty[] = "";
- DWORD zero = 0;
- DWORD sizeP = sizeof(newprofile);
/* Parameter checks */
/* Single invalid parameter checks: */
+ size = sizeof(newprofile);
SetLastError(0xfaceabee); /* 1st param, */
- ret = pGetStandardColorSpaceProfileW(machineW, LCS_sRGB, newprofile, &sizeP);
+ ret = pGetStandardColorSpaceProfileW(machineW, LCS_sRGB, newprofile, &size);
ok( !ret && GetLastError() == ERROR_NOT_SUPPORTED, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() );
+ size = sizeof(newprofile);
SetLastError(0xfaceabee); /* 2nd param, */
- ret = pGetStandardColorSpaceProfileW(NULL, (DWORD)-1, newprofile, &sizeP);
+ ret = pGetStandardColorSpaceProfileW(NULL, (DWORD)-1, newprofile, &size);
ok( !ret && GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() );
+ size = sizeof(newprofile);
SetLastError(0xfaceabee); /* 2nd param, */
- ret = pGetStandardColorSpaceProfileW(NULL, 0, newprofile, &sizeP);
+ 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() );
+ size = sizeof(newprofile);
SetLastError(0xfaceabee); /* 3rd param, */
- ret = pGetStandardColorSpaceProfileW(NULL, LCS_sRGB, NULL, &sizeP);
- ok( !ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() );
+ ret = pGetStandardColorSpaceProfileW(NULL, LCS_sRGB, NULL, &size);
+ ok( !ret || broken(ret) /* win98 */, "GetStandardColorSpaceProfileW succeeded\n" );
+ ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER ||
+ broken(GetLastError() == 0xfaceabee) /* win98 */,
+ "GetStandardColorSpaceProfileW() returns GLE=%u\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() );
+ size = 0;
SetLastError(0xfaceabee); /* dereferenced 4th param. */
- ret = pGetStandardColorSpaceProfileW(NULL, LCS_sRGB, newprofile, &zero);
- ok( !ret && (GetLastError() == ERROR_MORE_DATA || GetLastError() == ERROR_INSUFFICIENT_BUFFER),
- "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() );
+ ret = pGetStandardColorSpaceProfileW(NULL, LCS_sRGB, newprofile, &size);
+ ok( !ret || broken(ret) /* win98 */, "GetStandardColorSpaceProfileW succeeded\n" );
+ ok( GetLastError() == ERROR_MORE_DATA ||
+ GetLastError() == ERROR_INSUFFICIENT_BUFFER ||
+ broken(GetLastError() == 0xfaceabee) /* win98 */,
+ "GetStandardColorSpaceProfileW() returns GLE=%u\n", GetLastError() );
/* Several invalid parameter checks: */
+ size = 0;
SetLastError(0xfaceabee); /* 1st, maybe 2nd and then dereferenced 4th param, */
- ret = pGetStandardColorSpaceProfileW(machineW, 0, newprofile, &zero);
+ ret = pGetStandardColorSpaceProfileW(machineW, 0, newprofile, &size);
ok( !ret && (GetLastError() == ERROR_INVALID_PARAMETER || GetLastError() == ERROR_NOT_SUPPORTED),
"GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() );
ret = pGetStandardColorSpaceProfileW(NULL, 0, newprofile, NULL);
ok( !ret && GetLastError() == ERROR_INVALID_PARAMETER, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() );
+ size = 0;
SetLastError(0xfaceabee); /* maybe 2nd, then 3rd and dereferenced 4th param, */
- ret = pGetStandardColorSpaceProfileW(NULL, 0, NULL, &zero);
- ok( !ret && (GetLastError() == ERROR_INSUFFICIENT_BUFFER || GetLastError() == ERROR_FILE_NOT_FOUND),
- "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() );
+ ret = pGetStandardColorSpaceProfileW(NULL, 0, NULL, &size);
+ ok( !ret || broken(ret) /* win98 */, "GetStandardColorSpaceProfileW succeeded\n" );
+ ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER ||
+ GetLastError() == ERROR_FILE_NOT_FOUND ||
+ broken(GetLastError() == 0xfaceabee) /* win98 */,
+ "GetStandardColorSpaceProfileW() returns GLE=%u\n", GetLastError() );
+ size = sizeof(newprofile);
SetLastError(0xfaceabee); /* maybe 2nd param. */
- ret = pGetStandardColorSpaceProfileW(NULL, 0, newprofile, &sizeP);
+ ret = pGetStandardColorSpaceProfileW(NULL, 0, newprofile, &size);
if (!ret) ok( GetLastError() == ERROR_FILE_NOT_FOUND, "GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() );
else
{
WideCharToMultiByte(CP_ACP, 0, newprofile, -1, newprofileA, sizeof(newprofileA), NULL, NULL);
- ok( !lstrcmpiA( newprofileA, empty ) && GetLastError() == 0xfaceabee,
+ ok( !lstrcmpiA( newprofileA, "" ) && GetLastError() == 0xfaceabee,
"GetStandardColorSpaceProfileW() returns %d (GLE=%d)\n", ret, GetLastError() );
}
ok( ret, "SetStandardColorSpaceProfileW() failed (%d)\n", GetLastError() );
}
-static void test_EnumColorProfilesA(void)
+static void test_EnumColorProfilesA( char *standardprofile )
{
BOOL ret;
DWORD total, size, number;
ok( !ret, "EnumColorProfilesA() succeeded (%d)\n", GetLastError() );
ret = pEnumColorProfilesA( NULL, &record, buffer, &size, &number );
- if (standardprofile)
+ if (have_color_profile)
ok( ret, "EnumColorProfilesA() failed (%d)\n", GetLastError() );
else
todo_wine ok( ret, "EnumColorProfilesA() failed (%d)\n", GetLastError() );
size = total;
ret = pEnumColorProfilesA( NULL, &record, buffer, &size, &number );
- if (standardprofile)
+ if (have_color_profile)
ok( ret, "EnumColorProfilesA() failed (%d)\n", GetLastError() );
else
todo_wine ok( ret, "EnumColorProfilesA() failed (%d)\n", GetLastError() );
HeapFree( GetProcessHeap(), 0, buffer );
}
-static void test_EnumColorProfilesW(void)
+static void test_EnumColorProfilesW( WCHAR *standardprofileW )
{
BOOL ret;
DWORD total, size, number;
ok( !ret, "EnumColorProfilesW() succeeded (%d)\n", GetLastError() );
ret = pEnumColorProfilesW( NULL, &record, buffer, &size, &number );
- if (standardprofileW)
+ if (have_color_profile)
ok( ret, "EnumColorProfilesW() failed (%d)\n", GetLastError() );
else
todo_wine ok( ret, "EnumColorProfilesW() failed (%d)\n", GetLastError() );
size = total;
ret = pEnumColorProfilesW( NULL, &record, buffer, &size, &number );
- if (standardprofileW)
+ if (have_color_profile)
ok( ret, "EnumColorProfilesW() failed (%d)\n", GetLastError() );
else
todo_wine ok( ret, "EnumColorProfilesW() failed (%d)\n", GetLastError() );
HeapFree( GetProcessHeap(), 0, buffer );
}
-static void test_InstallColorProfileA(void)
+static void test_InstallColorProfileA( char *standardprofile, char *testprofile )
{
BOOL ret;
}
}
-static void test_InstallColorProfileW(void)
+static void test_InstallColorProfileW( WCHAR *standardprofileW, WCHAR *testprofileW )
{
BOOL ret;
}
}
-static void test_IsColorProfileTagPresent(void)
+static void test_IsColorProfileTagPresent( char *standardprofile )
{
if (standardprofile)
{
}
}
-static void test_OpenColorProfileA(void)
+static void test_OpenColorProfileA( char *standardprofile )
{
PROFILE profile;
HPROFILE handle;
ret = pCloseColorProfile( handle );
ok( ret, "CloseColorProfile() failed (%d)\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() );
+
+ ret = pCloseColorProfile( handle );
+ ok( ret, "CloseColorProfile() failed (%d)\n", GetLastError() );
}
}
-static void test_OpenColorProfileW(void)
+static void test_OpenColorProfileW( WCHAR *standardprofileW )
{
PROFILE profile;
HPROFILE handle;
}
}
-static void test_SetColorProfileElement(void)
+static void test_SetColorProfileElement( char *testprofile )
{
if (testprofile)
{
/* Functional checks */
size = sizeof(data);
-
ret = pSetColorProfileElement( handle, tag, 0, &size, data );
- ok( ret, "SetColorProfileElement() failed (%d)\n", GetLastError() );
+ ok( ret, "SetColorProfileElement() failed %u\n", GetLastError() );
size = sizeof(buffer);
-
ret = pGetColorProfileElement( handle, tag, 0, &size, buffer, &ref );
- ok( ret && size > 0, "GetColorProfileElement() failed (%d)\n", GetLastError() );
+ ok( ret, "GetColorProfileElement() failed %u\n", GetLastError() );
+ ok( size > 0, "wrong size\n" );
ok( !memcmp( data, buffer, sizeof(data) ),
- "Unexpected tag data, expected %s, got %s (%d)\n",
- data, buffer, GetLastError() );
+ "Unexpected tag data, expected %s, got %s (%u)\n", data, buffer, GetLastError() );
pCloseColorProfile( handle );
}
}
-static void test_SetColorProfileHeader(void)
+static void test_SetColorProfileHeader( char *testprofile )
{
if (testprofile)
{
}
}
-static void test_UninstallColorProfileA(void)
+static void test_UninstallColorProfileA( char *testprofile )
{
BOOL ret;
}
}
-static void test_UninstallColorProfileW(void)
+static void test_UninstallColorProfileW( WCHAR *testprofileW )
{
BOOL ret;
}
}
-static void test_AssociateColorProfileWithDeviceA(void)
+static void test_AssociateColorProfileWithDeviceA( char *testprofile )
{
BOOL ret;
char profile[MAX_PATH], basename[MAX_PATH];
DWORD error, size = sizeof(profile);
- DISPLAY_DEVICE display;
+ DISPLAY_DEVICEA display, monitor;
BOOL res;
- DISPLAY_DEVICE monitor;
if (testprofile && pEnumDisplayDevicesA)
{
- display.cb = sizeof( DISPLAY_DEVICE );
+ display.cb = sizeof( DISPLAY_DEVICEA );
res = pEnumDisplayDevicesA( NULL, 0, &display, 0 );
ok( res, "Can't get display info\n" );
- monitor.cb = sizeof( DISPLAY_DEVICE );
+ monitor.cb = sizeof( DISPLAY_DEVICEA );
res = pEnumDisplayDevicesA( display.DeviceName, 0, &monitor, 0 );
if (res)
{
}
}
+static BOOL have_profile(void)
+{
+ char glob[MAX_PATH + sizeof("\\*.icm")];
+ DWORD size = MAX_PATH;
+ HANDLE handle;
+ WIN32_FIND_DATAA data;
+
+ if (!pGetColorDirectoryA( NULL, glob, &size )) return FALSE;
+ lstrcatA( glob, "\\*.icm" );
+ handle = FindFirstFileA( glob, &data );
+ if (handle == INVALID_HANDLE_VALUE) return FALSE;
+ FindClose( handle );
+ return TRUE;
+}
+
START_TEST(profile)
{
UINT len;
HANDLE handle;
- char path[MAX_PATH], file[MAX_PATH];
- char profilefile1[MAX_PATH], profilefile2[MAX_PATH];
- WCHAR profilefile1W[MAX_PATH], profilefile2W[MAX_PATH];
- WCHAR fileW[MAX_PATH];
+ char path[MAX_PATH], file[MAX_PATH], profilefile1[MAX_PATH], profilefile2[MAX_PATH];
+ WCHAR profilefile1W[MAX_PATH], profilefile2W[MAX_PATH], fileW[MAX_PATH];
+ char *standardprofile = NULL, *testprofile = NULL;
+ WCHAR *standardprofileW = NULL, *testprofileW = NULL;
UINT ret;
hmscms = LoadLibraryA( "mscms.dll" );
ret = GetSystemDirectoryA( profilefile1, sizeof(profilefile1) );
ok( ret > 0, "GetSystemDirectoryA() returns %d, LastError = %d\n", ret, GetLastError());
ok( lstrlenA(profilefile1) > 0 && lstrlenA(profilefile1) < MAX_PATH,
- "GetSystemDirectoryA() returns %d, LastError = %d\n", ret, GetLastError());
+ "Expected length between 0 and MAX_PATH, got %d\n", lstrlenA(profilefile1));
MultiByteToWideChar(CP_ACP, 0, profilefile1, -1, profilefile1W, MAX_PATH);
ok( lstrlenW(profilefile1W) > 0 && lstrlenW(profilefile1W) < MAX_PATH,
- "GetSystemDirectoryA() returns %d, LastError = %d\n", ret, GetLastError());
+ "Expected length between 0 and MAX_PATH, got %d\n", lstrlenW(profilefile1W));
lstrcpyA(profilefile2, profilefile1);
lstrcpyW(profilefile2W, profilefile1W);
}
/* If found, create a temporary copy for testing purposes */
- if (standardprofile && GetTempPath( sizeof(path), path ))
+ if (standardprofile && GetTempPathA( sizeof(path), path ))
{
- if (GetTempFileName( path, "rgb", 0, file ))
+ if (GetTempFileNameA( path, "rgb", 0, file ))
{
if (CopyFileA( standardprofile, file, FALSE ))
{
testprofile = (LPSTR)&file;
-
len = MultiByteToWideChar( CP_ACP, 0, testprofile, -1, NULL, 0 );
MultiByteToWideChar( CP_ACP, 0, testprofile, -1, fileW, len );
-
testprofileW = (LPWSTR)&fileW;
}
}
}
+ have_color_profile = have_profile();
+
test_GetColorDirectoryA();
test_GetColorDirectoryW();
- test_GetColorProfileElement();
- test_GetColorProfileElementTag();
+ test_GetColorProfileElement( standardprofile );
+ test_GetColorProfileElementTag( standardprofile );
- test_GetColorProfileFromHandle();
- test_GetColorProfileHeader();
+ test_GetColorProfileFromHandle( testprofile );
+ test_GetColorProfileHeader( testprofile );
- test_GetCountColorProfileElements();
+ test_GetCountColorProfileElements( standardprofile );
- test_GetStandardColorSpaceProfileA();
- test_GetStandardColorSpaceProfileW();
+ test_GetStandardColorSpaceProfileA( standardprofile );
+ test_GetStandardColorSpaceProfileW( standardprofileW );
- test_EnumColorProfilesA();
- test_EnumColorProfilesW();
+ test_EnumColorProfilesA( standardprofile );
+ test_EnumColorProfilesW( standardprofileW );
- test_InstallColorProfileA();
- test_InstallColorProfileW();
+ test_InstallColorProfileA( standardprofile, testprofile );
+ test_InstallColorProfileW( standardprofileW, testprofileW );
- test_IsColorProfileTagPresent();
+ test_IsColorProfileTagPresent( standardprofile );
- test_OpenColorProfileA();
- test_OpenColorProfileW();
+ test_OpenColorProfileA( standardprofile );
+ test_OpenColorProfileW( standardprofileW );
- test_SetColorProfileElement();
- test_SetColorProfileHeader();
+ test_SetColorProfileElement( testprofile );
+ test_SetColorProfileHeader( testprofile );
- test_UninstallColorProfileA();
- test_UninstallColorProfileW();
+ test_UninstallColorProfileA( testprofile );
+ test_UninstallColorProfileW( testprofileW );
- test_AssociateColorProfileWithDeviceA();
+ test_AssociateColorProfileWithDeviceA( testprofile );
- /* Clean up */
- if (testprofile)
- DeleteFileA( testprofile );
-
+ if (testprofile) DeleteFileA( testprofile );
FreeLibrary( huser32 );
FreeLibrary( hmscms );
}