http://bugs.winehq.org/show_bug.cgi?id=19647
Summary: mscms: GetStandardColorSpaceProfileW() profile id handling incorrect (LCS_sRGB and LCS_WINDOWS_COLOR_SPACE) Product: Wine Version: 1.1.27 Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: focht@gmx.net
Hello,
various .NET 3.x apps fail to init because GetStandardColorSpaceProfileW() doesn't work as expected.
--- snip --- ... 0029:Call mscms.GetStandardColorSpaceProfileW(00000000,73524742,00185110,00184f08) ret=0036bf3f 0029:trace:mscms:GetStandardColorSpaceProfileW ( 0x73524742, 0x185110, 0x184f08 ) 0029:trace:mscms:GetColorDirectoryW ( 0x32d9c8, 0x32d9c4 ) 0029:Call KERNEL32.GetSystemDirectoryW(0032d784,00000100) ret=4340b8ff 0029:Ret KERNEL32.GetSystemDirectoryW() retval=00000013 ret=4340b8ff 0029:Call KERNEL32.lstrcatW(0032d784 L"C:\windows\system32",43411b40 L"\spool\drivers\color") ret=4340b91a 0029:Ret KERNEL32.lstrcatW() retval=0032d784 ret=4340b91a 0029:Call KERNEL32.lstrlenW(0032d784 L"C:\windows\system32\spool\drivers\color") ret=4340b92b 0029:Ret KERNEL32.lstrlenW() retval=00000027 ret=4340b92b 0029:Call KERNEL32.lstrcpyW(0032d9c8,0032d784 L"C:\windows\system32\spool\drivers\color") ret=4340b958 0029:Ret KERNEL32.lstrcpyW() retval=0032d9c8 ret=4340b958 0029:Call KERNEL32.SetLastError(00000002) ret=4340c31a 0029:Ret KERNEL32.SetLastError() retval=00000002 ret=4340c31a 0029:Ret mscms.GetStandardColorSpaceProfileW() retval=00000000 ret=0036bf3f ... --- snip ---
--- snip dlls/mscms/profile.c --- BOOL WINAPI GetStandardColorSpaceProfileW( PCWSTR machine, DWORD id, PWSTR profile, PDWORD size ) { static const WCHAR rgbprofilefile[] = { '\','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 }; ... GetColorDirectoryW( machine, rgbprofile, &len );
switch (id) { case SPACE_RGB: /* 'RGB ' */ lstrcatW( rgbprofile, rgbprofilefile ); len = lstrlenW( rgbprofile ) * sizeof(WCHAR);
if (*size < len || !profile) { *size = len; SetLastError( ERROR_MORE_DATA ); return FALSE; }
lstrcpyW( profile, rgbprofile ); break;
default: SetLastError( ERROR_FILE_NOT_FOUND ); return FALSE; } ... --- snip dlls/mscms/profile.c ---
This doesn't look right.
MSDN info: http://msdn.microsoft.com/en-us/library/dd372087.aspx
--- quote --- dwProfileID
Specifies the ID value of the standard color space for which to retrieve the profile. The only valid values for this parameter are LCS_sRGB and LCS_WINDOWS_COLOR_SPACE. --- quote ---
You might also want to have a look at "Windows Metafile Format Specification":
[MS-WMF] — v20090630 (afaik latest one):
http://download.microsoft.com/download/9/5/E/95EF66AF-9026-4BB0-A41D-A4F8180...
--- quote --- 2.1.1.14 LogicalColorSpace Enumeration
The LogicalColorSpace Enumeration specifies the type of color space. <14> typedef enum { LCS_CALIBRATED_RGB = 0x00000000, LCS_sRGB = 0x73524742, LCS_WINDOWS_COLOR_SPACE = 0x57696E20 } LogicalColorSpace; LCS_CALIBRATED_RGB: Color values are calibrated red green blue (RGB) values. LCS_sRGB: The value is an encoding of the ASCII characters "sRGB", and it indicates that the color values are sRGB values. LCS_WINDOWS_COLOR_SPACE: The value is an encoding of the ASCII characters "Win ", including the trailing space, and it indicates that the color values are Windows default color space values. --- quote ---
Regards
http://bugs.winehq.org/show_bug.cgi?id=19647
--- Comment #1 from Hans Leidekker hans@meelstraat.net 2009-08-10 05:32:12 --- Created an attachment (id=22965) --> (http://bugs.winehq.org/attachment.cgi?id=22965) mscms: Correct standard profile ID.
How about this patch? You may need 'winetricks colorprofile' if the profile returned is actually used.
http://bugs.winehq.org/show_bug.cgi?id=19647
--- Comment #2 from Anastasius Focht focht@gmx.net 2009-08-10 13:02:07 --- Hello,
--- quote --- How about this patch? --- quote ---
yes thanks works as expected and fixes startup problem. Might be matter of taste but how about using LCS_* defines as described in "Windows Metafile Format Specification"? Google search for "#define LCS_sRGB" indicates they seem to be defined in "wingdi.h"
Regards
http://bugs.winehq.org/show_bug.cgi?id=19647
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #3 from Anastasius Focht focht@gmx.net 2009-09-02 14:16:47 --- Hello,
thanks, fixed by commit b6ffca256ef9985ec18f5d00e699cf341b770b8e
Regards
http://bugs.winehq.org/show_bug.cgi?id=19647
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Alexandre Julliard julliard@winehq.org 2009-09-25 12:25:49 --- Closing bugs fixed in 1.1.30.
http://bugs.winehq.org/show_bug.cgi?id=19647
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |dotnet Fixed by SHA1| |b6ffca256ef9985ec18f5d00e69 | |9cf341b770b8e
--- Comment #5 from Anastasius Focht focht@gmx.net 2011-10-11 15:20:12 CDT --- Hello,
filling/correcting fields ...
Regards
https://bugs.winehq.org/show_bug.cgi?id=19647
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |mscms