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
b45cfc12
Commit
b45cfc12
authored
Jan 05, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Implemented SetupEnumInfSectionsA/W.
parent
1f62d854
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
2 deletions
+73
-2
parser.c
dlls/setupapi/parser.c
+69
-0
setupapi.spec
dlls/setupapi/setupapi.spec
+2
-0
setupapi.h
include/setupapi.h
+2
-2
No files found.
dlls/setupapi/parser.c
View file @
b45cfc12
...
...
@@ -1245,6 +1245,75 @@ void WINAPI SetupCloseInfFile( HINF hinf )
/***********************************************************************
* SetupEnumInfSectionsA (SETUPAPI.@)
*/
BOOL
WINAPI
SetupEnumInfSectionsA
(
HINF
hinf
,
UINT
index
,
PSTR
buffer
,
DWORD
size
,
DWORD
*
need
)
{
struct
inf_file
*
file
=
hinf
;
for
(
file
=
hinf
;
file
;
file
=
file
->
next
)
{
if
(
index
<
file
->
nb_sections
)
{
DWORD
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
file
->
sections
[
index
]
->
name
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
if
(
*
need
)
*
need
=
len
;
if
(
!
buffer
)
{
if
(
!
size
)
return
TRUE
;
SetLastError
(
ERROR_INVALID_USER_BUFFER
);
return
FALSE
;
}
if
(
len
>
size
)
{
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
return
FALSE
;
}
WideCharToMultiByte
(
CP_ACP
,
0
,
file
->
sections
[
index
]
->
name
,
-
1
,
buffer
,
size
,
NULL
,
NULL
);
return
TRUE
;
}
index
-=
file
->
nb_sections
;
}
SetLastError
(
ERROR_NO_MORE_ITEMS
);
return
FALSE
;
}
/***********************************************************************
* SetupEnumInfSectionsW (SETUPAPI.@)
*/
BOOL
WINAPI
SetupEnumInfSectionsW
(
HINF
hinf
,
UINT
index
,
PWSTR
buffer
,
DWORD
size
,
DWORD
*
need
)
{
struct
inf_file
*
file
=
hinf
;
for
(
file
=
hinf
;
file
;
file
=
file
->
next
)
{
if
(
index
<
file
->
nb_sections
)
{
DWORD
len
=
strlenW
(
file
->
sections
[
index
]
->
name
)
+
1
;
if
(
*
need
)
*
need
=
len
;
if
(
!
buffer
)
{
if
(
!
size
)
return
TRUE
;
SetLastError
(
ERROR_INVALID_USER_BUFFER
);
return
FALSE
;
}
if
(
len
>
size
)
{
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
return
FALSE
;
}
memcpy
(
buffer
,
file
->
sections
[
index
]
->
name
,
len
*
sizeof
(
WCHAR
)
);
return
TRUE
;
}
index
-=
file
->
nb_sections
;
}
SetLastError
(
ERROR_NO_MORE_ITEMS
);
return
FALSE
;
}
/***********************************************************************
* SetupGetLineCountA (SETUPAPI.@)
*/
LONG
WINAPI
SetupGetLineCountA
(
HINF
hinf
,
PCSTR
name
)
...
...
dlls/setupapi/setupapi.spec
View file @
b45cfc12
...
...
@@ -389,6 +389,8 @@
@ stub SetupDiUnremoveDevice
@ stub SetupDuplicateDiskSpaceListA
@ stub SetupDuplicateDiskSpaceListW
@ stdcall SetupEnumInfSectionsA(long long ptr long ptr)
@ stdcall SetupEnumInfSectionsW(long long ptr long ptr)
@ stdcall SetupFindFirstLineA(long str str ptr)
@ stdcall SetupFindFirstLineW(long wstr wstr ptr)
@ stdcall SetupFindNextLine(ptr ptr)
...
...
include/setupapi.h
View file @
b45cfc12
...
...
@@ -1633,8 +1633,8 @@ BOOL WINAPI SetupDiUnremoveDevice(HDEVINFO, PSP_DEVINFO_DATA);
HDSKSPC
WINAPI
SetupDuplicateDiskSpaceListA
(
HDSKSPC
,
PVOID
,
DWORD
,
UINT
);
HDSKSPC
WINAPI
SetupDuplicateDiskSpaceListW
(
HDSKSPC
,
PVOID
,
DWORD
,
UINT
);
#define SetupDuplicateDiskSpaceList WINELIB_NAME_AW(SetupDuplicateDiskSpaceList)
BOOL
WINAPI
SetupEnumInfSectionsA
(
HINF
,
UINT
,
PSTR
,
SIZE
,
UINT
*
);
BOOL
WINAPI
SetupEnumInfSectionsW
(
HINF
,
UINT
,
PWSTR
,
SIZE
,
UINT
*
);
BOOL
WINAPI
SetupEnumInfSectionsA
(
HINF
,
UINT
,
PSTR
,
DWORD
,
DWORD
*
);
BOOL
WINAPI
SetupEnumInfSectionsW
(
HINF
,
UINT
,
PWSTR
,
DWORD
,
DWORD
*
);
#define SetupEnumInfSections WINELIB_NAME_AW(SetupEnumInfSections)
BOOL
WINAPI
SetupFindFirstLineA
(
HINF
hinf
,
PCSTR
section
,
PCSTR
key
,
INFCONTEXT
*
context
);
BOOL
WINAPI
SetupFindFirstLineW
(
HINF
hinf
,
PCWSTR
section
,
PCWSTR
key
,
INFCONTEXT
*
context
);
...
...
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