Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
5442ddc7
Commit
5442ddc7
authored
Feb 11, 2022
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 11, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscms: Build without -DWINE_NO_LONG_TYPES.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9b11f6fd
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
232 additions
and
239 deletions
+232
-239
Makefile.in
dlls/mscms/Makefile.in
+0
-1
mscms_main.c
dlls/mscms/mscms_main.c
+2
-2
profile.c
dlls/mscms/profile.c
+19
-19
stub.c
dlls/mscms/stub.c
+15
-15
Makefile.in
dlls/mscms/tests/Makefile.in
+0
-1
profile.c
dlls/mscms/tests/profile.c
+185
-187
transform.c
dlls/mscms/transform.c
+11
-14
No files found.
dlls/mscms/Makefile.in
View file @
5442ddc7
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
MODULE
=
mscms.dll
MODULE
=
mscms.dll
IMPORTLIB
=
mscms
IMPORTLIB
=
mscms
IMPORTS
=
$(LCMS2_PE_LIBS)
shlwapi advapi32
IMPORTS
=
$(LCMS2_PE_LIBS)
shlwapi advapi32
...
...
dlls/mscms/mscms_main.c
View file @
5442ddc7
...
@@ -37,9 +37,9 @@ static void lcms_error_handler(cmsContext ctx, cmsUInt32Number error, const char
...
@@ -37,9 +37,9 @@ static void lcms_error_handler(cmsContext ctx, cmsUInt32Number error, const char
TRACE
(
"%u %s
\n
"
,
error
,
debugstr_a
(
text
));
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
)
switch
(
reason
)
{
{
...
...
dlls/mscms/profile.c
View file @
5442ddc7
...
@@ -328,7 +328,7 @@ BOOL WINAPI GetColorProfileElement( HPROFILE handle, TAGTYPE type, DWORD offset,
...
@@ -328,7 +328,7 @@ BOOL WINAPI GetColorProfileElement( HPROFILE handle, TAGTYPE type, DWORD offset,
BOOL
ret
;
BOOL
ret
;
struct
profile
*
profile
=
grab_profile
(
handle
);
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
;
if
(
!
profile
)
return
FALSE
;
...
@@ -366,7 +366,7 @@ BOOL WINAPI GetColorProfileElementTag( HPROFILE handle, DWORD index, PTAGTYPE ty
...
@@ -366,7 +366,7 @@ BOOL WINAPI GetColorProfileElementTag( HPROFILE handle, DWORD index, PTAGTYPE ty
struct
profile
*
profile
=
grab_profile
(
handle
);
struct
profile
*
profile
=
grab_profile
(
handle
);
struct
tag_entry
tag
;
struct
tag_entry
tag
;
TRACE
(
"( %p, %
d
, %p )
\n
"
,
handle
,
index
,
type
);
TRACE
(
"( %p, %
lu
, %p )
\n
"
,
handle
,
index
,
type
);
if
(
!
profile
)
return
FALSE
;
if
(
!
profile
)
return
FALSE
;
...
@@ -507,7 +507,7 @@ BOOL WINAPI GetStandardColorSpaceProfileA( PCSTR machine, DWORD id, PSTR profile
...
@@ -507,7 +507,7 @@ BOOL WINAPI GetStandardColorSpaceProfileA( PCSTR machine, DWORD id, PSTR profile
BOOL
ret
=
FALSE
;
BOOL
ret
=
FALSE
;
DWORD
sizeW
;
DWORD
sizeW
;
TRACE
(
"(
0x%08
x, %p, %p )
\n
"
,
id
,
profile
,
size
);
TRACE
(
"(
%#l
x, %p, %p )
\n
"
,
id
,
profile
,
size
);
if
(
machine
)
if
(
machine
)
{
{
...
@@ -567,7 +567,7 @@ BOOL WINAPI GetStandardColorSpaceProfileW( PCWSTR machine, DWORD id, PWSTR profi
...
@@ -567,7 +567,7 @@ BOOL WINAPI GetStandardColorSpaceProfileW( PCWSTR machine, DWORD id, PWSTR profi
WCHAR
rgbprofile
[
MAX_PATH
];
WCHAR
rgbprofile
[
MAX_PATH
];
DWORD
len
=
sizeof
(
rgbprofile
);
DWORD
len
=
sizeof
(
rgbprofile
);
TRACE
(
"(
0x%08
x, %p, %p )
\n
"
,
id
,
profile
,
size
);
TRACE
(
"(
%#l
x, %p, %p )
\n
"
,
id
,
profile
,
size
);
if
(
machine
)
if
(
machine
)
{
{
...
@@ -663,15 +663,15 @@ static BOOL match_profile( PENUMTYPEW rec, PPROFILEHEADER hdr )
...
@@ -663,15 +663,15 @@ static BOOL match_profile( PENUMTYPEW rec, PPROFILEHEADER hdr )
}
}
if
(
rec
->
dwFields
&
ET_MEDIATYPE
)
if
(
rec
->
dwFields
&
ET_MEDIATYPE
)
{
{
FIXME
(
"ET_MEDIATYPE:
0x%08
x
\n
"
,
rec
->
dwMediaType
);
FIXME
(
"ET_MEDIATYPE:
%#l
x
\n
"
,
rec
->
dwMediaType
);
}
}
if
(
rec
->
dwFields
&
ET_DITHERMODE
)
if
(
rec
->
dwFields
&
ET_DITHERMODE
)
{
{
FIXME
(
"ET_DITHERMODE:
0x%08
x
\n
"
,
rec
->
dwDitheringMode
);
FIXME
(
"ET_DITHERMODE:
%#l
x
\n
"
,
rec
->
dwDitheringMode
);
}
}
if
(
rec
->
dwFields
&
ET_RESOLUTION
)
if
(
rec
->
dwFields
&
ET_RESOLUTION
)
{
{
FIXME
(
"ET_RESOLUTION:
0x%08x, 0x%08
x
\n
"
,
FIXME
(
"ET_RESOLUTION:
%#lx, %#l
x
\n
"
,
rec
->
dwResolution
[
0
],
rec
->
dwResolution
[
1
]
);
rec
->
dwResolution
[
0
],
rec
->
dwResolution
[
1
]
);
}
}
if
(
rec
->
dwFields
&
ET_DEVICECLASS
)
if
(
rec
->
dwFields
&
ET_DEVICECLASS
)
...
@@ -710,7 +710,7 @@ static BOOL match_profile( PENUMTYPEW rec, PPROFILEHEADER hdr )
...
@@ -710,7 +710,7 @@ static BOOL match_profile( PENUMTYPEW rec, PPROFILEHEADER hdr )
}
}
if
(
rec
->
dwFields
&
ET_PROFILEFLAGS
)
if
(
rec
->
dwFields
&
ET_PROFILEFLAGS
)
{
{
TRACE
(
"ET_PROFILEFLAGS:
0x%08
x
\n
"
,
rec
->
dwProfileFlags
);
TRACE
(
"ET_PROFILEFLAGS:
%#l
x
\n
"
,
rec
->
dwProfileFlags
);
if
(
rec
->
dwProfileFlags
!=
hdr
->
phProfileFlags
)
return
FALSE
;
if
(
rec
->
dwProfileFlags
!=
hdr
->
phProfileFlags
)
return
FALSE
;
}
}
if
(
rec
->
dwFields
&
ET_MANUFACTURER
)
if
(
rec
->
dwFields
&
ET_MANUFACTURER
)
...
@@ -725,14 +725,14 @@ static BOOL match_profile( PENUMTYPEW rec, PPROFILEHEADER hdr )
...
@@ -725,14 +725,14 @@ static BOOL match_profile( PENUMTYPEW rec, PPROFILEHEADER hdr )
}
}
if
(
rec
->
dwFields
&
ET_ATTRIBUTES
)
if
(
rec
->
dwFields
&
ET_ATTRIBUTES
)
{
{
TRACE
(
"ET_ATTRIBUTES:
0x%08x, 0x%08
x
\n
"
,
TRACE
(
"ET_ATTRIBUTES:
%#lx, %#l
x
\n
"
,
rec
->
dwAttributes
[
0
],
rec
->
dwAttributes
[
1
]
);
rec
->
dwAttributes
[
0
],
rec
->
dwAttributes
[
1
]
);
if
(
rec
->
dwAttributes
[
0
]
!=
hdr
->
phAttributes
[
0
]
||
if
(
rec
->
dwAttributes
[
0
]
!=
hdr
->
phAttributes
[
0
]
||
rec
->
dwAttributes
[
1
]
!=
hdr
->
phAttributes
[
1
])
return
FALSE
;
rec
->
dwAttributes
[
1
]
!=
hdr
->
phAttributes
[
1
])
return
FALSE
;
}
}
if
(
rec
->
dwFields
&
ET_RENDERINGINTENT
)
if
(
rec
->
dwFields
&
ET_RENDERINGINTENT
)
{
{
TRACE
(
"ET_RENDERINGINTENT:
0x%08
x
\n
"
,
rec
->
dwRenderingIntent
);
TRACE
(
"ET_RENDERINGINTENT:
%#l
x
\n
"
,
rec
->
dwRenderingIntent
);
if
(
rec
->
dwRenderingIntent
!=
hdr
->
phRenderingIntent
)
return
FALSE
;
if
(
rec
->
dwRenderingIntent
!=
hdr
->
phRenderingIntent
)
return
FALSE
;
}
}
if
(
rec
->
dwFields
&
ET_CREATOR
)
if
(
rec
->
dwFields
&
ET_CREATOR
)
...
@@ -1095,7 +1095,7 @@ BOOL WINAPI IsColorProfileTagPresent( HPROFILE handle, TAGTYPE type, PBOOL prese
...
@@ -1095,7 +1095,7 @@ BOOL WINAPI IsColorProfileTagPresent( HPROFILE handle, TAGTYPE type, PBOOL prese
struct
profile
*
profile
=
grab_profile
(
handle
);
struct
profile
*
profile
=
grab_profile
(
handle
);
struct
tag_entry
tag
;
struct
tag_entry
tag
;
TRACE
(
"( %p,
0x%08
x, %p )
\n
"
,
handle
,
type
,
present
);
TRACE
(
"( %p,
%#l
x, %p )
\n
"
,
handle
,
type
,
present
);
if
(
!
profile
)
return
FALSE
;
if
(
!
profile
)
return
FALSE
;
...
@@ -1164,7 +1164,7 @@ BOOL WINAPI SetColorProfileElement( HPROFILE handle, TAGTYPE type, DWORD offset,
...
@@ -1164,7 +1164,7 @@ BOOL WINAPI SetColorProfileElement( HPROFILE handle, TAGTYPE type, DWORD offset,
BOOL
ret
;
BOOL
ret
;
struct
profile
*
profile
=
grab_profile
(
handle
);
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
;
if
(
!
profile
)
return
FALSE
;
...
@@ -1286,7 +1286,7 @@ HPROFILE WINAPI OpenColorProfileA( PPROFILE profile, DWORD access, DWORD sharing
...
@@ -1286,7 +1286,7 @@ HPROFILE WINAPI OpenColorProfileA( PPROFILE profile, DWORD access, DWORD sharing
HPROFILE
handle
=
NULL
;
HPROFILE
handle
=
NULL
;
PROFILE
profileW
;
PROFILE
profileW
;
TRACE
(
"( %p,
0x%08x, 0x%08x, 0x%08
x )
\n
"
,
profile
,
access
,
sharing
,
creation
);
TRACE
(
"( %p,
%#lx, %#lx, %#l
x )
\n
"
,
profile
,
access
,
sharing
,
creation
);
if
(
!
profile
||
!
profile
->
pProfileData
)
return
NULL
;
if
(
!
profile
||
!
profile
->
pProfileData
)
return
NULL
;
...
@@ -1331,7 +1331,7 @@ HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing
...
@@ -1331,7 +1331,7 @@ HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing
HANDLE
handle
=
INVALID_HANDLE_VALUE
;
HANDLE
handle
=
INVALID_HANDLE_VALUE
;
DWORD
size
;
DWORD
size
;
TRACE
(
"( %p,
0x%08x, 0x%08x, 0x%08
x )
\n
"
,
profile
,
access
,
sharing
,
creation
);
TRACE
(
"( %p,
%#lx, %#lx, %#l
x )
\n
"
,
profile
,
access
,
sharing
,
creation
);
if
(
!
profile
||
!
profile
->
pProfileData
)
return
NULL
;
if
(
!
profile
||
!
profile
->
pProfileData
)
return
NULL
;
...
@@ -1381,7 +1381,7 @@ HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing
...
@@ -1381,7 +1381,7 @@ HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing
}
}
if
(
handle
==
INVALID_HANDLE_VALUE
)
if
(
handle
==
INVALID_HANDLE_VALUE
)
{
{
WARN
(
"Unable to open color profile %u
\n
"
,
GetLastError
()
);
WARN
(
"Unable to open color profile %
l
u
\n
"
,
GetLastError
()
);
return
NULL
;
return
NULL
;
}
}
if
((
size
=
GetFileSize
(
handle
,
NULL
))
==
INVALID_FILE_SIZE
)
if
((
size
=
GetFileSize
(
handle
,
NULL
))
==
INVALID_FILE_SIZE
)
...
@@ -1413,7 +1413,7 @@ HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing
...
@@ -1413,7 +1413,7 @@ HPROFILE WINAPI OpenColorProfileW( PPROFILE profile, DWORD access, DWORD sharing
}
}
else
else
{
{
ERR
(
"Invalid profile type %u
\n
"
,
profile
->
dwType
);
ERR
(
"Invalid profile type %
l
u
\n
"
,
profile
->
dwType
);
return
NULL
;
return
NULL
;
}
}
...
@@ -1476,7 +1476,7 @@ BOOL WINAPI WcsGetDefaultColorProfileSize( WCS_PROFILE_MANAGEMENT_SCOPE scope, P
...
@@ -1476,7 +1476,7 @@ BOOL WINAPI WcsGetDefaultColorProfileSize( WCS_PROFILE_MANAGEMENT_SCOPE scope, P
COLORPROFILETYPE
type
,
COLORPROFILESUBTYPE
subtype
,
COLORPROFILETYPE
type
,
COLORPROFILESUBTYPE
subtype
,
DWORD
profile_id
,
PDWORD
profile_size
)
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
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
return
FALSE
;
}
}
...
@@ -1500,7 +1500,7 @@ HPROFILE WINAPI WcsOpenColorProfileA( PROFILE *cdm, PROFILE *camp, PROFILE *gmmp
...
@@ -1500,7 +1500,7 @@ HPROFILE WINAPI WcsOpenColorProfileA( PROFILE *cdm, PROFILE *camp, PROFILE *gmmp
PROFILE
cdmW
,
campW
=
{
0
},
gmmpW
=
{
0
};
PROFILE
cdmW
,
campW
=
{
0
},
gmmpW
=
{
0
};
HPROFILE
ret
=
NULL
;
HPROFILE
ret
=
NULL
;
TRACE
(
"%p, %p, %p, %
08x, %08x, %08x, %08
x
\n
"
,
cdm
,
camp
,
gmmp
,
access
,
sharing
,
creation
,
flags
);
TRACE
(
"%p, %p, %p, %
#lx, %#lx, %#lx, %#l
x
\n
"
,
cdm
,
camp
,
gmmp
,
access
,
sharing
,
creation
,
flags
);
if
(
!
cdm
||
!
profile_AtoW
(
cdm
,
&
cdmW
))
return
NULL
;
if
(
!
cdm
||
!
profile_AtoW
(
cdm
,
&
cdmW
))
return
NULL
;
if
(
camp
&&
!
profile_AtoW
(
camp
,
&
campW
))
goto
done
;
if
(
camp
&&
!
profile_AtoW
(
camp
,
&
campW
))
goto
done
;
...
@@ -1521,7 +1521,7 @@ done:
...
@@ -1521,7 +1521,7 @@ done:
HPROFILE
WINAPI
WcsOpenColorProfileW
(
PROFILE
*
cdm
,
PROFILE
*
camp
,
PROFILE
*
gmmp
,
DWORD
access
,
DWORD
sharing
,
HPROFILE
WINAPI
WcsOpenColorProfileW
(
PROFILE
*
cdm
,
PROFILE
*
camp
,
PROFILE
*
gmmp
,
DWORD
access
,
DWORD
sharing
,
DWORD
creation
,
DWORD
flags
)
DWORD
creation
,
DWORD
flags
)
{
{
TRACE
(
"%p, %p, %p, %
08x, %08x, %08x, %08
x
\n
"
,
cdm
,
camp
,
gmmp
,
access
,
sharing
,
creation
,
flags
);
TRACE
(
"%p, %p, %p, %
#lx, %#lx, %#lx, %#l
x
\n
"
,
cdm
,
camp
,
gmmp
,
access
,
sharing
,
creation
,
flags
);
FIXME
(
"no support for WCS profiles
\n
"
);
FIXME
(
"no support for WCS profiles
\n
"
);
return
OpenColorProfileW
(
cdm
,
access
,
sharing
,
creation
);
return
OpenColorProfileW
(
cdm
,
access
,
sharing
,
creation
);
...
...
dlls/mscms/stub.c
View file @
5442ddc7
...
@@ -35,7 +35,7 @@ BOOL WINAPI CheckBitmapBits( HTRANSFORM transform, PVOID srcbits, BMFORMAT forma
...
@@ -35,7 +35,7 @@ BOOL WINAPI CheckBitmapBits( HTRANSFORM transform, PVOID srcbits, BMFORMAT forma
DWORD
height
,
DWORD
stride
,
PBYTE
result
,
PBMCALLBACKFN
callback
,
DWORD
height
,
DWORD
stride
,
PBYTE
result
,
PBMCALLBACKFN
callback
,
LPARAM
data
)
LPARAM
data
)
{
{
FIXME
(
"( %p, %p,
0x%08x, 0x%08x, 0x%08x, 0x%08x, %p, %p, 0x%08l
x ) stub
\n
"
,
FIXME
(
"( %p, %p,
%#x, %#lx, %#lx, %#lx, %p, %p, %#I
x ) stub
\n
"
,
transform
,
srcbits
,
format
,
width
,
height
,
stride
,
result
,
callback
,
data
);
transform
,
srcbits
,
format
,
width
,
height
,
stride
,
result
,
callback
,
data
);
return
FALSE
;
return
FALSE
;
...
@@ -44,21 +44,21 @@ BOOL WINAPI CheckBitmapBits( HTRANSFORM transform, PVOID srcbits, BMFORMAT forma
...
@@ -44,21 +44,21 @@ BOOL WINAPI CheckBitmapBits( HTRANSFORM transform, PVOID srcbits, BMFORMAT forma
BOOL
WINAPI
CheckColors
(
HTRANSFORM
transform
,
PCOLOR
colors
,
DWORD
number
,
COLORTYPE
type
,
BOOL
WINAPI
CheckColors
(
HTRANSFORM
transform
,
PCOLOR
colors
,
DWORD
number
,
COLORTYPE
type
,
PBYTE
result
)
PBYTE
result
)
{
{
FIXME
(
"( %p, %p,
0x%08x, 0x%08
x, %p ) stub
\n
"
,
transform
,
colors
,
number
,
type
,
result
);
FIXME
(
"( %p, %p,
%#lx, %#
x, %p ) stub
\n
"
,
transform
,
colors
,
number
,
type
,
result
);
return
FALSE
;
return
FALSE
;
}
}
BOOL
WINAPI
ConvertColorNameToIndex
(
HPROFILE
profile
,
PCOLOR_NAME
name
,
PDWORD
index
,
DWORD
count
)
BOOL
WINAPI
ConvertColorNameToIndex
(
HPROFILE
profile
,
PCOLOR_NAME
name
,
PDWORD
index
,
DWORD
count
)
{
{
FIXME
(
"( %p, %p, %p,
0x%08
x ) stub
\n
"
,
profile
,
name
,
index
,
count
);
FIXME
(
"( %p, %p, %p,
%#l
x ) stub
\n
"
,
profile
,
name
,
index
,
count
);
return
FALSE
;
return
FALSE
;
}
}
BOOL
WINAPI
ConvertIndexToColorName
(
HPROFILE
profile
,
PDWORD
index
,
PCOLOR_NAME
name
,
DWORD
count
)
BOOL
WINAPI
ConvertIndexToColorName
(
HPROFILE
profile
,
PDWORD
index
,
PCOLOR_NAME
name
,
DWORD
count
)
{
{
FIXME
(
"( %p, %p, %p,
0x%08
x ) stub
\n
"
,
profile
,
index
,
name
,
count
);
FIXME
(
"( %p, %p, %p,
%#l
x ) stub
\n
"
,
profile
,
index
,
name
,
count
);
return
FALSE
;
return
FALSE
;
}
}
...
@@ -66,7 +66,7 @@ BOOL WINAPI ConvertIndexToColorName( HPROFILE profile, PDWORD index, PCOLOR_NAME
...
@@ -66,7 +66,7 @@ BOOL WINAPI ConvertIndexToColorName( HPROFILE profile, PDWORD index, PCOLOR_NAME
BOOL
WINAPI
CreateDeviceLinkProfile
(
PHPROFILE
profiles
,
DWORD
nprofiles
,
PDWORD
intents
,
BOOL
WINAPI
CreateDeviceLinkProfile
(
PHPROFILE
profiles
,
DWORD
nprofiles
,
PDWORD
intents
,
DWORD
nintents
,
DWORD
flags
,
PBYTE
*
data
,
DWORD
index
)
DWORD
nintents
,
DWORD
flags
,
PBYTE
*
data
,
DWORD
index
)
{
{
FIXME
(
"( %p,
0x%08x, %p, 0x%08x, 0x%08x, %p, 0x%08
x ) stub
\n
"
,
FIXME
(
"( %p,
%#lx, %p, %#lx, %#lx, %p, %#l
x ) stub
\n
"
,
profiles
,
nprofiles
,
intents
,
nintents
,
flags
,
data
,
index
);
profiles
,
nprofiles
,
intents
,
nintents
,
flags
,
data
,
index
);
return
FALSE
;
return
FALSE
;
...
@@ -90,7 +90,7 @@ DWORD WINAPI GenerateCopyFilePaths( LPCWSTR printer, LPCWSTR directory, LPBYTE c
...
@@ -90,7 +90,7 @@ DWORD WINAPI GenerateCopyFilePaths( LPCWSTR printer, LPCWSTR directory, LPBYTE c
DWORD
level
,
LPWSTR
sourcedir
,
LPDWORD
sourcedirsize
,
DWORD
level
,
LPWSTR
sourcedir
,
LPDWORD
sourcedirsize
,
LPWSTR
targetdir
,
LPDWORD
targetdirsize
,
DWORD
flags
)
LPWSTR
targetdir
,
LPDWORD
targetdirsize
,
DWORD
flags
)
{
{
FIXME
(
"( %s, %s, %p,
0x%08x, %p, %p, %p, %p, 0x%08
x ) stub
\n
"
,
FIXME
(
"( %s, %s, %p,
%#lx, %p, %p, %p, %p, %#l
x ) stub
\n
"
,
debugstr_w
(
printer
),
debugstr_w
(
directory
),
clientinfo
,
level
,
sourcedir
,
debugstr_w
(
printer
),
debugstr_w
(
directory
),
clientinfo
,
level
,
sourcedir
,
sourcedirsize
,
targetdir
,
targetdirsize
,
flags
);
sourcedirsize
,
targetdir
,
targetdirsize
,
flags
);
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
...
@@ -98,7 +98,7 @@ DWORD WINAPI GenerateCopyFilePaths( LPCWSTR printer, LPCWSTR directory, LPBYTE c
...
@@ -98,7 +98,7 @@ DWORD WINAPI GenerateCopyFilePaths( LPCWSTR printer, LPCWSTR directory, LPBYTE c
DWORD
WINAPI
GetCMMInfo
(
HTRANSFORM
transform
,
DWORD
info
)
DWORD
WINAPI
GetCMMInfo
(
HTRANSFORM
transform
,
DWORD
info
)
{
{
FIXME
(
"( %p,
0x%08
x ) stub
\n
"
,
transform
,
info
);
FIXME
(
"( %p,
%#l
x ) stub
\n
"
,
transform
,
info
);
return
0
;
return
0
;
}
}
...
@@ -113,14 +113,14 @@ BOOL WINAPI GetNamedProfileInfo( HPROFILE profile, PNAMED_PROFILE_INFO info )
...
@@ -113,14 +113,14 @@ BOOL WINAPI GetNamedProfileInfo( HPROFILE profile, PNAMED_PROFILE_INFO info )
BOOL
WINAPI
GetPS2ColorRenderingDictionary
(
HPROFILE
profile
,
DWORD
intent
,
PBYTE
buffer
,
BOOL
WINAPI
GetPS2ColorRenderingDictionary
(
HPROFILE
profile
,
DWORD
intent
,
PBYTE
buffer
,
PDWORD
size
,
PBOOL
binary
)
PDWORD
size
,
PBOOL
binary
)
{
{
FIXME
(
"( %p,
0x%08
x, %p, %p, %p ) stub
\n
"
,
profile
,
intent
,
buffer
,
size
,
binary
);
FIXME
(
"( %p,
%#l
x, %p, %p, %p ) stub
\n
"
,
profile
,
intent
,
buffer
,
size
,
binary
);
return
FALSE
;
return
FALSE
;
}
}
BOOL
WINAPI
GetPS2ColorRenderingIntent
(
HPROFILE
profile
,
DWORD
intent
,
PBYTE
buffer
,
PDWORD
size
)
BOOL
WINAPI
GetPS2ColorRenderingIntent
(
HPROFILE
profile
,
DWORD
intent
,
PBYTE
buffer
,
PDWORD
size
)
{
{
FIXME
(
"( %p,
0x%08
x, %p, %p ) stub
\n
"
,
profile
,
intent
,
buffer
,
size
);
FIXME
(
"( %p,
%#l
x, %p, %p ) stub
\n
"
,
profile
,
intent
,
buffer
,
size
);
return
FALSE
;
return
FALSE
;
}
}
...
@@ -128,7 +128,7 @@ BOOL WINAPI GetPS2ColorRenderingIntent( HPROFILE profile, DWORD intent, PBYTE bu
...
@@ -128,7 +128,7 @@ BOOL WINAPI GetPS2ColorRenderingIntent( HPROFILE profile, DWORD intent, PBYTE bu
BOOL
WINAPI
GetPS2ColorSpaceArray
(
HPROFILE
profile
,
DWORD
intent
,
DWORD
type
,
PBYTE
buffer
,
BOOL
WINAPI
GetPS2ColorSpaceArray
(
HPROFILE
profile
,
DWORD
intent
,
DWORD
type
,
PBYTE
buffer
,
PDWORD
size
,
PBOOL
binary
)
PDWORD
size
,
PBOOL
binary
)
{
{
FIXME
(
"( %p,
0x%08x, 0x%08
x, %p, %p, %p ) stub
\n
"
,
profile
,
intent
,
type
,
buffer
,
size
,
binary
);
FIXME
(
"( %p,
%#lx, %#l
x, %p, %p, %p ) stub
\n
"
,
profile
,
intent
,
type
,
buffer
,
size
,
binary
);
return
FALSE
;
return
FALSE
;
}
}
...
@@ -156,33 +156,33 @@ BOOL WINAPI SelectCMM( DWORD id )
...
@@ -156,33 +156,33 @@ BOOL WINAPI SelectCMM( DWORD id )
BOOL
WINAPI
SetColorProfileElementReference
(
HPROFILE
profile
,
TAGTYPE
type
,
TAGTYPE
ref
)
BOOL
WINAPI
SetColorProfileElementReference
(
HPROFILE
profile
,
TAGTYPE
type
,
TAGTYPE
ref
)
{
{
FIXME
(
"( %p,
0x%08x, 0x%08
x ) stub
\n
"
,
profile
,
type
,
ref
);
FIXME
(
"( %p,
%#lx, %#l
x ) stub
\n
"
,
profile
,
type
,
ref
);
return
TRUE
;
return
TRUE
;
}
}
BOOL
WINAPI
SetColorProfileElementSize
(
HPROFILE
profile
,
TAGTYPE
type
,
DWORD
size
)
BOOL
WINAPI
SetColorProfileElementSize
(
HPROFILE
profile
,
TAGTYPE
type
,
DWORD
size
)
{
{
FIXME
(
"( %p,
0x%08x, 0x%08
x ) stub
\n
"
,
profile
,
type
,
size
);
FIXME
(
"( %p,
%#lx, %#l
x ) stub
\n
"
,
profile
,
type
,
size
);
return
FALSE
;
return
FALSE
;
}
}
BOOL
WINAPI
SetStandardColorSpaceProfileA
(
PCSTR
machine
,
DWORD
id
,
PSTR
profile
)
BOOL
WINAPI
SetStandardColorSpaceProfileA
(
PCSTR
machine
,
DWORD
id
,
PSTR
profile
)
{
{
FIXME
(
"(
0x%08
x, %p ) stub
\n
"
,
id
,
profile
);
FIXME
(
"(
%#l
x, %p ) stub
\n
"
,
id
,
profile
);
return
TRUE
;
return
TRUE
;
}
}
BOOL
WINAPI
SetStandardColorSpaceProfileW
(
PCWSTR
machine
,
DWORD
id
,
PWSTR
profile
)
BOOL
WINAPI
SetStandardColorSpaceProfileW
(
PCWSTR
machine
,
DWORD
id
,
PWSTR
profile
)
{
{
FIXME
(
"(
0x%08
x, %p ) stub
\n
"
,
id
,
profile
);
FIXME
(
"(
%#l
x, %p ) stub
\n
"
,
id
,
profile
);
return
TRUE
;
return
TRUE
;
}
}
BOOL
WINAPI
SpoolerCopyFileEvent
(
LPWSTR
printer
,
LPWSTR
key
,
DWORD
event
)
BOOL
WINAPI
SpoolerCopyFileEvent
(
LPWSTR
printer
,
LPWSTR
key
,
DWORD
event
)
{
{
FIXME
(
"( %s, %s,
0x%08
x ) stub
\n
"
,
debugstr_w
(
printer
),
debugstr_w
(
key
),
event
);
FIXME
(
"( %s, %s,
%#l
x ) stub
\n
"
,
debugstr_w
(
printer
),
debugstr_w
(
key
),
event
);
return
TRUE
;
return
TRUE
;
}
}
...
...
dlls/mscms/tests/Makefile.in
View file @
5442ddc7
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
mscms.dll
TESTDLL
=
mscms.dll
IMPORTS
=
advapi32
IMPORTS
=
advapi32
...
...
dlls/mscms/tests/profile.c
View file @
5442ddc7
...
@@ -161,29 +161,25 @@ static void test_GetColorDirectoryA(void)
...
@@ -161,29 +161,25 @@ static void test_GetColorDirectoryA(void)
/* Parameter checks */
/* Parameter checks */
ret
=
pGetColorDirectoryA
(
NULL
,
NULL
,
NULL
);
ret
=
pGetColorDirectoryA
(
NULL
,
NULL
,
NULL
);
ok
(
!
ret
,
"GetColorDirectoryA() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"GetColorDirectoryA() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
size
=
0
;
size
=
0
;
ret
=
pGetColorDirectoryA
(
NULL
,
NULL
,
&
size
);
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
;
size
=
0
;
ret
=
pGetColorDirectoryA
(
NULL
,
buffer
,
&
size
);
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
;
size
=
1
;
ret
=
pGetColorDirectoryA
(
NULL
,
buffer
,
&
size
);
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 */
/* Functional checks */
size
=
sizeof
(
buffer
);
size
=
sizeof
(
buffer
);
ret
=
pGetColorDirectoryA
(
NULL
,
buffer
,
&
size
);
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
)
static
void
test_GetColorDirectoryW
(
void
)
...
@@ -195,33 +191,27 @@ static void test_GetColorDirectoryW(void)
...
@@ -195,33 +191,27 @@ static void test_GetColorDirectoryW(void)
/* Parameter checks */
/* Parameter checks */
/* This one crashes win2k
/* This one crashes win2k
ret = pGetColorDirectoryW( NULL, NULL, NULL );
ret = pGetColorDirectoryW( NULL, NULL, NULL );
ok( !ret, "GetColorDirectoryW() succeeded (%d)\n", GetLastError() );
ok( !ret, "GetColorDirectoryW() succeeded (%lu)\n", GetLastError() );
*/
*/
size
=
0
;
size
=
0
;
ret
=
pGetColorDirectoryW
(
NULL
,
NULL
,
&
size
);
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
;
size
=
0
;
ret
=
pGetColorDirectoryW
(
NULL
,
buffer
,
&
size
);
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
;
size
=
1
;
ret
=
pGetColorDirectoryW
(
NULL
,
buffer
,
&
size
);
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 */
/* Functional checks */
size
=
sizeof
(
buffer
);
size
=
sizeof
(
buffer
);
ret
=
pGetColorDirectoryW
(
NULL
,
buffer
,
&
size
);
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
)
static
void
test_GetColorProfileElement
(
char
*
standardprofile
)
...
@@ -241,15 +231,15 @@ static void test_GetColorProfileElement( char *standardprofile )
...
@@ -241,15 +231,15 @@ static void test_GetColorProfileElement( char *standardprofile )
profile
.
cbDataSize
=
strlen
(
standardprofile
);
profile
.
cbDataSize
=
strlen
(
standardprofile
);
handle
=
pOpenColorProfileA
(
&
profile
,
PROFILE_READ
,
0
,
OPEN_EXISTING
);
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 */
/* Parameter checks */
ret
=
pGetColorProfileElement
(
handle
,
tag
,
0
,
NULL
,
NULL
,
&
ref
);
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
);
ret
=
pGetColorProfileElement
(
handle
,
tag
,
0
,
&
size
,
NULL
,
NULL
);
ok
(
!
ret
,
"GetColorProfileElement() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"GetColorProfileElement() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
size
=
0
;
size
=
0
;
ret
=
pGetColorProfileElement
(
handle
,
tag
,
0
,
&
size
,
NULL
,
&
ref
);
ret
=
pGetColorProfileElement
(
handle
,
tag
,
0
,
&
size
,
NULL
,
&
ref
);
...
@@ -260,7 +250,7 @@ static void test_GetColorProfileElement( char *standardprofile )
...
@@ -260,7 +250,7 @@ static void test_GetColorProfileElement( char *standardprofile )
size
=
sizeof
(
buffer
);
size
=
sizeof
(
buffer
);
ret
=
pGetColorProfileElement
(
handle
,
tag
,
0
,
&
size
,
buffer
,
&
ref
);
ret
=
pGetColorProfileElement
(
handle
,
tag
,
0
,
&
size
,
buffer
,
&
ref
);
ok
(
ret
,
"GetColorProfileElement() failed %u
\n
"
,
GetLastError
()
);
ok
(
ret
,
"GetColorProfileElement() failed %
l
u
\n
"
,
GetLastError
()
);
ok
(
size
>
0
,
"wrong size
\n
"
);
ok
(
size
>
0
,
"wrong size
\n
"
);
ok
(
!
memcmp
(
buffer
,
expect
,
sizeof
(
expect
)
-
1
),
"Unexpected tag data
\n
"
);
ok
(
!
memcmp
(
buffer
,
expect
,
sizeof
(
expect
)
-
1
),
"Unexpected tag data
\n
"
);
...
@@ -283,27 +273,26 @@ static void test_GetColorProfileElementTag( char *standardprofile )
...
@@ -283,27 +273,26 @@ static void test_GetColorProfileElementTag( char *standardprofile )
profile
.
cbDataSize
=
strlen
(
standardprofile
);
profile
.
cbDataSize
=
strlen
(
standardprofile
);
handle
=
pOpenColorProfileA
(
&
profile
,
PROFILE_READ
,
0
,
OPEN_EXISTING
);
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 */
/* Parameter checks */
ret
=
pGetColorProfileElementTag
(
NULL
,
index
,
&
tag
);
ret
=
pGetColorProfileElementTag
(
NULL
,
index
,
&
tag
);
ok
(
!
ret
,
"GetColorProfileElementTag() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"GetColorProfileElementTag() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
ret
=
pGetColorProfileElementTag
(
handle
,
0
,
&
tag
);
ret
=
pGetColorProfileElementTag
(
handle
,
0
,
&
tag
);
ok
(
!
ret
,
"GetColorProfileElementTag() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"GetColorProfileElementTag() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
ret
=
pGetColorProfileElementTag
(
handle
,
index
,
NULL
);
ret
=
pGetColorProfileElementTag
(
handle
,
index
,
NULL
);
ok
(
!
ret
,
"GetColorProfileElementTag() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"GetColorProfileElementTag() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
ret
=
pGetColorProfileElementTag
(
handle
,
18
,
NULL
);
ret
=
pGetColorProfileElementTag
(
handle
,
18
,
NULL
);
ok
(
!
ret
,
"GetColorProfileElementTag() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"GetColorProfileElementTag() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
/* Functional checks */
/* Functional checks */
while
((
ret
=
pGetColorProfileElementTag
(
handle
,
index
,
&
tag
))
&&
tag
!=
expect
)
index
++
;
while
((
ret
=
pGetColorProfileElementTag
(
handle
,
index
,
&
tag
))
&&
tag
!=
expect
)
index
++
;
ok
(
ret
&&
tag
==
expect
,
"GetColorProfileElementTag() failed (%d)
\n
"
,
ok
(
ret
&&
tag
==
expect
,
"GetColorProfileElementTag() failed (%lu)
\n
"
,
GetLastError
()
);
GetLastError
()
);
pCloseColorProfile
(
handle
);
pCloseColorProfile
(
handle
);
}
}
...
@@ -325,40 +314,40 @@ static void test_GetColorProfileFromHandle( char *testprofile )
...
@@ -325,40 +314,40 @@ static void test_GetColorProfileFromHandle( char *testprofile )
profile
.
cbDataSize
=
strlen
(
testprofile
);
profile
.
cbDataSize
=
strlen
(
testprofile
);
handle
=
pOpenColorProfileA
(
&
profile
,
PROFILE_READ
,
0
,
OPEN_EXISTING
);
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 */
/* Parameter checks */
size
=
0
;
size
=
0
;
ret
=
pGetColorProfileFromHandle
(
handle
,
NULL
,
&
size
);
ret
=
pGetColorProfileFromHandle
(
handle
,
NULL
,
&
size
);
ok
(
!
ret
&&
size
>
0
,
"GetColorProfileFromHandle() failed (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
&&
size
>
0
,
"GetColorProfileFromHandle() failed (%
lu
)
\n
"
,
GetLastError
()
);
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
buffer
)
if
(
buffer
)
{
{
ret
=
pGetColorProfileFromHandle
(
NULL
,
buffer
,
&
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
);
ret
=
pGetColorProfileFromHandle
(
handle
,
buffer
,
NULL
);
ok
(
!
ret
,
"GetColorProfileFromHandle() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"GetColorProfileFromHandle() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
/* Functional checks */
/* Functional checks */
ret
=
pGetColorProfileFromHandle
(
handle
,
buffer
,
&
size
);
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
;
header
=
(
PROFILEHEADER
*
)
buffer
;
ok
(
header
->
phClass
==
0x72746e6d
,
"wrong phClass %x
\n
"
,
header
->
phClass
);
ok
(
header
->
phClass
==
0x72746e6d
,
"wrong phClass %
l
x
\n
"
,
header
->
phClass
);
ok
(
header
->
phDataColorSpace
==
0x20424752
,
"wrong phDataColorSpace %x
\n
"
,
header
->
phDataColorSpace
);
ok
(
header
->
phDataColorSpace
==
0x20424752
,
"wrong phDataColorSpace %
l
x
\n
"
,
header
->
phDataColorSpace
);
ok
(
header
->
phConnectionSpace
==
0x205a5958
,
"wrong phConnectionSpace %x
\n
"
,
header
->
phConnectionSpace
);
ok
(
header
->
phConnectionSpace
==
0x205a5958
,
"wrong phConnectionSpace %
l
x
\n
"
,
header
->
phConnectionSpace
);
ok
(
header
->
phSignature
==
0x70736361
,
"wrong phSignature %x
\n
"
,
header
->
phSignature
);
ok
(
header
->
phSignature
==
0x70736361
,
"wrong phSignature %
l
x
\n
"
,
header
->
phSignature
);
ok
(
header
->
phProfileFlags
==
0x00000000
,
"wrong phProfileFlags %x
\n
"
,
header
->
phProfileFlags
);
ok
(
header
->
phProfileFlags
==
0x00000000
,
"wrong phProfileFlags %
l
x
\n
"
,
header
->
phProfileFlags
);
ok
(
header
->
phRenderingIntent
==
0x00000000
,
"wrong phRenderingIntent %x
\n
"
,
header
->
phRenderingIntent
);
ok
(
header
->
phRenderingIntent
==
0x00000000
,
"wrong phRenderingIntent %
l
x
\n
"
,
header
->
phRenderingIntent
);
ok
(
header
->
phIlluminant
.
ciexyzX
==
0xd6f60000
,
"wrong phIlluminant.ciexyzX %x
\n
"
,
header
->
phIlluminant
.
ciexyzX
);
ok
(
header
->
phIlluminant
.
ciexyzX
==
0xd6f60000
,
"wrong phIlluminant.ciexyzX %
l
x
\n
"
,
header
->
phIlluminant
.
ciexyzX
);
ok
(
header
->
phIlluminant
.
ciexyzY
==
0x00000100
,
"wrong phIlluminant.ciexyzY %x
\n
"
,
header
->
phIlluminant
.
ciexyzY
);
ok
(
header
->
phIlluminant
.
ciexyzY
==
0x00000100
,
"wrong phIlluminant.ciexyzY %
l
x
\n
"
,
header
->
phIlluminant
.
ciexyzY
);
ok
(
header
->
phIlluminant
.
ciexyzZ
==
0x2dd30000
,
"wrong phIlluminant.ciexyzZ %x
\n
"
,
header
->
phIlluminant
.
ciexyzZ
);
ok
(
header
->
phIlluminant
.
ciexyzZ
==
0x2dd30000
,
"wrong phIlluminant.ciexyzZ %
l
x
\n
"
,
header
->
phIlluminant
.
ciexyzZ
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
}
}
...
@@ -381,36 +370,36 @@ static void test_GetColorProfileHeader( char *testprofile )
...
@@ -381,36 +370,36 @@ static void test_GetColorProfileHeader( char *testprofile )
profile
.
cbDataSize
=
strlen
(
testprofile
);
profile
.
cbDataSize
=
strlen
(
testprofile
);
handle
=
pOpenColorProfileA
(
&
profile
,
PROFILE_READ
,
0
,
OPEN_EXISTING
);
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 */
/* Parameter checks */
ret
=
pGetColorProfileHeader
(
NULL
,
NULL
);
ret
=
pGetColorProfileHeader
(
NULL
,
NULL
);
ok
(
!
ret
,
"GetColorProfileHeader() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"GetColorProfileHeader() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
ret
=
pGetColorProfileHeader
(
NULL
,
&
header
);
ret
=
pGetColorProfileHeader
(
NULL
,
&
header
);
ok
(
!
ret
,
"GetColorProfileHeader() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"GetColorProfileHeader() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
if
(
0
)
/* Crashes on Vista */
if
(
0
)
/* Crashes on Vista */
{
{
ret
=
pGetColorProfileHeader
(
handle
,
NULL
);
ret
=
pGetColorProfileHeader
(
handle
,
NULL
);
ok
(
!
ret
,
"GetColorProfileHeader() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"GetColorProfileHeader() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
}
}
/* Functional checks */
/* Functional checks */
ret
=
pGetColorProfileHeader
(
handle
,
&
header
);
ret
=
pGetColorProfileHeader
(
handle
,
&
header
);
ok
(
ret
,
"GetColorProfileHeader() failed (%
d
)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"GetColorProfileHeader() failed (%
lu
)
\n
"
,
GetLastError
()
);
ok
(
header
.
phClass
==
0x6d6e7472
,
"wrong phClass %x
\n
"
,
header
.
phClass
);
ok
(
header
.
phClass
==
0x6d6e7472
,
"wrong phClass %
#l
x
\n
"
,
header
.
phClass
);
ok
(
header
.
phDataColorSpace
==
0x52474220
,
"wrong phDataColorSpace %x
\n
"
,
header
.
phDataColorSpace
);
ok
(
header
.
phDataColorSpace
==
0x52474220
,
"wrong phDataColorSpace %
#l
x
\n
"
,
header
.
phDataColorSpace
);
ok
(
header
.
phConnectionSpace
==
0x58595a20
,
"wrong phConnectionSpace %x
\n
"
,
header
.
phConnectionSpace
);
ok
(
header
.
phConnectionSpace
==
0x58595a20
,
"wrong phConnectionSpace %
#l
x
\n
"
,
header
.
phConnectionSpace
);
ok
(
header
.
phSignature
==
0x61637370
,
"wrong phSignature %x
\n
"
,
header
.
phSignature
);
ok
(
header
.
phSignature
==
0x61637370
,
"wrong phSignature %
#l
x
\n
"
,
header
.
phSignature
);
ok
(
header
.
phProfileFlags
==
0x00000000
,
"wrong phProfileFlags %x
\n
"
,
header
.
phProfileFlags
);
ok
(
header
.
phProfileFlags
==
0x00000000
,
"wrong phProfileFlags %
#l
x
\n
"
,
header
.
phProfileFlags
);
ok
(
header
.
phRenderingIntent
==
0x00000000
,
"wrong phRenderingIntent %x
\n
"
,
header
.
phRenderingIntent
);
ok
(
header
.
phRenderingIntent
==
0x00000000
,
"wrong phRenderingIntent %
#l
x
\n
"
,
header
.
phRenderingIntent
);
ok
(
header
.
phIlluminant
.
ciexyzX
==
0x0000f6d6
,
"wrong phIlluminant.ciexyzX %x
\n
"
,
header
.
phIlluminant
.
ciexyzX
);
ok
(
header
.
phIlluminant
.
ciexyzX
==
0x0000f6d6
,
"wrong phIlluminant.ciexyzX %
#l
x
\n
"
,
header
.
phIlluminant
.
ciexyzX
);
ok
(
header
.
phIlluminant
.
ciexyzY
==
0x00010000
,
"wrong phIlluminant.ciexyzY %x
\n
"
,
header
.
phIlluminant
.
ciexyzY
);
ok
(
header
.
phIlluminant
.
ciexyzY
==
0x00010000
,
"wrong phIlluminant.ciexyzY %
#l
x
\n
"
,
header
.
phIlluminant
.
ciexyzY
);
ok
(
header
.
phIlluminant
.
ciexyzZ
==
0x0000d32d
,
"wrong phIlluminant.ciexyzZ %x
\n
"
,
header
.
phIlluminant
.
ciexyzZ
);
ok
(
header
.
phIlluminant
.
ciexyzZ
==
0x0000d32d
,
"wrong phIlluminant.ciexyzZ %
#l
x
\n
"
,
header
.
phIlluminant
.
ciexyzZ
);
pCloseColorProfile
(
handle
);
pCloseColorProfile
(
handle
);
}
}
...
@@ -430,23 +419,21 @@ static void test_GetCountColorProfileElements( char *standardprofile )
...
@@ -430,23 +419,21 @@ static void test_GetCountColorProfileElements( char *standardprofile )
profile
.
cbDataSize
=
strlen
(
standardprofile
);
profile
.
cbDataSize
=
strlen
(
standardprofile
);
handle
=
pOpenColorProfileA
(
&
profile
,
PROFILE_READ
,
0
,
OPEN_EXISTING
);
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 */
/* Parameter checks */
ret
=
pGetCountColorProfileElements
(
NULL
,
&
count
);
ret
=
pGetCountColorProfileElements
(
NULL
,
&
count
);
ok
(
!
ret
,
"GetCountColorProfileElements() succeeded (%d)
\n
"
,
ok
(
!
ret
,
"GetCountColorProfileElements() succeeded (%lu)
\n
"
,
GetLastError
()
);
GetLastError
()
);
ret
=
pGetCountColorProfileElements
(
handle
,
NULL
);
ret
=
pGetCountColorProfileElements
(
handle
,
NULL
);
ok
(
!
ret
,
"GetCountColorProfileElements() succeeded (%d)
\n
"
,
ok
(
!
ret
,
"GetCountColorProfileElements() succeeded (%lu)
\n
"
,
GetLastError
()
);
GetLastError
()
);
/* Functional checks */
/* Functional checks */
ret
=
pGetCountColorProfileElements
(
handle
,
&
count
);
ret
=
pGetCountColorProfileElements
(
handle
,
&
count
);
ok
(
ret
&&
count
>
15
&&
count
<
20
,
ok
(
ret
&&
count
>
15
&&
count
<
20
,
"GetCountColorProfileElements() failed (%
d) %
u
\n
"
,
GetLastError
(),
count
);
"GetCountColorProfileElements() failed (%
lu) %l
u
\n
"
,
GetLastError
(),
count
);
pCloseColorProfile
(
handle
);
pCloseColorProfile
(
handle
);
}
}
...
@@ -466,28 +453,32 @@ static void test_GetStandardColorSpaceProfileA( char *standardprofile )
...
@@ -466,28 +453,32 @@ static void test_GetStandardColorSpaceProfileA( char *standardprofile )
size
=
sizeof
(
newprofile
);
size
=
sizeof
(
newprofile
);
SetLastError
(
0xfaceabee
);
/* 1st param, */
SetLastError
(
0xfaceabee
);
/* 1st param, */
ret
=
pGetStandardColorSpaceProfileA
(
machine
,
LCS_sRGB
,
newprofile
,
&
size
);
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
);
size
=
sizeof
(
newprofile
);
SetLastError
(
0xfaceabee
);
/* 2nd param, */
SetLastError
(
0xfaceabee
);
/* 2nd param, */
ret
=
pGetStandardColorSpaceProfileA
(
NULL
,
(
DWORD
)
-
1
,
newprofile
,
&
size
);
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
);
size
=
sizeof
(
newprofile
);
SetLastError
(
0xfaceabee
);
/* 4th param, */
SetLastError
(
0xfaceabee
);
/* 4th param, */
ret
=
pGetStandardColorSpaceProfileA
(
NULL
,
LCS_sRGB
,
newprofile
,
NULL
);
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
);
size
=
sizeof
(
newprofile
);
SetLastError
(
0xfaceabee
);
/* 3rd param, */
SetLastError
(
0xfaceabee
);
/* 3rd param, */
ret
=
pGetStandardColorSpaceProfileA
(
NULL
,
LCS_sRGB
,
NULL
,
&
size
);
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
;
size
=
0
;
SetLastError
(
0xfaceabee
);
/* dereferenced 4th param, */
SetLastError
(
0xfaceabee
);
/* dereferenced 4th param, */
ret
=
pGetStandardColorSpaceProfileA
(
NULL
,
LCS_sRGB
,
newprofile
,
&
size
);
ret
=
pGetStandardColorSpaceProfileA
(
NULL
,
LCS_sRGB
,
newprofile
,
&
size
);
ok
(
!
ret
&&
(
GetLastError
()
==
ERROR_MORE_DATA
||
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
),
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: */
/* Several invalid parameter checks: */
...
@@ -495,30 +486,32 @@ static void test_GetStandardColorSpaceProfileA( char *standardprofile )
...
@@ -495,30 +486,32 @@ static void test_GetStandardColorSpaceProfileA( char *standardprofile )
SetLastError
(
0xfaceabee
);
/* 1st, maybe 2nd and then dereferenced 4th param, */
SetLastError
(
0xfaceabee
);
/* 1st, maybe 2nd and then dereferenced 4th param, */
ret
=
pGetStandardColorSpaceProfileA
(
machine
,
0
,
newprofile
,
&
size
);
ret
=
pGetStandardColorSpaceProfileA
(
machine
,
0
,
newprofile
,
&
size
);
ok
(
!
ret
&&
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
||
GetLastError
()
==
ERROR_NOT_SUPPORTED
),
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, */
SetLastError
(
0xfaceabee
);
/* maybe 2nd and then 4th param, */
ret
=
pGetStandardColorSpaceProfileA
(
NULL
,
0
,
newprofile
,
NULL
);
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
;
size
=
0
;
SetLastError
(
0xfaceabee
);
/* maybe 2nd, then 3rd and dereferenced 4th param, */
SetLastError
(
0xfaceabee
);
/* maybe 2nd, then 3rd and dereferenced 4th param, */
ret
=
pGetStandardColorSpaceProfileA
(
NULL
,
0
,
NULL
,
&
size
);
ret
=
pGetStandardColorSpaceProfileA
(
NULL
,
0
,
NULL
,
&
size
);
ok
(
!
ret
&&
(
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
||
GetLastError
()
==
ERROR_FILE_NOT_FOUND
),
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
);
size
=
sizeof
(
newprofile
);
SetLastError
(
0xfaceabee
);
/* maybe 2nd param. */
SetLastError
(
0xfaceabee
);
/* maybe 2nd param. */
ret
=
pGetStandardColorSpaceProfileA
(
NULL
,
0
,
newprofile
,
&
size
);
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
,
else
ok
(
!
lstrcmpiA
(
newprofile
,
""
)
&&
GetLastError
()
==
0xfaceabee
,
"GetStandardColorSpaceProfileA() returns %d (GLE=%
d
)
\n
"
,
ret
,
GetLastError
()
);
"GetStandardColorSpaceProfileA() returns %d (GLE=%
lu
)
\n
"
,
ret
,
GetLastError
()
);
/* Functional checks */
/* Functional checks */
size
=
sizeof
(
oldprofile
);
size
=
sizeof
(
oldprofile
);
ret
=
pGetStandardColorSpaceProfileA
(
NULL
,
LCS_sRGB
,
oldprofile
,
&
size
);
ret
=
pGetStandardColorSpaceProfileA
(
NULL
,
LCS_sRGB
,
oldprofile
,
&
size
);
ok
(
ret
,
"GetStandardColorSpaceProfileA() failed (%
d
)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"GetStandardColorSpaceProfileA() failed (%
lu
)
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ret
=
pSetStandardColorSpaceProfileA
(
NULL
,
LCS_sRGB
,
standardprofile
);
ret
=
pSetStandardColorSpaceProfileA
(
NULL
,
LCS_sRGB
,
standardprofile
);
...
@@ -527,14 +520,14 @@ static void test_GetStandardColorSpaceProfileA( char *standardprofile )
...
@@ -527,14 +520,14 @@ static void test_GetStandardColorSpaceProfileA( char *standardprofile )
skip
(
"Not enough rights for SetStandardColorSpaceProfileA
\n
"
);
skip
(
"Not enough rights for SetStandardColorSpaceProfileA
\n
"
);
return
;
return
;
}
}
ok
(
ret
,
"SetStandardColorSpaceProfileA() failed (%
d
)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"SetStandardColorSpaceProfileA() failed (%
lu
)
\n
"
,
GetLastError
()
);
size
=
sizeof
(
newprofile
);
size
=
sizeof
(
newprofile
);
ret
=
pGetStandardColorSpaceProfileA
(
NULL
,
LCS_sRGB
,
newprofile
,
&
size
);
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
);
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
)
static
void
test_GetStandardColorSpaceProfileW
(
WCHAR
*
standardprofileW
)
...
@@ -552,19 +545,21 @@ static void test_GetStandardColorSpaceProfileW( WCHAR *standardprofileW )
...
@@ -552,19 +545,21 @@ static void test_GetStandardColorSpaceProfileW( WCHAR *standardprofileW )
size
=
sizeof
(
newprofile
);
size
=
sizeof
(
newprofile
);
SetLastError
(
0xfaceabee
);
/* 1st param, */
SetLastError
(
0xfaceabee
);
/* 1st param, */
ret
=
pGetStandardColorSpaceProfileW
(
machineW
,
LCS_sRGB
,
newprofile
,
&
size
);
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
);
size
=
sizeof
(
newprofile
);
SetLastError
(
0xfaceabee
);
/* 2nd param, */
SetLastError
(
0xfaceabee
);
/* 2nd param, */
ret
=
pGetStandardColorSpaceProfileW
(
NULL
,
(
DWORD
)
-
1
,
newprofile
,
&
size
);
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
);
size
=
sizeof
(
newprofile
);
SetLastError
(
0xfaceabee
);
/* 2nd param, */
SetLastError
(
0xfaceabee
);
/* 2nd param, */
ret
=
pGetStandardColorSpaceProfileW
(
NULL
,
0
,
newprofile
,
&
size
);
ret
=
pGetStandardColorSpaceProfileW
(
NULL
,
0
,
newprofile
,
&
size
);
ok
(
(
!
ret
&&
GetLastError
()
==
ERROR_FILE_NOT_FOUND
)
||
ok
(
(
!
ret
&&
GetLastError
()
==
ERROR_FILE_NOT_FOUND
)
||
broken
(
ret
),
/* Win98 and WinME */
broken
(
ret
),
/* Win98 and WinME */
"GetStandardColorSpaceProfileW() returns %d (GLE=%
d
)
\n
"
,
ret
,
GetLastError
()
);
"GetStandardColorSpaceProfileW() returns %d (GLE=%
lu
)
\n
"
,
ret
,
GetLastError
()
);
size
=
sizeof
(
newprofile
);
size
=
sizeof
(
newprofile
);
SetLastError
(
0xfaceabee
);
/* 3rd param, */
SetLastError
(
0xfaceabee
);
/* 3rd param, */
...
@@ -572,12 +567,13 @@ static void test_GetStandardColorSpaceProfileW( WCHAR *standardprofileW )
...
@@ -572,12 +567,13 @@ static void test_GetStandardColorSpaceProfileW( WCHAR *standardprofileW )
ok
(
!
ret
||
broken
(
ret
)
/* win98 */
,
"GetStandardColorSpaceProfileW succeeded
\n
"
);
ok
(
!
ret
||
broken
(
ret
)
/* win98 */
,
"GetStandardColorSpaceProfileW succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
||
ok
(
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
||
broken
(
GetLastError
()
==
0xfaceabee
)
/* win98 */
,
broken
(
GetLastError
()
==
0xfaceabee
)
/* win98 */
,
"GetStandardColorSpaceProfileW() returns GLE=%u
\n
"
,
GetLastError
()
);
"GetStandardColorSpaceProfileW() returns GLE=%
l
u
\n
"
,
GetLastError
()
);
size
=
sizeof
(
newprofile
);
size
=
sizeof
(
newprofile
);
SetLastError
(
0xfaceabee
);
/* 4th param, */
SetLastError
(
0xfaceabee
);
/* 4th param, */
ret
=
pGetStandardColorSpaceProfileW
(
NULL
,
LCS_sRGB
,
newprofile
,
NULL
);
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
;
size
=
0
;
SetLastError
(
0xfaceabee
);
/* dereferenced 4th param. */
SetLastError
(
0xfaceabee
);
/* dereferenced 4th param. */
...
@@ -586,7 +582,7 @@ static void test_GetStandardColorSpaceProfileW( WCHAR *standardprofileW )
...
@@ -586,7 +582,7 @@ static void test_GetStandardColorSpaceProfileW( WCHAR *standardprofileW )
ok
(
GetLastError
()
==
ERROR_MORE_DATA
||
ok
(
GetLastError
()
==
ERROR_MORE_DATA
||
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
||
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
||
broken
(
GetLastError
()
==
0xfaceabee
)
/* win98 */
,
broken
(
GetLastError
()
==
0xfaceabee
)
/* win98 */
,
"GetStandardColorSpaceProfileW() returns GLE=%u
\n
"
,
GetLastError
()
);
"GetStandardColorSpaceProfileW() returns GLE=%
l
u
\n
"
,
GetLastError
()
);
/* Several invalid parameter checks: */
/* Several invalid parameter checks: */
...
@@ -594,11 +590,12 @@ static void test_GetStandardColorSpaceProfileW( WCHAR *standardprofileW )
...
@@ -594,11 +590,12 @@ static void test_GetStandardColorSpaceProfileW( WCHAR *standardprofileW )
SetLastError
(
0xfaceabee
);
/* 1st, maybe 2nd and then dereferenced 4th param, */
SetLastError
(
0xfaceabee
);
/* 1st, maybe 2nd and then dereferenced 4th param, */
ret
=
pGetStandardColorSpaceProfileW
(
machineW
,
0
,
newprofile
,
&
size
);
ret
=
pGetStandardColorSpaceProfileW
(
machineW
,
0
,
newprofile
,
&
size
);
ok
(
!
ret
&&
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
||
GetLastError
()
==
ERROR_NOT_SUPPORTED
),
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, */
SetLastError
(
0xfaceabee
);
/* maybe 2nd and then 4th param, */
ret
=
pGetStandardColorSpaceProfileW
(
NULL
,
0
,
newprofile
,
NULL
);
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
;
size
=
0
;
SetLastError
(
0xfaceabee
);
/* maybe 2nd, then 3rd and dereferenced 4th param, */
SetLastError
(
0xfaceabee
);
/* maybe 2nd, then 3rd and dereferenced 4th param, */
...
@@ -607,24 +604,25 @@ static void test_GetStandardColorSpaceProfileW( WCHAR *standardprofileW )
...
@@ -607,24 +604,25 @@ static void test_GetStandardColorSpaceProfileW( WCHAR *standardprofileW )
ok
(
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
||
ok
(
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
||
GetLastError
()
==
ERROR_FILE_NOT_FOUND
||
GetLastError
()
==
ERROR_FILE_NOT_FOUND
||
broken
(
GetLastError
()
==
0xfaceabee
)
/* win98 */
,
broken
(
GetLastError
()
==
0xfaceabee
)
/* win98 */
,
"GetStandardColorSpaceProfileW() returns GLE=%u
\n
"
,
GetLastError
()
);
"GetStandardColorSpaceProfileW() returns GLE=%
l
u
\n
"
,
GetLastError
()
);
size
=
sizeof
(
newprofile
);
size
=
sizeof
(
newprofile
);
SetLastError
(
0xfaceabee
);
/* maybe 2nd param. */
SetLastError
(
0xfaceabee
);
/* maybe 2nd param. */
ret
=
pGetStandardColorSpaceProfileW
(
NULL
,
0
,
newprofile
,
&
size
);
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
else
{
{
WideCharToMultiByte
(
CP_ACP
,
0
,
newprofile
,
-
1
,
newprofileA
,
sizeof
(
newprofileA
),
NULL
,
NULL
);
WideCharToMultiByte
(
CP_ACP
,
0
,
newprofile
,
-
1
,
newprofileA
,
sizeof
(
newprofileA
),
NULL
,
NULL
);
ok
(
!
lstrcmpiA
(
newprofileA
,
""
)
&&
GetLastError
()
==
0xfaceabee
,
ok
(
!
lstrcmpiA
(
newprofileA
,
""
)
&&
GetLastError
()
==
0xfaceabee
,
"GetStandardColorSpaceProfileW() returns %d (GLE=%
d
)
\n
"
,
ret
,
GetLastError
()
);
"GetStandardColorSpaceProfileW() returns %d (GLE=%
lu
)
\n
"
,
ret
,
GetLastError
()
);
}
}
/* Functional checks */
/* Functional checks */
size
=
sizeof
(
oldprofile
);
size
=
sizeof
(
oldprofile
);
ret
=
pGetStandardColorSpaceProfileW
(
NULL
,
LCS_sRGB
,
oldprofile
,
&
size
);
ret
=
pGetStandardColorSpaceProfileW
(
NULL
,
LCS_sRGB
,
oldprofile
,
&
size
);
ok
(
ret
,
"GetStandardColorSpaceProfileW() failed (%
d
)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"GetStandardColorSpaceProfileW() failed (%
lu
)
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ret
=
pSetStandardColorSpaceProfileW
(
NULL
,
LCS_sRGB
,
standardprofileW
);
ret
=
pSetStandardColorSpaceProfileW
(
NULL
,
LCS_sRGB
,
standardprofileW
);
...
@@ -633,14 +631,14 @@ static void test_GetStandardColorSpaceProfileW( WCHAR *standardprofileW )
...
@@ -633,14 +631,14 @@ static void test_GetStandardColorSpaceProfileW( WCHAR *standardprofileW )
skip
(
"Not enough rights for SetStandardColorSpaceProfileW
\n
"
);
skip
(
"Not enough rights for SetStandardColorSpaceProfileW
\n
"
);
return
;
return
;
}
}
ok
(
ret
,
"SetStandardColorSpaceProfileW() failed (%
d
)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"SetStandardColorSpaceProfileW() failed (%
lu
)
\n
"
,
GetLastError
()
);
size
=
sizeof
(
newprofile
);
size
=
sizeof
(
newprofile
);
ret
=
pGetStandardColorSpaceProfileW
(
NULL
,
LCS_sRGB
,
newprofile
,
&
size
);
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
);
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
)
static
void
test_EnumColorProfilesA
(
char
*
standardprofile
)
...
@@ -663,7 +661,7 @@ static void test_EnumColorProfilesA( char *standardprofile )
...
@@ -663,7 +661,7 @@ static void test_EnumColorProfilesA( char *standardprofile )
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ret
=
pEnumColorProfilesA
(
NULL
,
&
record
,
NULL
,
&
total
,
&
number
);
ret
=
pEnumColorProfilesA
(
NULL
,
&
record
,
NULL
,
&
total
,
&
number
);
ok
(
!
ret
,
"EnumColorProfilesA succeeded
\n
"
);
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 %
l
u
\n
"
,
GetLastError
()
);
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
total
);
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
total
);
size
=
total
;
size
=
total
;
...
@@ -678,7 +676,7 @@ static void test_EnumColorProfilesA( char *standardprofile )
...
@@ -678,7 +676,7 @@ static void test_EnumColorProfilesA( char *standardprofile )
ret
=
pEnumColorProfilesA
(
NULL
,
&
record
,
buffer
,
&
size
,
&
number
);
ret
=
pEnumColorProfilesA
(
NULL
,
&
record
,
buffer
,
&
size
,
&
number
);
todo_wine_if
(
!
have_color_profile
)
todo_wine_if
(
!
have_color_profile
)
ok
(
ret
,
"EnumColorProfilesA failed %u
\n
"
,
GetLastError
()
);
ok
(
ret
,
"EnumColorProfilesA failed %
l
u
\n
"
,
GetLastError
()
);
size
=
0
;
size
=
0
;
ret
=
pEnumColorProfilesA
(
NULL
,
&
record
,
buffer
,
&
size
,
&
number
);
ret
=
pEnumColorProfilesA
(
NULL
,
&
record
,
buffer
,
&
size
,
&
number
);
...
@@ -689,7 +687,7 @@ static void test_EnumColorProfilesA( char *standardprofile )
...
@@ -689,7 +687,7 @@ static void test_EnumColorProfilesA( char *standardprofile )
size
=
total
;
size
=
total
;
ret
=
pEnumColorProfilesA
(
NULL
,
&
record
,
buffer
,
&
size
,
&
number
);
ret
=
pEnumColorProfilesA
(
NULL
,
&
record
,
buffer
,
&
size
,
&
number
);
todo_wine_if
(
!
have_color_profile
)
todo_wine_if
(
!
have_color_profile
)
ok
(
ret
,
"EnumColorProfilesA failed %u
\n
"
,
GetLastError
()
);
ok
(
ret
,
"EnumColorProfilesA failed %
l
u
\n
"
,
GetLastError
()
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
}
}
...
@@ -714,7 +712,7 @@ static void test_EnumColorProfilesW( WCHAR *standardprofileW )
...
@@ -714,7 +712,7 @@ static void test_EnumColorProfilesW( WCHAR *standardprofileW )
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ret
=
pEnumColorProfilesW
(
NULL
,
&
record
,
NULL
,
&
total
,
&
number
);
ret
=
pEnumColorProfilesW
(
NULL
,
&
record
,
NULL
,
&
total
,
&
number
);
ok
(
!
ret
,
"EnumColorProfilesW succeeded
\n
"
);
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 %
l
u
\n
"
,
GetLastError
()
);
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
total
*
sizeof
(
WCHAR
)
);
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
total
*
sizeof
(
WCHAR
)
);
size
=
total
;
size
=
total
;
...
@@ -729,7 +727,7 @@ static void test_EnumColorProfilesW( WCHAR *standardprofileW )
...
@@ -729,7 +727,7 @@ static void test_EnumColorProfilesW( WCHAR *standardprofileW )
ret
=
pEnumColorProfilesW
(
NULL
,
&
record
,
buffer
,
&
size
,
&
number
);
ret
=
pEnumColorProfilesW
(
NULL
,
&
record
,
buffer
,
&
size
,
&
number
);
todo_wine_if
(
!
have_color_profile
)
todo_wine_if
(
!
have_color_profile
)
ok
(
ret
,
"EnumColorProfilesW failed %u
\n
"
,
GetLastError
()
);
ok
(
ret
,
"EnumColorProfilesW failed %
l
u
\n
"
,
GetLastError
()
);
size
=
0
;
size
=
0
;
ret
=
pEnumColorProfilesW
(
NULL
,
&
record
,
buffer
,
&
size
,
&
number
);
ret
=
pEnumColorProfilesW
(
NULL
,
&
record
,
buffer
,
&
size
,
&
number
);
...
@@ -740,7 +738,7 @@ static void test_EnumColorProfilesW( WCHAR *standardprofileW )
...
@@ -740,7 +738,7 @@ static void test_EnumColorProfilesW( WCHAR *standardprofileW )
size
=
total
;
size
=
total
;
ret
=
pEnumColorProfilesW
(
NULL
,
&
record
,
buffer
,
&
size
,
&
number
);
ret
=
pEnumColorProfilesW
(
NULL
,
&
record
,
buffer
,
&
size
,
&
number
);
todo_wine_if
(
!
have_color_profile
)
todo_wine_if
(
!
have_color_profile
)
ok
(
ret
,
"EnumColorProfilesW failed %u
\n
"
,
GetLastError
()
);
ok
(
ret
,
"EnumColorProfilesW failed %
l
u
\n
"
,
GetLastError
()
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
}
}
...
@@ -752,18 +750,18 @@ static void test_InstallColorProfileA( char *standardprofile, char *testprofile
...
@@ -752,18 +750,18 @@ static void test_InstallColorProfileA( char *standardprofile, char *testprofile
/* Parameter checks */
/* Parameter checks */
ret
=
pInstallColorProfileA
(
NULL
,
NULL
);
ret
=
pInstallColorProfileA
(
NULL
,
NULL
);
ok
(
!
ret
,
"InstallColorProfileA() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"InstallColorProfileA() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
ret
=
pInstallColorProfileA
(
machine
,
NULL
);
ret
=
pInstallColorProfileA
(
machine
,
NULL
);
ok
(
!
ret
,
"InstallColorProfileA() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"InstallColorProfileA() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
ret
=
pInstallColorProfileA
(
NULL
,
machine
);
ret
=
pInstallColorProfileA
(
NULL
,
machine
);
ok
(
!
ret
,
"InstallColorProfileA() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"InstallColorProfileA() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
if
(
standardprofile
)
if
(
standardprofile
)
{
{
ret
=
pInstallColorProfileA
(
NULL
,
standardprofile
);
ret
=
pInstallColorProfileA
(
NULL
,
standardprofile
);
ok
(
ret
,
"InstallColorProfileA() failed (%
d
)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"InstallColorProfileA() failed (%
lu
)
\n
"
,
GetLastError
()
);
}
}
/* Functional checks */
/* Functional checks */
...
@@ -781,10 +779,10 @@ static void test_InstallColorProfileA( char *standardprofile, char *testprofile
...
@@ -781,10 +779,10 @@ static void test_InstallColorProfileA( char *standardprofile, char *testprofile
skip
(
"Not enough rights for InstallColorProfileA
\n
"
);
skip
(
"Not enough rights for InstallColorProfileA
\n
"
);
return
;
return
;
}
}
ok
(
ret
,
"InstallColorProfileA() failed (%
d
)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"InstallColorProfileA() failed (%
lu
)
\n
"
,
GetLastError
()
);
ret
=
pGetColorDirectoryA
(
NULL
,
dest
,
&
size
);
ret
=
pGetColorDirectoryA
(
NULL
,
dest
,
&
size
);
ok
(
ret
,
"GetColorDirectoryA() failed (%
d
)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"GetColorDirectoryA() failed (%
lu
)
\n
"
,
GetLastError
()
);
MSCMS_basenameA
(
testprofile
,
base
);
MSCMS_basenameA
(
testprofile
,
base
);
...
@@ -793,11 +791,11 @@ static void test_InstallColorProfileA( char *standardprofile, char *testprofile
...
@@ -793,11 +791,11 @@ static void test_InstallColorProfileA( char *standardprofile, char *testprofile
/* Check if the profile is really there */
/* Check if the profile is really there */
handle
=
CreateFileA
(
dest
,
0
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
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
);
CloseHandle
(
handle
);
ret
=
pUninstallColorProfileA
(
NULL
,
dest
,
TRUE
);
ret
=
pUninstallColorProfileA
(
NULL
,
dest
,
TRUE
);
ok
(
ret
,
"UninstallColorProfileA() failed (%
d
)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"UninstallColorProfileA() failed (%
lu
)
\n
"
,
GetLastError
()
);
}
}
}
}
...
@@ -808,18 +806,18 @@ static void test_InstallColorProfileW( WCHAR *standardprofileW, WCHAR *testprofi
...
@@ -808,18 +806,18 @@ static void test_InstallColorProfileW( WCHAR *standardprofileW, WCHAR *testprofi
/* Parameter checks */
/* Parameter checks */
ret
=
pInstallColorProfileW
(
NULL
,
NULL
);
ret
=
pInstallColorProfileW
(
NULL
,
NULL
);
ok
(
!
ret
,
"InstallColorProfileW() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"InstallColorProfileW() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
ret
=
pInstallColorProfileW
(
machineW
,
NULL
);
ret
=
pInstallColorProfileW
(
machineW
,
NULL
);
ok
(
!
ret
,
"InstallColorProfileW() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"InstallColorProfileW() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
ret
=
pInstallColorProfileW
(
NULL
,
machineW
);
ret
=
pInstallColorProfileW
(
NULL
,
machineW
);
ok
(
!
ret
,
"InstallColorProfileW() failed (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"InstallColorProfileW() failed (%
lu
)
\n
"
,
GetLastError
()
);
if
(
standardprofileW
)
if
(
standardprofileW
)
{
{
ret
=
pInstallColorProfileW
(
NULL
,
standardprofileW
);
ret
=
pInstallColorProfileW
(
NULL
,
standardprofileW
);
ok
(
ret
,
"InstallColorProfileW() failed (%
d
)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"InstallColorProfileW() failed (%
lu
)
\n
"
,
GetLastError
()
);
}
}
/* Functional checks */
/* Functional checks */
...
@@ -837,10 +835,10 @@ static void test_InstallColorProfileW( WCHAR *standardprofileW, WCHAR *testprofi
...
@@ -837,10 +835,10 @@ static void test_InstallColorProfileW( WCHAR *standardprofileW, WCHAR *testprofi
skip
(
"Not enough rights for InstallColorProfileW
\n
"
);
skip
(
"Not enough rights for InstallColorProfileW
\n
"
);
return
;
return
;
}
}
ok
(
ret
,
"InstallColorProfileW() failed (%
d
)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"InstallColorProfileW() failed (%
lu
)
\n
"
,
GetLastError
()
);
ret
=
pGetColorDirectoryW
(
NULL
,
dest
,
&
size
);
ret
=
pGetColorDirectoryW
(
NULL
,
dest
,
&
size
);
ok
(
ret
,
"GetColorDirectoryW() failed (%
d
)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"GetColorDirectoryW() failed (%
lu
)
\n
"
,
GetLastError
()
);
MSCMS_basenameW
(
testprofileW
,
base
);
MSCMS_basenameW
(
testprofileW
,
base
);
...
@@ -849,11 +847,11 @@ static void test_InstallColorProfileW( WCHAR *standardprofileW, WCHAR *testprofi
...
@@ -849,11 +847,11 @@ static void test_InstallColorProfileW( WCHAR *standardprofileW, WCHAR *testprofi
/* Check if the profile is really there */
/* Check if the profile is really there */
handle
=
CreateFileW
(
dest
,
0
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
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
);
CloseHandle
(
handle
);
ret
=
pUninstallColorProfileW
(
NULL
,
dest
,
TRUE
);
ret
=
pUninstallColorProfileW
(
NULL
,
dest
,
TRUE
);
ok
(
ret
,
"UninstallColorProfileW() failed (%
d
)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"UninstallColorProfileW() failed (%
lu
)
\n
"
,
GetLastError
()
);
}
}
}
}
...
@@ -871,27 +869,27 @@ static void test_IsColorProfileTagPresent( char *standardprofile )
...
@@ -871,27 +869,27 @@ static void test_IsColorProfileTagPresent( char *standardprofile )
profile
.
cbDataSize
=
strlen
(
standardprofile
);
profile
.
cbDataSize
=
strlen
(
standardprofile
);
handle
=
pOpenColorProfileA
(
&
profile
,
PROFILE_READ
,
0
,
OPEN_EXISTING
);
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 */
/* Parameter checks */
tag
=
0
;
tag
=
0
;
ret
=
pIsColorProfileTagPresent
(
handle
,
tag
,
&
present
);
ret
=
pIsColorProfileTagPresent
(
handle
,
tag
,
&
present
);
ok
(
!
(
ret
&&
present
),
"IsColorProfileTagPresent() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
(
ret
&&
present
),
"IsColorProfileTagPresent() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
tag
=
0x63707274
;
/* 'cprt' */
tag
=
0x63707274
;
/* 'cprt' */
ret
=
pIsColorProfileTagPresent
(
NULL
,
tag
,
&
present
);
ret
=
pIsColorProfileTagPresent
(
NULL
,
tag
,
&
present
);
ok
(
!
ret
,
"IsColorProfileTagPresent() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"IsColorProfileTagPresent() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
ret
=
pIsColorProfileTagPresent
(
handle
,
tag
,
NULL
);
ret
=
pIsColorProfileTagPresent
(
handle
,
tag
,
NULL
);
ok
(
!
ret
,
"IsColorProfileTagPresent() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"IsColorProfileTagPresent() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
/* Functional checks */
/* Functional checks */
ret
=
pIsColorProfileTagPresent
(
handle
,
tag
,
&
present
);
ret
=
pIsColorProfileTagPresent
(
handle
,
tag
,
&
present
);
ok
(
ret
&&
present
,
"IsColorProfileTagPresent() failed (%
d
)
\n
"
,
GetLastError
()
);
ok
(
ret
&&
present
,
"IsColorProfileTagPresent() failed (%
lu
)
\n
"
,
GetLastError
()
);
pCloseColorProfile
(
handle
);
pCloseColorProfile
(
handle
);
}
}
...
@@ -910,16 +908,16 @@ static void test_OpenColorProfileA( char *standardprofile )
...
@@ -910,16 +908,16 @@ static void test_OpenColorProfileA( char *standardprofile )
/* Parameter checks */
/* Parameter checks */
handle
=
pOpenColorProfileA
(
NULL
,
0
,
0
,
0
);
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
);
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
);
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
);
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
"
);
ok
(
!
pCloseColorProfile
(
NULL
),
"CloseColorProfile() succeeded
\n
"
);
...
@@ -929,31 +927,31 @@ static void test_OpenColorProfileA( char *standardprofile )
...
@@ -929,31 +927,31 @@ static void test_OpenColorProfileA( char *standardprofile )
profile
.
cbDataSize
=
strlen
(
standardprofile
);
profile
.
cbDataSize
=
strlen
(
standardprofile
);
handle
=
pOpenColorProfileA
(
&
profile
,
0
,
0
,
0
);
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
);
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
);
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 */
/* Functional checks */
handle
=
pOpenColorProfileA
(
&
profile
,
PROFILE_READ
,
0
,
OPEN_EXISTING
);
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
);
ret
=
pCloseColorProfile
(
handle
);
ok
(
ret
,
"CloseColorProfile() failed (%
d
)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"CloseColorProfile() failed (%
lu
)
\n
"
,
GetLastError
()
);
profile
.
dwType
=
PROFILE_FILENAME
;
profile
.
dwType
=
PROFILE_FILENAME
;
profile
.
pProfileData
=
(
void
*
)
"sRGB Color Space Profile.icm"
;
profile
.
pProfileData
=
(
void
*
)
"sRGB Color Space Profile.icm"
;
profile
.
cbDataSize
=
sizeof
(
"sRGB Color Space Profile.icm"
);
profile
.
cbDataSize
=
sizeof
(
"sRGB Color Space Profile.icm"
);
handle
=
pOpenColorProfileA
(
&
profile
,
PROFILE_READ
,
FILE_SHARE_READ
,
OPEN_EXISTING
);
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
);
ret
=
pCloseColorProfile
(
handle
);
ok
(
ret
,
"CloseColorProfile() failed (%
d
)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"CloseColorProfile() failed (%
lu
)
\n
"
,
GetLastError
()
);
}
}
}
}
...
@@ -970,16 +968,16 @@ static void test_OpenColorProfileW( WCHAR *standardprofileW )
...
@@ -970,16 +968,16 @@ static void test_OpenColorProfileW( WCHAR *standardprofileW )
/* Parameter checks */
/* Parameter checks */
handle
=
pOpenColorProfileW
(
NULL
,
0
,
0
,
0
);
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
);
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
);
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
);
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
"
);
ok
(
!
pCloseColorProfile
(
NULL
),
"CloseColorProfile() succeeded
\n
"
);
...
@@ -989,21 +987,21 @@ static void test_OpenColorProfileW( WCHAR *standardprofileW )
...
@@ -989,21 +987,21 @@ static void test_OpenColorProfileW( WCHAR *standardprofileW )
profile
.
cbDataSize
=
lstrlenW
(
standardprofileW
)
*
sizeof
(
WCHAR
);
profile
.
cbDataSize
=
lstrlenW
(
standardprofileW
)
*
sizeof
(
WCHAR
);
handle
=
pOpenColorProfileW
(
&
profile
,
0
,
0
,
0
);
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
);
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
);
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 */
/* Functional checks */
handle
=
pOpenColorProfileW
(
&
profile
,
PROFILE_READ
,
0
,
OPEN_EXISTING
);
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
);
ret
=
pCloseColorProfile
(
handle
);
ok
(
ret
,
"CloseColorProfile() failed (%
d
)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"CloseColorProfile() failed (%
lu
)
\n
"
,
GetLastError
()
);
}
}
}
}
...
@@ -1027,41 +1025,41 @@ static void test_SetColorProfileElement( char *testprofile )
...
@@ -1027,41 +1025,41 @@ static void test_SetColorProfileElement( char *testprofile )
/* Parameter checks */
/* Parameter checks */
handle
=
pOpenColorProfileA
(
&
profile
,
PROFILE_READ
,
0
,
OPEN_EXISTING
);
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
);
ret
=
pSetColorProfileElement
(
handle
,
tag
,
0
,
&
size
,
data
);
ok
(
!
ret
,
"SetColorProfileElement() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"SetColorProfileElement() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
pCloseColorProfile
(
handle
);
pCloseColorProfile
(
handle
);
handle
=
pOpenColorProfileA
(
&
profile
,
PROFILE_READWRITE
,
0
,
OPEN_EXISTING
);
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
);
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
);
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
);
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
);
ret
=
pSetColorProfileElement
(
handle
,
tag
,
0
,
&
size
,
NULL
);
ok
(
!
ret
,
"SetColorProfileElement() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"SetColorProfileElement() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
/* Functional checks */
/* Functional checks */
size
=
sizeof
(
data
);
size
=
sizeof
(
data
);
ret
=
pSetColorProfileElement
(
handle
,
tag
,
0
,
&
size
,
data
);
ret
=
pSetColorProfileElement
(
handle
,
tag
,
0
,
&
size
,
data
);
ok
(
ret
,
"SetColorProfileElement() failed %u
\n
"
,
GetLastError
()
);
ok
(
ret
,
"SetColorProfileElement() failed %
l
u
\n
"
,
GetLastError
()
);
size
=
sizeof
(
buffer
);
size
=
sizeof
(
buffer
);
ret
=
pGetColorProfileElement
(
handle
,
tag
,
0
,
&
size
,
buffer
,
&
ref
);
ret
=
pGetColorProfileElement
(
handle
,
tag
,
0
,
&
size
,
buffer
,
&
ref
);
ok
(
ret
,
"GetColorProfileElement() failed %u
\n
"
,
GetLastError
()
);
ok
(
ret
,
"GetColorProfileElement() failed %
l
u
\n
"
,
GetLastError
()
);
ok
(
size
>
0
,
"wrong size
\n
"
);
ok
(
size
>
0
,
"wrong size
\n
"
);
ok
(
!
memcmp
(
data
,
buffer
,
sizeof
(
data
)
),
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 (%
l
u)
\n
"
,
data
,
buffer
,
GetLastError
()
);
pCloseColorProfile
(
handle
);
pCloseColorProfile
(
handle
);
}
}
...
@@ -1105,32 +1103,32 @@ static void test_SetColorProfileHeader( char *testprofile )
...
@@ -1105,32 +1103,32 @@ static void test_SetColorProfileHeader( char *testprofile )
/* Parameter checks */
/* Parameter checks */
handle
=
pOpenColorProfileA
(
&
profile
,
PROFILE_READ
,
0
,
OPEN_EXISTING
);
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
);
ret
=
pSetColorProfileHeader
(
handle
,
&
header
);
ok
(
!
ret
,
"SetColorProfileHeader() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"SetColorProfileHeader() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
pCloseColorProfile
(
handle
);
pCloseColorProfile
(
handle
);
handle
=
pOpenColorProfileA
(
&
profile
,
PROFILE_READWRITE
,
0
,
OPEN_EXISTING
);
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
);
ret
=
pSetColorProfileHeader
(
NULL
,
NULL
);
ok
(
!
ret
,
"SetColorProfileHeader() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"SetColorProfileHeader() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
ret
=
pSetColorProfileHeader
(
handle
,
NULL
);
ret
=
pSetColorProfileHeader
(
handle
,
NULL
);
ok
(
!
ret
,
"SetColorProfileHeader() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"SetColorProfileHeader() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
ret
=
pSetColorProfileHeader
(
NULL
,
&
header
);
ret
=
pSetColorProfileHeader
(
NULL
,
&
header
);
ok
(
!
ret
,
"SetColorProfileHeader() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"SetColorProfileHeader() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
/* Functional checks */
/* Functional checks */
ret
=
pSetColorProfileHeader
(
handle
,
&
header
);
ret
=
pSetColorProfileHeader
(
handle
,
&
header
);
ok
(
ret
,
"SetColorProfileHeader() failed (%
d
)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"SetColorProfileHeader() failed (%
lu
)
\n
"
,
GetLastError
()
);
ret
=
pGetColorProfileHeader
(
handle
,
&
header
);
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
"
);
ok
(
!
memcmp
(
&
header
,
rgbheader
,
sizeof
(
rgbheader
)
),
"Unexpected header data
\n
"
);
...
@@ -1145,10 +1143,10 @@ static void test_UninstallColorProfileA( char *testprofile )
...
@@ -1145,10 +1143,10 @@ static void test_UninstallColorProfileA( char *testprofile )
/* Parameter checks */
/* Parameter checks */
ret
=
pUninstallColorProfileA
(
NULL
,
NULL
,
FALSE
);
ret
=
pUninstallColorProfileA
(
NULL
,
NULL
,
FALSE
);
ok
(
!
ret
,
"UninstallColorProfileA() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"UninstallColorProfileA() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
ret
=
pUninstallColorProfileA
(
machine
,
NULL
,
FALSE
);
ret
=
pUninstallColorProfileA
(
machine
,
NULL
,
FALSE
);
ok
(
!
ret
,
"UninstallColorProfileA() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"UninstallColorProfileA() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
/* Functional checks */
/* Functional checks */
...
@@ -1165,10 +1163,10 @@ static void test_UninstallColorProfileA( char *testprofile )
...
@@ -1165,10 +1163,10 @@ static void test_UninstallColorProfileA( char *testprofile )
skip
(
"Not enough rights for InstallColorProfileA
\n
"
);
skip
(
"Not enough rights for InstallColorProfileA
\n
"
);
return
;
return
;
}
}
ok
(
ret
,
"InstallColorProfileA() failed (%
d
)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"InstallColorProfileA() failed (%
lu
)
\n
"
,
GetLastError
()
);
ret
=
pGetColorDirectoryA
(
NULL
,
dest
,
&
size
);
ret
=
pGetColorDirectoryA
(
NULL
,
dest
,
&
size
);
ok
(
ret
,
"GetColorDirectoryA() failed (%
d
)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"GetColorDirectoryA() failed (%
lu
)
\n
"
,
GetLastError
()
);
MSCMS_basenameA
(
testprofile
,
base
);
MSCMS_basenameA
(
testprofile
,
base
);
...
@@ -1176,11 +1174,11 @@ static void test_UninstallColorProfileA( char *testprofile )
...
@@ -1176,11 +1174,11 @@ static void test_UninstallColorProfileA( char *testprofile )
lstrcatA
(
dest
,
base
);
lstrcatA
(
dest
,
base
);
ret
=
pUninstallColorProfileA
(
NULL
,
dest
,
TRUE
);
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 */
/* Check if the profile is really gone */
handle
=
CreateFileA
(
dest
,
0
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
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
);
CloseHandle
(
handle
);
}
}
}
}
...
@@ -1192,10 +1190,10 @@ static void test_UninstallColorProfileW( WCHAR *testprofileW )
...
@@ -1192,10 +1190,10 @@ static void test_UninstallColorProfileW( WCHAR *testprofileW )
/* Parameter checks */
/* Parameter checks */
ret
=
pUninstallColorProfileW
(
NULL
,
NULL
,
FALSE
);
ret
=
pUninstallColorProfileW
(
NULL
,
NULL
,
FALSE
);
ok
(
!
ret
,
"UninstallColorProfileW() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"UninstallColorProfileW() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
ret
=
pUninstallColorProfileW
(
machineW
,
NULL
,
FALSE
);
ret
=
pUninstallColorProfileW
(
machineW
,
NULL
,
FALSE
);
ok
(
!
ret
,
"UninstallColorProfileW() succeeded (%
d
)
\n
"
,
GetLastError
()
);
ok
(
!
ret
,
"UninstallColorProfileW() succeeded (%
lu
)
\n
"
,
GetLastError
()
);
/* Functional checks */
/* Functional checks */
...
@@ -1214,10 +1212,10 @@ static void test_UninstallColorProfileW( WCHAR *testprofileW )
...
@@ -1214,10 +1212,10 @@ static void test_UninstallColorProfileW( WCHAR *testprofileW )
skip
(
"Not enough rights for InstallColorProfileW
\n
"
);
skip
(
"Not enough rights for InstallColorProfileW
\n
"
);
return
;
return
;
}
}
ok
(
ret
,
"InstallColorProfileW() failed (%
d
)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"InstallColorProfileW() failed (%
lu
)
\n
"
,
GetLastError
()
);
ret
=
pGetColorDirectoryW
(
NULL
,
dest
,
&
size
);
ret
=
pGetColorDirectoryW
(
NULL
,
dest
,
&
size
);
ok
(
ret
,
"GetColorDirectoryW() failed (%
d
)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"GetColorDirectoryW() failed (%
lu
)
\n
"
,
GetLastError
()
);
MSCMS_basenameW
(
testprofileW
,
base
);
MSCMS_basenameW
(
testprofileW
,
base
);
...
@@ -1225,13 +1223,13 @@ static void test_UninstallColorProfileW( WCHAR *testprofileW )
...
@@ -1225,13 +1223,13 @@ static void test_UninstallColorProfileW( WCHAR *testprofileW )
lstrcatW
(
dest
,
base
);
lstrcatW
(
dest
,
base
);
ret
=
pUninstallColorProfileW
(
NULL
,
dest
,
TRUE
);
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
);
bytes_copied
=
WideCharToMultiByte
(
CP_ACP
,
0
,
dest
,
-
1
,
destA
,
MAX_PATH
,
NULL
,
NULL
);
ok
(
bytes_copied
>
0
,
"WideCharToMultiByte() returns %d
\n
"
,
bytes_copied
);
ok
(
bytes_copied
>
0
,
"WideCharToMultiByte() returns %d
\n
"
,
bytes_copied
);
/* Check if the profile is really gone */
/* Check if the profile is really gone */
handle
=
CreateFileA
(
destA
,
0
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
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
);
CloseHandle
(
handle
);
}
}
}
}
...
@@ -1258,56 +1256,56 @@ static void test_AssociateColorProfileWithDeviceA( char *testprofile )
...
@@ -1258,56 +1256,56 @@ static void test_AssociateColorProfileWithDeviceA( char *testprofile )
ret
=
pAssociateColorProfileWithDeviceA
(
"machine"
,
testprofile
,
NULL
);
ret
=
pAssociateColorProfileWithDeviceA
(
"machine"
,
testprofile
,
NULL
);
error
=
GetLastError
();
error
=
GetLastError
();
ok
(
!
ret
,
"AssociateColorProfileWithDevice() succeeded
\n
"
);
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 %
l
u
\n
"
,
error
);
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ret
=
pAssociateColorProfileWithDeviceA
(
"machine"
,
NULL
,
monitor
.
DeviceID
);
ret
=
pAssociateColorProfileWithDeviceA
(
"machine"
,
NULL
,
monitor
.
DeviceID
);
error
=
GetLastError
();
error
=
GetLastError
();
ok
(
!
ret
,
"AssociateColorProfileWithDevice() succeeded
\n
"
);
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 %
l
u
\n
"
,
error
);
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ret
=
pAssociateColorProfileWithDeviceA
(
"machine"
,
testprofile
,
monitor
.
DeviceID
);
ret
=
pAssociateColorProfileWithDeviceA
(
"machine"
,
testprofile
,
monitor
.
DeviceID
);
error
=
GetLastError
();
error
=
GetLastError
();
ok
(
!
ret
,
"AssociateColorProfileWithDevice() succeeded
\n
"
);
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 %
l
u
\n
"
,
error
);
ret
=
pInstallColorProfileA
(
NULL
,
testprofile
);
ret
=
pInstallColorProfileA
(
NULL
,
testprofile
);
ok
(
ret
,
"InstallColorProfileA() failed (%u)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"InstallColorProfileA() failed (%
l
u)
\n
"
,
GetLastError
()
);
ret
=
pGetColorDirectoryA
(
NULL
,
profile
,
&
size
);
ret
=
pGetColorDirectoryA
(
NULL
,
profile
,
&
size
);
ok
(
ret
,
"GetColorDirectoryA() failed (%
d
)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"GetColorDirectoryA() failed (%
lu
)
\n
"
,
GetLastError
()
);
MSCMS_basenameA
(
testprofile
,
basename
);
MSCMS_basenameA
(
testprofile
,
basename
);
lstrcatA
(
profile
,
"
\\
"
);
lstrcatA
(
profile
,
"
\\
"
);
lstrcatA
(
profile
,
basename
);
lstrcatA
(
profile
,
basename
);
ret
=
pAssociateColorProfileWithDeviceA
(
NULL
,
profile
,
monitor
.
DeviceID
);
ret
=
pAssociateColorProfileWithDeviceA
(
NULL
,
profile
,
monitor
.
DeviceID
);
ok
(
ret
,
"AssociateColorProfileWithDevice() failed (%u)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"AssociateColorProfileWithDevice() failed (%
l
u)
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ret
=
pDisassociateColorProfileFromDeviceA
(
"machine"
,
profile
,
NULL
);
ret
=
pDisassociateColorProfileFromDeviceA
(
"machine"
,
profile
,
NULL
);
error
=
GetLastError
();
error
=
GetLastError
();
ok
(
!
ret
,
"DisassociateColorProfileFromDeviceA() succeeded
\n
"
);
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 %
l
u
\n
"
,
error
);
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ret
=
pDisassociateColorProfileFromDeviceA
(
"machine"
,
NULL
,
monitor
.
DeviceID
);
ret
=
pDisassociateColorProfileFromDeviceA
(
"machine"
,
NULL
,
monitor
.
DeviceID
);
error
=
GetLastError
();
error
=
GetLastError
();
ok
(
!
ret
,
"DisassociateColorProfileFromDeviceA() succeeded
\n
"
);
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 %
l
u
\n
"
,
error
);
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ret
=
pDisassociateColorProfileFromDeviceA
(
"machine"
,
profile
,
monitor
.
DeviceID
);
ret
=
pDisassociateColorProfileFromDeviceA
(
"machine"
,
profile
,
monitor
.
DeviceID
);
error
=
GetLastError
();
error
=
GetLastError
();
ok
(
!
ret
,
"DisassociateColorProfileFromDeviceA() succeeded
\n
"
);
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 %
l
u
\n
"
,
error
);
ret
=
pDisassociateColorProfileFromDeviceA
(
NULL
,
profile
,
monitor
.
DeviceID
);
ret
=
pDisassociateColorProfileFromDeviceA
(
NULL
,
profile
,
monitor
.
DeviceID
);
ok
(
ret
,
"DisassociateColorProfileFromDeviceA() failed (%u)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"DisassociateColorProfileFromDeviceA() failed (%
l
u)
\n
"
,
GetLastError
()
);
ret
=
pUninstallColorProfileA
(
NULL
,
profile
,
TRUE
);
ret
=
pUninstallColorProfileA
(
NULL
,
profile
,
TRUE
);
ok
(
ret
,
"UninstallColorProfileA() failed (%
d
)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"UninstallColorProfileA() failed (%
lu
)
\n
"
,
GetLastError
()
);
}
}
else
else
skip
(
"Unable to obtain monitor name
\n
"
);
skip
(
"Unable to obtain monitor name
\n
"
);
...
@@ -1343,17 +1341,17 @@ static void test_CreateMultiProfileTransform( char *standardprofile, char *testp
...
@@ -1343,17 +1341,17 @@ static void test_CreateMultiProfileTransform( char *standardprofile, char *testp
profile
.
cbDataSize
=
strlen
(
standardprofile
);
profile
.
cbDataSize
=
strlen
(
standardprofile
);
handle
[
0
]
=
pOpenColorProfileA
(
&
profile
,
PROFILE_READ
,
0
,
OPEN_EXISTING
);
handle
[
0
]
=
pOpenColorProfileA
(
&
profile
,
PROFILE_READ
,
0
,
OPEN_EXISTING
);
ok
(
handle
[
0
]
!=
NULL
,
"got %u
\n
"
,
GetLastError
()
);
ok
(
handle
[
0
]
!=
NULL
,
"got %
l
u
\n
"
,
GetLastError
()
);
profile
.
dwType
=
PROFILE_FILENAME
;
profile
.
dwType
=
PROFILE_FILENAME
;
profile
.
pProfileData
=
testprofile
;
profile
.
pProfileData
=
testprofile
;
profile
.
cbDataSize
=
strlen
(
testprofile
);
profile
.
cbDataSize
=
strlen
(
testprofile
);
handle
[
1
]
=
pOpenColorProfileA
(
&
profile
,
PROFILE_READ
,
0
,
OPEN_EXISTING
);
handle
[
1
]
=
pOpenColorProfileA
(
&
profile
,
PROFILE_READ
,
0
,
OPEN_EXISTING
);
ok
(
handle
[
1
]
!=
NULL
,
"got %u
\n
"
,
GetLastError
()
);
ok
(
handle
[
1
]
!=
NULL
,
"got %
l
u
\n
"
,
GetLastError
()
);
transform
=
pCreateMultiProfileTransform
(
handle
,
2
,
intents
,
2
,
0
,
0
);
transform
=
pCreateMultiProfileTransform
(
handle
,
2
,
intents
,
2
,
0
,
0
);
ok
(
transform
!=
NULL
,
"got %u
\n
"
,
GetLastError
()
);
ok
(
transform
!=
NULL
,
"got %
l
u
\n
"
,
GetLastError
()
);
pDeleteColorTransform
(
transform
);
pDeleteColorTransform
(
transform
);
pCloseColorProfile
(
handle
[
0
]
);
pCloseColorProfile
(
handle
[
0
]
);
...
@@ -1390,7 +1388,7 @@ START_TEST(profile)
...
@@ -1390,7 +1388,7 @@ START_TEST(profile)
/* See if we can find the standard color profile */
/* See if we can find the standard color profile */
ret
=
GetSystemDirectoryA
(
profilefile1
,
sizeof
(
profilefile1
)
);
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
,
ok
(
profilefile1
[
0
]
&&
lstrlenA
(
profilefile1
)
<
MAX_PATH
,
"Expected length between 0 and MAX_PATH, got %d
\n
"
,
lstrlenA
(
profilefile1
));
"Expected length between 0 and MAX_PATH, got %d
\n
"
,
lstrlenA
(
profilefile1
));
MultiByteToWideChar
(
CP_ACP
,
0
,
profilefile1
,
-
1
,
profilefile1W
,
MAX_PATH
);
MultiByteToWideChar
(
CP_ACP
,
0
,
profilefile1
,
-
1
,
profilefile1W
,
MAX_PATH
);
...
...
dlls/mscms/transform.c
View file @
5442ddc7
...
@@ -48,13 +48,13 @@ static DWORD from_bmformat( BMFORMAT format )
...
@@ -48,13 +48,13 @@ static DWORD from_bmformat( BMFORMAT format )
default:
default:
if
(
!
quietfixme
)
if
(
!
quietfixme
)
{
{
FIXME
(
"unhandled bitmap format %
08
x
\n
"
,
format
);
FIXME
(
"unhandled bitmap format %
#
x
\n
"
,
format
);
quietfixme
=
TRUE
;
quietfixme
=
TRUE
;
}
}
ret
=
TYPE_RGB_8
;
ret
=
TYPE_RGB_8
;
break
;
break
;
}
}
TRACE
(
"color space: %
08x -> %08
x
\n
"
,
format
,
ret
);
TRACE
(
"color space: %
#x -> %#l
x
\n
"
,
format
,
ret
);
return
ret
;
return
ret
;
}
}
...
@@ -76,7 +76,7 @@ static DWORD from_type( COLORTYPE type )
...
@@ -76,7 +76,7 @@ static DWORD from_type( COLORTYPE type )
break
;
break
;
}
}
TRACE
(
"color type: %
08x -> %08
x
\n
"
,
type
,
ret
);
TRACE
(
"color type: %
#x -> %#l
x
\n
"
,
type
,
ret
);
return
ret
;
return
ret
;
}
}
...
@@ -85,13 +85,12 @@ static DWORD from_type( COLORTYPE type )
...
@@ -85,13 +85,12 @@ static DWORD from_type( COLORTYPE type )
*
*
* See CreateColorTransformW.
* See CreateColorTransformW.
*/
*/
HTRANSFORM
WINAPI
CreateColorTransformA
(
LPLOGCOLORSPACEA
space
,
HPROFILE
dest
,
HTRANSFORM
WINAPI
CreateColorTransformA
(
LPLOGCOLORSPACEA
space
,
HPROFILE
dest
,
HPROFILE
target
,
DWORD
flags
)
HPROFILE
target
,
DWORD
flags
)
{
{
LOGCOLORSPACEW
spaceW
;
LOGCOLORSPACEW
spaceW
;
DWORD
len
;
DWORD
len
;
TRACE
(
"( %p, %p, %p,
0x%08
x )
\n
"
,
space
,
dest
,
target
,
flags
);
TRACE
(
"( %p, %p, %p,
%#l
x )
\n
"
,
space
,
dest
,
target
,
flags
);
if
(
!
space
||
!
dest
)
return
FALSE
;
if
(
!
space
||
!
dest
)
return
FALSE
;
...
@@ -119,8 +118,7 @@ HTRANSFORM WINAPI CreateColorTransformA( LPLOGCOLORSPACEA space, HPROFILE dest,
...
@@ -119,8 +118,7 @@ HTRANSFORM WINAPI CreateColorTransformA( LPLOGCOLORSPACEA space, HPROFILE dest,
* Success: Handle to a transform.
* Success: Handle to a transform.
* Failure: NULL
* Failure: NULL
*/
*/
HTRANSFORM
WINAPI
CreateColorTransformW
(
LPLOGCOLORSPACEW
space
,
HPROFILE
dest
,
HTRANSFORM
WINAPI
CreateColorTransformW
(
LPLOGCOLORSPACEW
space
,
HPROFILE
dest
,
HPROFILE
target
,
DWORD
flags
)
HPROFILE
target
,
DWORD
flags
)
{
{
HTRANSFORM
ret
=
NULL
;
HTRANSFORM
ret
=
NULL
;
cmsHTRANSFORM
transform
;
cmsHTRANSFORM
transform
;
...
@@ -129,7 +127,7 @@ HTRANSFORM WINAPI CreateColorTransformW( LPLOGCOLORSPACEW space, HPROFILE dest,
...
@@ -129,7 +127,7 @@ HTRANSFORM WINAPI CreateColorTransformW( LPLOGCOLORSPACEW space, HPROFILE dest,
cmsHPROFILE
input
;
cmsHPROFILE
input
;
int
intent
;
int
intent
;
TRACE
(
"( %p, %p, %p,
0x%08
x )
\n
"
,
space
,
dest
,
target
,
flags
);
TRACE
(
"( %p, %p, %p,
%#l
x )
\n
"
,
space
,
dest
,
target
,
flags
);
if
(
!
space
||
!
(
dst
=
grab_profile
(
dest
)))
return
FALSE
;
if
(
!
space
||
!
(
dst
=
grab_profile
(
dest
)))
return
FALSE
;
...
@@ -140,7 +138,7 @@ HTRANSFORM WINAPI CreateColorTransformW( LPLOGCOLORSPACEW space, HPROFILE dest,
...
@@ -140,7 +138,7 @@ HTRANSFORM WINAPI CreateColorTransformW( LPLOGCOLORSPACEW space, HPROFILE dest,
}
}
intent
=
space
->
lcsIntent
>
3
?
INTENT_PERCEPTUAL
:
space
->
lcsIntent
;
intent
=
space
->
lcsIntent
>
3
?
INTENT_PERCEPTUAL
:
space
->
lcsIntent
;
TRACE
(
"lcsIntent: %x
\n
"
,
space
->
lcsIntent
);
TRACE
(
"lcsIntent: %
#l
x
\n
"
,
space
->
lcsIntent
);
TRACE
(
"lcsCSType: %s
\n
"
,
dbgstr_tag
(
space
->
lcsCSType
)
);
TRACE
(
"lcsCSType: %s
\n
"
,
dbgstr_tag
(
space
->
lcsCSType
)
);
TRACE
(
"lcsFilename: %s
\n
"
,
debugstr_w
(
space
->
lcsFilename
)
);
TRACE
(
"lcsFilename: %s
\n
"
,
debugstr_w
(
space
->
lcsFilename
)
);
...
@@ -186,8 +184,7 @@ HTRANSFORM WINAPI CreateMultiProfileTransform( PHPROFILE profiles, DWORD nprofil
...
@@ -186,8 +184,7 @@ HTRANSFORM WINAPI CreateMultiProfileTransform( PHPROFILE profiles, DWORD nprofil
cmsHTRANSFORM
transform
;
cmsHTRANSFORM
transform
;
struct
profile
*
profile0
,
*
profile1
;
struct
profile
*
profile0
,
*
profile1
;
TRACE
(
"( %p, 0x%08x, %p, 0x%08x, 0x%08x, 0x%08x )
\n
"
,
TRACE
(
"( %p, %#lx, %p, %lu, %#lx, %#lx )
\n
"
,
profiles
,
nprofiles
,
intents
,
nintents
,
flags
,
cmm
);
profiles
,
nprofiles
,
intents
,
nintents
,
flags
,
cmm
);
if
(
!
profiles
||
!
nprofiles
||
!
intents
)
return
NULL
;
if
(
!
profiles
||
!
nprofiles
||
!
intents
)
return
NULL
;
...
@@ -265,7 +262,7 @@ BOOL WINAPI TranslateBitmapBits( HTRANSFORM handle, PVOID srcbits, BMFORMAT inpu
...
@@ -265,7 +262,7 @@ BOOL WINAPI TranslateBitmapBits( HTRANSFORM handle, PVOID srcbits, BMFORMAT inpu
BOOL
ret
;
BOOL
ret
;
cmsHTRANSFORM
transform
=
grab_transform
(
handle
);
cmsHTRANSFORM
transform
=
grab_transform
(
handle
);
TRACE
(
"( %p, %p,
0x%08x, 0x%08x, 0x%08x, 0x%08x, %p, 0x%08x, 0x%08x, %p, 0x%08
x )
\n
"
,
TRACE
(
"( %p, %p,
%#x, %lu, %lu, %lu, %p, %#x, %lu, %p, %#l
x )
\n
"
,
handle
,
srcbits
,
input
,
width
,
height
,
inputstride
,
destbits
,
output
,
handle
,
srcbits
,
input
,
width
,
height
,
inputstride
,
destbits
,
output
,
outputstride
,
callback
,
data
);
outputstride
,
callback
,
data
);
...
@@ -300,7 +297,7 @@ BOOL WINAPI TranslateColors( HTRANSFORM handle, PCOLOR in, DWORD count,
...
@@ -300,7 +297,7 @@ BOOL WINAPI TranslateColors( HTRANSFORM handle, PCOLOR in, DWORD count,
unsigned
int
i
;
unsigned
int
i
;
cmsHTRANSFORM
transform
=
grab_transform
(
handle
);
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
;
if
(
!
transform
)
return
FALSE
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment