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
f807e001
Commit
f807e001
authored
Nov 18, 2005
by
Saulius Krasuckas
Committed by
Alexandre Julliard
Nov 18, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't call unicode functions of file API as they fail on Win9x.
parent
ead9b062
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
profile.c
dlls/mscms/tests/profile.c
+16
-5
No files found.
dlls/mscms/tests/profile.c
View file @
f807e001
...
@@ -971,9 +971,11 @@ static void test_UninstallColorProfileW(void)
...
@@ -971,9 +971,11 @@ static void test_UninstallColorProfileW(void)
if
(
testprofileW
)
if
(
testprofileW
)
{
{
WCHAR
dest
[
MAX_PATH
],
base
[
MAX_PATH
];
WCHAR
dest
[
MAX_PATH
],
base
[
MAX_PATH
];
char
destA
[
MAX_PATH
];
DWORD
size
=
sizeof
(
dest
);
DWORD
size
=
sizeof
(
dest
);
WCHAR
slash
[]
=
{
'\\'
,
0
};
WCHAR
slash
[]
=
{
'\\'
,
0
};
HANDLE
handle
;
HANDLE
handle
;
int
bytes_copied
;
ret
=
pInstallColorProfileW
(
NULL
,
testprofileW
);
ret
=
pInstallColorProfileW
(
NULL
,
testprofileW
);
ok
(
ret
,
"InstallColorProfileW() failed (%ld)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"InstallColorProfileW() failed (%ld)
\n
"
,
GetLastError
()
);
...
@@ -989,8 +991,10 @@ static void test_UninstallColorProfileW(void)
...
@@ -989,8 +991,10 @@ static void test_UninstallColorProfileW(void)
ret
=
pUninstallColorProfileW
(
NULL
,
dest
,
TRUE
);
ret
=
pUninstallColorProfileW
(
NULL
,
dest
,
TRUE
);
ok
(
ret
,
"UninstallColorProfileW() failed (%ld)
\n
"
,
GetLastError
()
);
ok
(
ret
,
"UninstallColorProfileW() failed (%ld)
\n
"
,
GetLastError
()
);
bytes_copied
=
WideCharToMultiByte
(
CP_ACP
,
0
,
dest
,
-
1
,
destA
,
MAX_PATH
,
NULL
,
NULL
);
ok
(
bytes_copied
>
0
,
"WideCharToMultiByte() returns %d
\n
"
,
bytes_copied
);
/* Check if the profile is really gone */
/* Check if the profile is really gone */
handle
=
CreateFile
W
(
dest
,
0
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
handle
=
CreateFile
A
(
destA
,
0
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
ok
(
handle
==
INVALID_HANDLE_VALUE
,
"Found the profile (%ld)
\n
"
,
GetLastError
()
);
ok
(
handle
==
INVALID_HANDLE_VALUE
,
"Found the profile (%ld)
\n
"
,
GetLastError
()
);
CloseHandle
(
handle
);
CloseHandle
(
handle
);
}
}
...
@@ -1004,6 +1008,7 @@ START_TEST(profile)
...
@@ -1004,6 +1008,7 @@ START_TEST(profile)
char
profilefile1
[
MAX_PATH
],
profilefile2
[
MAX_PATH
];
char
profilefile1
[
MAX_PATH
],
profilefile2
[
MAX_PATH
];
WCHAR
profilefile1W
[
MAX_PATH
],
profilefile2W
[
MAX_PATH
];
WCHAR
profilefile1W
[
MAX_PATH
],
profilefile2W
[
MAX_PATH
];
WCHAR
fileW
[
MAX_PATH
];
WCHAR
fileW
[
MAX_PATH
];
UINT
ret
;
hmscms
=
LoadLibraryA
(
"mscms.dll"
);
hmscms
=
LoadLibraryA
(
"mscms.dll"
);
if
(
!
hmscms
)
return
;
if
(
!
hmscms
)
return
;
...
@@ -1015,8 +1020,16 @@ START_TEST(profile)
...
@@ -1015,8 +1020,16 @@ START_TEST(profile)
}
}
/* See if we can find the standard color profile */
/* See if we can find the standard color profile */
GetSystemDirectoryA
(
profilefile1
,
sizeof
(
profilefile1
)
);
ret
=
GetSystemDirectoryA
(
profilefile1
,
sizeof
(
profilefile1
)
);
GetSystemDirectoryW
(
profilefile1W
,
sizeof
(
profilefile1W
)
/
sizeof
(
WCHAR
)
);
ok
(
ret
>
0
,
"GetSystemDirectoryA() returns %d, LastError = %ld
\n
"
,
ret
,
GetLastError
());
ok
(
lstrlenA
(
profilefile1
)
>
0
&&
lstrlenA
(
profilefile1
)
<
MAX_PATH
,
"GetSystemDirectoryA() returns %d, LastError = %ld
\n
"
,
ret
,
GetLastError
());
MultiByteToWideChar
(
CP_ACP
,
0
,
profilefile1
,
-
1
,
profilefile1W
,
MAX_PATH
);
ok
(
lstrlenW
(
profilefile1W
)
>
0
&&
lstrlenW
(
profilefile1W
)
<
MAX_PATH
,
"GetSystemDirectoryA() returns %d, LastError = %ld
\n
"
,
ret
,
GetLastError
());
lstrcpyA
(
profilefile2
,
profilefile1
);
lstrcpyW
(
profilefile2W
,
profilefile1W
);
lstrcatA
(
profilefile1
,
profile1
);
lstrcatA
(
profilefile1
,
profile1
);
lstrcatW
(
profilefile1W
,
profile1W
);
lstrcatW
(
profilefile1W
,
profile1W
);
handle
=
CreateFileA
(
profilefile1
,
0
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
handle
=
CreateFileA
(
profilefile1
,
0
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
...
@@ -1028,8 +1041,6 @@ START_TEST(profile)
...
@@ -1028,8 +1041,6 @@ START_TEST(profile)
CloseHandle
(
handle
);
CloseHandle
(
handle
);
}
}
GetSystemDirectoryA
(
profilefile2
,
sizeof
(
profilefile2
)
);
GetSystemDirectoryW
(
profilefile2W
,
sizeof
(
profilefile2W
)
/
sizeof
(
WCHAR
)
);
lstrcatA
(
profilefile2
,
profile2
);
lstrcatA
(
profilefile2
,
profile2
);
lstrcatW
(
profilefile2W
,
profile2W
);
lstrcatW
(
profilefile2W
,
profile2W
);
handle
=
CreateFileA
(
profilefile2
,
0
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
handle
=
CreateFileA
(
profilefile2
,
0
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
...
...
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