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
803b81c1
Commit
803b81c1
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: Add partial implementation of SetupDiGetINFClassW.
parent
781cb486
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
10 deletions
+72
-10
devinst.c
dlls/setupapi/devinst.c
+72
-0
stubs.c
dlls/setupapi/stubs.c
+0
-10
No files found.
dlls/setupapi/devinst.c
View file @
803b81c1
...
...
@@ -46,6 +46,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
setupapi
);
/* Unicode constants */
static
const
WCHAR
Chicago
[]
=
{
'$'
,
'C'
,
'h'
,
'i'
,
'c'
,
'a'
,
'g'
,
'o'
,
'$'
,
0
};
static
const
WCHAR
ClassGUID
[]
=
{
'C'
,
'l'
,
'a'
,
's'
,
's'
,
'G'
,
'U'
,
'I'
,
'D'
,
0
};
static
const
WCHAR
Class
[]
=
{
'C'
,
'l'
,
'a'
,
's'
,
's'
,
0
};
static
const
WCHAR
ClassInstall32
[]
=
{
'C'
,
'l'
,
'a'
,
's'
,
's'
,
'I'
,
'n'
,
's'
,
't'
,
'a'
,
'l'
,
'l'
,
'3'
,
'2'
,
0
};
...
...
@@ -54,6 +55,7 @@ static const WCHAR NoInstallClass[] = {'N','o','I','n','s','t','a','l','l','C',
static
const
WCHAR
NoUseClass
[]
=
{
'N'
,
'o'
,
'U'
,
's'
,
'e'
,
'C'
,
'l'
,
'a'
,
's'
,
's'
,
0
};
static
const
WCHAR
NtExtension
[]
=
{
'.'
,
'N'
,
'T'
,
0
};
static
const
WCHAR
NtPlatformExtension
[]
=
{
'.'
,
'N'
,
'T'
,
'x'
,
'8'
,
'6'
,
0
};
static
const
WCHAR
Signature
[]
=
{
'S'
,
'i'
,
'g'
,
'n'
,
'a'
,
't'
,
'u'
,
'r'
,
'e'
,
0
};
static
const
WCHAR
Version
[]
=
{
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
WinExtension
[]
=
{
'.'
,
'W'
,
'i'
,
'n'
,
0
};
...
...
@@ -3984,3 +3986,73 @@ CONFIGRET WINAPI CM_Get_Device_ID_Size( PULONG pulLen, DEVINST dnDevInst,
GlobalUnlock
((
HANDLE
)
dnDevInst
);
return
CR_SUCCESS
;
}
/***********************************************************************
* SetupDiGetINFClassW (SETUPAPI.@)
*/
BOOL
WINAPI
SetupDiGetINFClassW
(
PCWSTR
inf
,
LPGUID
class_guid
,
PWSTR
class_name
,
DWORD
size
,
PDWORD
required_size
)
{
BOOL
have_guid
,
have_name
;
DWORD
dret
;
WCHAR
buffer
[
MAX_PATH
];
if
(
!
inf
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
(
INVALID_FILE_ATTRIBUTES
==
GetFileAttributesW
(
inf
))
{
FIXME
(
"%s not found. Searching via DevicePath not implemented
\n
"
,
debugstr_w
(
inf
));
SetLastError
(
ERROR_FILE_NOT_FOUND
);
return
FALSE
;
}
if
(
!
class_guid
||
!
class_name
||
!
size
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
(
!
GetPrivateProfileStringW
(
Version
,
Signature
,
NULL
,
buffer
,
MAX_PATH
,
inf
))
return
FALSE
;
if
(
lstrcmpiW
(
buffer
,
Chicago
))
return
FALSE
;
buffer
[
0
]
=
'\0'
;
have_guid
=
0
<
GetPrivateProfileStringW
(
Version
,
ClassGUID
,
NULL
,
buffer
,
MAX_PATH
,
inf
);
if
(
have_guid
)
{
buffer
[
lstrlenW
(
buffer
)
-
1
]
=
0
;
if
(
RPC_S_OK
!=
UuidFromStringW
(
buffer
+
1
,
class_guid
))
{
FIXME
(
"failed to convert
\"
%s
\"
into a guid
\n
"
,
debugstr_w
(
buffer
));
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
}
buffer
[
0
]
=
'\0'
;
dret
=
GetPrivateProfileStringW
(
Version
,
Class
,
NULL
,
buffer
,
MAX_PATH
,
inf
);
have_name
=
0
<
dret
;
if
(
dret
>=
MAX_PATH
-
1
)
FIXME
(
"buffer might be too small
\n
"
);
if
(
have_guid
&&
!
have_name
)
FIXME
(
"class name lookup via guid not implemented
\n
"
);
if
(
have_name
)
{
if
(
dret
<
size
)
lstrcpyW
(
class_name
,
buffer
);
else
{
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
have_name
=
FALSE
;
}
}
if
(
required_size
)
*
required_size
=
dret
+
((
dret
)
?
1
:
0
);
return
(
have_guid
||
have_name
);
}
dlls/setupapi/stubs.c
View file @
803b81c1
...
...
@@ -241,16 +241,6 @@ BOOL WINAPI SetupDiGetINFClassA(PCSTR inf, LPGUID class_guid, PSTR class_name,
}
/***********************************************************************
* SetupDiGetINFClassW (SETUPAPI.@)
*/
BOOL
WINAPI
SetupDiGetINFClassW
(
PCWSTR
inf
,
LPGUID
class_guid
,
PWSTR
class_name
,
DWORD
size
,
PDWORD
required_size
)
{
FIXME
(
"%s %p %p %d %p
\n
"
,
debugstr_w
(
inf
),
class_guid
,
class_name
,
size
,
required_size
);
return
FALSE
;
}
/***********************************************************************
* SetupDiDestroyClassImageList (SETUPAPI.@)
*/
BOOL
WINAPI
SetupDiDestroyClassImageList
(
PSP_CLASSIMAGELIST_DATA
ClassListImageData
)
...
...
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