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
c1ccd657
Commit
c1ccd657
authored
Sep 19, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Sep 20, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Implement SetupDiGetDeviceInstanceIdA on top of SetupDiGetDeviceInstanceIdW.
parent
634cba84
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
2 deletions
+36
-2
devinst.c
dlls/setupapi/devinst.c
+36
-2
No files found.
dlls/setupapi/devinst.c
View file @
c1ccd657
...
@@ -813,9 +813,42 @@ BOOL WINAPI SetupDiGetDeviceInstanceIdA(
...
@@ -813,9 +813,42 @@ BOOL WINAPI SetupDiGetDeviceInstanceIdA(
DWORD
DeviceInstanceIdSize
,
DWORD
DeviceInstanceIdSize
,
PDWORD
RequiredSize
)
PDWORD
RequiredSize
)
{
{
FIXME
(
"%p %p %p %d %p
\n
"
,
DeviceInfoSet
,
DeviceInfoData
,
DeviceInstanceId
,
BOOL
ret
=
FALSE
;
DWORD
size
;
PWSTR
instanceId
;
TRACE
(
"%p %p %p %d %p
\n
"
,
DeviceInfoSet
,
DeviceInfoData
,
DeviceInstanceId
,
DeviceInstanceIdSize
,
RequiredSize
);
DeviceInstanceIdSize
,
RequiredSize
);
return
FALSE
;
SetupDiGetDeviceInstanceIdW
(
DeviceInfoSet
,
DeviceInfoData
,
NULL
,
0
,
&
size
);
if
(
GetLastError
()
!=
ERROR_INSUFFICIENT_BUFFER
)
return
FALSE
;
instanceId
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
WCHAR
));
if
(
instanceId
)
{
ret
=
SetupDiGetDeviceInstanceIdW
(
DeviceInfoSet
,
DeviceInfoData
,
instanceId
,
size
,
&
size
);
if
(
ret
)
{
int
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
instanceId
,
-
1
,
DeviceInstanceId
,
DeviceInstanceIdSize
,
NULL
,
NULL
);
if
(
!
len
)
ret
=
FALSE
;
else
if
(
RequiredSize
)
*
RequiredSize
=
len
;
}
HeapFree
(
GetProcessHeap
(),
0
,
instanceId
);
}
return
ret
;
}
}
/***********************************************************************
/***********************************************************************
...
@@ -830,6 +863,7 @@ BOOL WINAPI SetupDiGetDeviceInstanceIdW(
...
@@ -830,6 +863,7 @@ BOOL WINAPI SetupDiGetDeviceInstanceIdW(
{
{
FIXME
(
"%p %p %p %d %p
\n
"
,
DeviceInfoSet
,
DeviceInfoData
,
DeviceInstanceId
,
FIXME
(
"%p %p %p %d %p
\n
"
,
DeviceInfoSet
,
DeviceInfoData
,
DeviceInstanceId
,
DeviceInstanceIdSize
,
RequiredSize
);
DeviceInstanceIdSize
,
RequiredSize
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
return
FALSE
;
}
}
...
...
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