Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
2f7504e7
Commit
2f7504e7
authored
Jan 19, 2006
by
Saulius Krasuckas
Committed by
Alexandre Julliard
Jan 19, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mscms: Check an appropriate registry key.
parent
d6865383
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
1 deletion
+56
-1
Makefile.in
dlls/mscms/tests/Makefile.in
+1
-1
profile.c
dlls/mscms/tests/profile.c
+55
-0
No files found.
dlls/mscms/tests/Makefile.in
View file @
2f7504e7
...
...
@@ -3,7 +3,7 @@ TOPOBJDIR = ../../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
TESTDLL
=
mscms.dll
IMPORTS
=
kernel32
IMPORTS
=
advapi32
kernel32
CTESTS
=
\
profile.c
...
...
dlls/mscms/tests/profile.c
View file @
2f7504e7
...
...
@@ -22,6 +22,7 @@
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "winnls.h"
#include "wingdi.h"
#include "winuser.h"
...
...
@@ -496,6 +497,59 @@ static void enum_registered_color_profiles(void)
trace
(
"
\n
"
);
}
static
HKEY
reg_open_mscms_key
(
void
)
{
char
win9x
[]
=
"SOFTWARE
\\
Microsoft
\\
Windows"
;
char
winNT
[]
=
"SOFTWARE
\\
Microsoft
\\
Windows NT"
;
char
ICM
[]
=
"CurrentVersion
\\
ICM
\\
RegisteredProfiles"
;
HKEY
win9x_key
,
winNT_key
,
ICM_key
;
RegOpenKeyExA
(
HKEY_LOCAL_MACHINE
,
win9x
,
0
,
KEY_READ
,
&
win9x_key
);
RegOpenKeyExA
(
HKEY_LOCAL_MACHINE
,
winNT
,
0
,
KEY_READ
,
&
winNT_key
);
if
(
RegOpenKeyExA
(
winNT_key
,
ICM
,
0
,
KEY_READ
,
&
ICM_key
))
RegOpenKeyExA
(
win9x_key
,
ICM
,
0
,
KEY_READ
,
&
ICM_key
);
RegCloseKey
(
win9x_key
);
RegCloseKey
(
winNT_key
);
if
(
!
ICM_key
)
return
NULL
;
return
ICM_key
;
}
static
void
check_registry
(
void
)
{
HKEY
hkIcmKey
;
LONG
res
;
DWORD
i
,
dwValCount
;
char
szName
[
16383
];
char
szData
[
MAX_PATH
+
1
];
DWORD
dwNameLen
,
dwDataLen
,
dwType
;
hkIcmKey
=
reg_open_mscms_key
();
if
(
!
hkIcmKey
)
{
trace
(
"Key 'HKLM
\\
SOFTWARE
\\
Microsoft
\\
Windows*
\\
CurrentVersion
\\
ICM
\\
RegisteredProfiles' not found
\n
"
);
return
;
}
res
=
RegQueryInfoKeyA
(
hkIcmKey
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
&
dwValCount
,
NULL
,
NULL
,
NULL
,
NULL
);
trace
(
"Count of profile entries found directly in the registry: %ld
\n
"
,
dwValCount
);
if
(
dwValCount
<
1
)
return
;
for
(
i
=
0
;
i
<
dwValCount
;
i
++
)
{
dwNameLen
=
sizeof
(
szName
);
dwDataLen
=
sizeof
(
szData
);
res
=
RegEnumValueA
(
hkIcmKey
,
i
,
szName
,
&
dwNameLen
,
NULL
,
&
dwType
,
(
LPBYTE
)
szData
,
&
dwDataLen
);
if
(
res
!=
ERROR_SUCCESS
)
break
;
ok
(
dwType
==
REG_SZ
,
"RegEnumValueA() returned unexpected value type (%ld)
\n
"
,
dwType
);
if
(
dwType
!=
REG_SZ
)
break
;
trace
(
" found '%s' value containing '%s' (%d chars)
\n
"
,
szName
,
szData
,
strlen
(
szData
));
}
RegCloseKey
(
hkIcmKey
);
}
#define fail_GSCSPA(pMachName, dwProfID, pProfName, pdwSz, dwSz, GLE_OK) \
do { \
size = dwSz; \
...
...
@@ -1193,6 +1247,7 @@ START_TEST(profile)
test_GetCountColorProfileElements
();
enum_registered_color_profiles
();
check_registry
();
test_GetStandardColorSpaceProfileA
();
test_GetStandardColorSpaceProfileW
();
...
...
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