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
5d0dc481
Commit
5d0dc481
authored
Sep 21, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Simplify the SetupDiGetClassDescriptionExA/W implementation.
parent
f841667c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
60 deletions
+10
-60
devinst.c
dlls/setupapi/devinst.c
+10
-60
No files found.
dlls/setupapi/devinst.c
View file @
5d0dc481
...
...
@@ -1373,6 +1373,7 @@ BOOL WINAPI SetupDiGetClassDescriptionExA(
{
HKEY
hKey
;
DWORD
dwLength
;
BOOL
ret
;
hKey
=
SetupDiOpenClassRegKeyExA
(
ClassGuid
,
KEY_ALL_ACCESS
,
...
...
@@ -1385,38 +1386,12 @@ BOOL WINAPI SetupDiGetClassDescriptionExA(
return
FALSE
;
}
if
(
RequiredSize
!=
NULL
)
{
dwLength
=
0
;
if
(
RegQueryValueExA
(
hKey
,
NULL
,
NULL
,
NULL
,
NULL
,
&
dwLength
))
{
RegCloseKey
(
hKey
);
return
FALSE
;
}
*
RequiredSize
=
dwLength
;
}
dwLength
=
ClassDescriptionSize
;
if
(
RegQueryValueExA
(
hKey
,
NULL
,
NULL
,
NULL
,
(
LPBYTE
)
ClassDescription
,
&
dwLength
))
{
RegCloseKey
(
hKey
);
return
FALSE
;
}
ret
=
!
RegQueryValueExA
(
hKey
,
NULL
,
NULL
,
NULL
,
(
LPBYTE
)
ClassDescription
,
&
dwLength
);
if
(
RequiredSize
)
*
RequiredSize
=
dwLength
;
RegCloseKey
(
hKey
);
return
TRUE
;
return
ret
;
}
/***********************************************************************
...
...
@@ -1432,6 +1407,7 @@ BOOL WINAPI SetupDiGetClassDescriptionExW(
{
HKEY
hKey
;
DWORD
dwLength
;
BOOL
ret
;
hKey
=
SetupDiOpenClassRegKeyExW
(
ClassGuid
,
KEY_ALL_ACCESS
,
...
...
@@ -1444,38 +1420,12 @@ BOOL WINAPI SetupDiGetClassDescriptionExW(
return
FALSE
;
}
if
(
RequiredSize
!=
NULL
)
{
dwLength
=
0
;
if
(
RegQueryValueExW
(
hKey
,
NULL
,
NULL
,
NULL
,
NULL
,
&
dwLength
))
{
RegCloseKey
(
hKey
);
return
FALSE
;
}
*
RequiredSize
=
dwLength
/
sizeof
(
WCHAR
);
}
dwLength
=
ClassDescriptionSize
*
sizeof
(
WCHAR
);
if
(
RegQueryValueExW
(
hKey
,
NULL
,
NULL
,
NULL
,
(
LPBYTE
)
ClassDescription
,
&
dwLength
))
{
RegCloseKey
(
hKey
);
return
FALSE
;
}
ret
=
!
RegQueryValueExW
(
hKey
,
NULL
,
NULL
,
NULL
,
(
LPBYTE
)
ClassDescription
,
&
dwLength
);
if
(
RequiredSize
)
*
RequiredSize
=
dwLength
/
sizeof
(
WCHAR
);
RegCloseKey
(
hKey
);
return
TRUE
;
return
ret
;
}
/***********************************************************************
...
...
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