From f107125b3b65c4088fbb5333f33ce2d1910e003a Mon Sep 17 00:00:00 2001 From: Saulius Krasuckas Date: Fri, 13 Jan 2006 14:09:04 +0100 Subject: [PATCH] mscms: Fix some wine_todo for GetStandardColorSpaceProfile(). --- dlls/mscms/profile.c | 25 +++++++++++++++++++++++-- dlls/mscms/tests/profile.c | 4 ---- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/dlls/mscms/profile.c b/dlls/mscms/profile.c index 59c99962282..8f0279f5770 100644 --- a/dlls/mscms/profile.c +++ b/dlls/mscms/profile.c @@ -346,7 +346,17 @@ BOOL WINAPI GetStandardColorSpaceProfileA( PCSTR machine, DWORD id, PSTR profile TRACE( "( 0x%08lx, %p, %p )\n", id, profile, size ); - if (machine || !size) return FALSE; + if (machine) + { + SetLastError(ERROR_NOT_SUPPORTED); + return FALSE; + } + + if (!size) + { + SetLastError(ERROR_INSUFFICIENT_BUFFER); + return FALSE; + } sizeW = *size * sizeof(WCHAR); @@ -401,7 +411,18 @@ BOOL WINAPI GetStandardColorSpaceProfileW( PCWSTR machine, DWORD id, PWSTR profi TRACE( "( 0x%08lx, %p, %p )\n", id, profile, size ); - if (machine || !size) return FALSE; + if (machine) + { + SetLastError(ERROR_NOT_SUPPORTED); + return FALSE; + } + + if (!size) + { + SetLastError(ERROR_INSUFFICIENT_BUFFER); + return FALSE; + } + GetColorDirectoryW( machine, rgbprofile, &len ); switch (id) diff --git a/dlls/mscms/tests/profile.c b/dlls/mscms/tests/profile.c index 14cfa5af513..1f0f986838c 100644 --- a/dlls/mscms/tests/profile.c +++ b/dlls/mscms/tests/profile.c @@ -525,7 +525,6 @@ static void test_GetStandardColorSpaceProfileA(void) /* Parameter checks */ /* Single invalid parameter checks */ - todo_wine fail_GSCSPA(machine, SPACE_RGB, newprofile, &size, sizeP, (GLE == ERROR_NOT_SUPPORTED)); todo_wine fail_GSCSPA(NULL, (DWORD)-1, newprofile, &size, sizeP, (GLE == ERROR_FILE_NOT_FOUND)); @@ -537,7 +536,6 @@ static void test_GetStandardColorSpaceProfileA(void) fail_GSCSPA(NULL, SPACE_RGB, newprofile, &size, 0, (GLE == ERROR_MORE_DATA || GLE == ERROR_INSUFFICIENT_BUFFER)); /* Several invalid parameter checks */ - todo_wine fail_GSCSPA(machine, 0, newprofile, &size, 0, (GLE == ERROR_INVALID_PARAMETER || GLE == ERROR_NOT_SUPPORTED)); todo_wine fail_GSCSPA(NULL, 0, newprofile, NULL, 0, (GLE == ERROR_INVALID_PARAMETER)); @@ -604,7 +602,6 @@ static void test_GetStandardColorSpaceProfileW(void) /* Parameter checks */ /* Single invalid parameter checks */ - todo_wine fail_GSCSPW(machineW, SPACE_RGB, newprofile, &size, sizeP, (GLE == ERROR_NOT_SUPPORTED)); todo_wine fail_GSCSPW(NULL, (DWORD)-1, newprofile, &size, sizeP, (GLE == ERROR_FILE_NOT_FOUND)); @@ -616,7 +613,6 @@ static void test_GetStandardColorSpaceProfileW(void) fail_GSCSPW(NULL, SPACE_RGB, newprofile, &size, 0, (GLE == ERROR_MORE_DATA || GLE == ERROR_INSUFFICIENT_BUFFER)); /* Several invalid parameter checks */ - todo_wine fail_GSCSPW(machineW, 0, newprofile, &size, 0, (GLE == ERROR_INVALID_PARAMETER || GLE == ERROR_NOT_SUPPORTED)); todo_wine fail_GSCSPW(NULL, 0, newprofile, NULL, 0, (GLE == ERROR_INVALID_PARAMETER));