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
8f803ac8
Commit
8f803ac8
authored
Jan 28, 2005
by
Oliver Stieber
Committed by
Alexandre Julliard
Jan 28, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fill in the information in VendorIdentifier and make a better effort
at filling in Identifier in the registry key.
parent
b80bd1dc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
cpu.c
dlls/kernel/cpu.c
+13
-2
No files found.
dlls/kernel/cpu.c
View file @
8f803ac8
...
...
@@ -111,6 +111,9 @@ static void create_registry_keys( const SYSTEM_INFO *info )
static
const
WCHAR
IdentifierW
[]
=
{
'I'
,
'd'
,
'e'
,
'n'
,
't'
,
'i'
,
'f'
,
'i'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
SysidW
[]
=
{
'A'
,
'T'
,
' '
,
'c'
,
'o'
,
'm'
,
'p'
,
'a'
,
't'
,
'i'
,
'b'
,
'l'
,
'e'
,
0
};
static
const
WCHAR
mhzKeyW
[]
=
{
'~'
,
'M'
,
'H'
,
'z'
,
0
};
static
const
WCHAR
VendorIdentifierW
[]
=
{
'V'
,
'e'
,
'n'
,
'd'
,
'o'
,
'r'
,
'I'
,
'd'
,
'e'
,
'n'
,
't'
,
'i'
,
'f'
,
'i'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
VenidIntelW
[]
=
{
'G'
,
'e'
,
'n'
,
'u'
,
'i'
,
'n'
,
'e'
,
'I'
,
'n'
,
't'
,
'e'
,
'l'
,
0
};
/* static const WCHAR VenidAMDW[] = {'A','u','t','h','e','n','t','i','c','A','M','D',0}; */
unsigned
int
i
;
HKEY
hkey
,
system_key
,
cpu_key
;
...
...
@@ -146,13 +149,21 @@ static void create_registry_keys( const SYSTEM_INFO *info )
RtlCreateUnicodeStringFromAsciiz
(
&
nameW
,
num
);
if
(
!
NtCreateKey
(
&
hkey
,
KEY_ALL_ACCESS
,
&
attr
,
0
,
NULL
,
0
,
NULL
))
{
WCHAR
idW
[
2
0
];
WCHAR
idW
[
4
0
];
DWORD
cpuMHz
=
cpuHz
/
1000000
;
sprintf
(
id
,
"CPU %ld"
,
info
->
dwProcessorType
);
/*TODO: report 64bit processors properly*/
RtlInitUnicodeString
(
&
valueW
,
IdentifierW
);
sprintf
(
id
,
"x86 Family %d Model %d Stepping %d"
,
info
->
wProcessorLevel
/*model and family are messed up*/
,
info
->
wProcessorLevel
,
info
->
wProcessorRevision
);
RtlMultiByteToUnicodeN
(
idW
,
sizeof
(
idW
),
NULL
,
id
,
strlen
(
id
)
+
1
);
NtSetValueKey
(
hkey
,
&
valueW
,
0
,
REG_SZ
,
idW
,
(
strlenW
(
idW
)
+
1
)
*
sizeof
(
WCHAR
)
);
/*TODO; report amd's properly*/
RtlInitUnicodeString
(
&
valueW
,
VendorIdentifierW
);
NtSetValueKey
(
hkey
,
&
valueW
,
0
,
REG_SZ
,
VenidIntelW
,
(
strlenW
(
VenidIntelW
)
+
1
)
*
sizeof
(
WCHAR
)
);
RtlInitUnicodeString
(
&
valueW
,
mhzKeyW
);
NtSetValueKey
(
hkey
,
&
valueW
,
0
,
REG_DWORD
,
&
cpuMHz
,
sizeof
(
DWORD
)
);
NtClose
(
hkey
);
...
...
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