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
05a1416c
Commit
05a1416c
authored
Oct 04, 2010
by
Stefan Leichter
Committed by
Alexandre Julliard
Oct 05, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Implement SetupDiGetINFClassA on top of SetupDiGetINFClassW.
parent
803b81c1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
11 deletions
+32
-11
devinst.c
dlls/setupapi/devinst.c
+31
-0
stubs.c
dlls/setupapi/stubs.c
+0
-11
devinst.c
dlls/setupapi/tests/devinst.c
+1
-0
No files found.
dlls/setupapi/devinst.c
View file @
05a1416c
...
...
@@ -3988,6 +3988,37 @@ CONFIGRET WINAPI CM_Get_Device_ID_Size( PULONG pulLen, DEVINST dnDevInst,
}
/***********************************************************************
* SetupDiGetINFClassA (SETUPAPI.@)
*/
BOOL
WINAPI
SetupDiGetINFClassA
(
PCSTR
inf
,
LPGUID
class_guid
,
PSTR
class_name
,
DWORD
size
,
PDWORD
required_size
)
{
BOOL
retval
;
DWORD
required_sizeA
,
required_sizeW
;
PWSTR
class_nameW
=
NULL
;
UNICODE_STRING
infW
;
if
(
inf
)
RtlCreateUnicodeStringFromAsciiz
(
&
infW
,
inf
);
else
infW
.
Buffer
=
NULL
;
if
(
class_name
&&
size
)
class_nameW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
WCHAR
));
retval
=
SetupDiGetINFClassW
(
infW
.
Buffer
,
class_guid
,
class_nameW
,
size
,
&
required_sizeW
);
if
(
retval
)
{
required_sizeA
=
WideCharToMultiByte
(
CP_ACP
,
0
,
class_nameW
,
required_sizeW
,
class_name
,
size
,
NULL
,
NULL
);
if
(
required_size
)
*
required_size
=
required_sizeA
;
}
else
if
(
required_size
)
*
required_size
=
required_sizeW
;
return
retval
;
}
/***********************************************************************
* SetupDiGetINFClassW (SETUPAPI.@)
*/
BOOL
WINAPI
SetupDiGetINFClassW
(
PCWSTR
inf
,
LPGUID
class_guid
,
PWSTR
class_name
,
...
...
dlls/setupapi/stubs.c
View file @
05a1416c
...
...
@@ -230,17 +230,6 @@ BOOL WINAPI SetupSetSourceListW(DWORD flags, PCWSTR *list, UINT count)
}
/***********************************************************************
* SetupDiGetINFClassA (SETUPAPI.@)
*/
BOOL
WINAPI
SetupDiGetINFClassA
(
PCSTR
inf
,
LPGUID
class_guid
,
PSTR
class_name
,
DWORD
size
,
PDWORD
required_size
)
{
FIXME
(
"%s %p %p %d %p
\n
"
,
debugstr_a
(
inf
),
class_guid
,
class_name
,
size
,
required_size
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
}
/***********************************************************************
* SetupDiDestroyClassImageList (SETUPAPI.@)
*/
BOOL
WINAPI
SetupDiDestroyClassImageList
(
PSP_CLASSIMAGELIST_DATA
ClassListImageData
)
...
...
dlls/setupapi/tests/devinst.c
View file @
05a1416c
...
...
@@ -1509,6 +1509,7 @@ static void testSetupDiGetINFClassA(void)
count
=
0xdeadbeef
;
retval
=
SetupDiGetINFClassA
(
filename
,
&
guid
,
cn
,
MAX_PATH
,
&
count
);
ok
(
retval
,
"expected SetupDiGetINFClassA to succeed! error %u
\n
"
,
GetLastError
());
todo_wine
ok
(
count
==
4
,
"expected count==4, got %u(%s)
\n
"
,
count
,
cn
);
DeleteFileA
(
filename
);
...
...
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