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
ae64a622
Commit
ae64a622
authored
Nov 14, 2006
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 15, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Implement SetupGetSourceInfo{A,W}.
parent
167323e6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
100 additions
and
24 deletions
+100
-24
query.c
dlls/setupapi/query.c
+91
-0
setupapi.spec
dlls/setupapi/setupapi.spec
+2
-2
stubs.c
dlls/setupapi/stubs.c
+0
-22
setupapi.h
include/setupapi.h
+7
-0
No files found.
dlls/setupapi/query.c
View file @
ae64a622
...
...
@@ -425,3 +425,94 @@ BOOL WINAPI SetupGetSourceFileLocationW( HINF hinf, PINFCONTEXT context, PCWSTR
}
return
TRUE
;
}
/***********************************************************************
* SetupGetSourceInfoA (SETUPAPI.@)
*/
BOOL
WINAPI
SetupGetSourceInfoA
(
HINF
hinf
,
UINT
source_id
,
UINT
info
,
PSTR
buffer
,
DWORD
buffer_size
,
LPDWORD
required_size
)
{
BOOL
ret
=
FALSE
;
WCHAR
*
bufferW
=
NULL
;
DWORD
required
;
INT
size
;
TRACE
(
"%p, %d, %d, %p, %d, %p
\n
"
,
hinf
,
source_id
,
info
,
buffer
,
buffer_size
,
required_size
);
if
(
!
SetupGetSourceInfoW
(
hinf
,
source_id
,
info
,
NULL
,
0
,
&
required
))
return
FALSE
;
if
(
!
(
bufferW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
required
*
sizeof
(
WCHAR
)
)))
return
FALSE
;
if
(
!
SetupGetSourceInfoW
(
hinf
,
source_id
,
info
,
bufferW
,
required
,
NULL
))
goto
done
;
size
=
WideCharToMultiByte
(
CP_ACP
,
0
,
bufferW
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
if
(
required_size
)
*
required_size
=
size
;
if
(
buffer
)
{
if
(
buffer_size
>=
size
)
WideCharToMultiByte
(
CP_ACP
,
0
,
bufferW
,
-
1
,
buffer
,
buffer_size
,
NULL
,
NULL
);
else
{
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
goto
done
;
}
}
ret
=
TRUE
;
done:
HeapFree
(
GetProcessHeap
(),
0
,
bufferW
);
return
ret
;
}
/***********************************************************************
* SetupGetSourceInfoW (SETUPAPI.@)
*/
BOOL
WINAPI
SetupGetSourceInfoW
(
HINF
hinf
,
UINT
source_id
,
UINT
info
,
PWSTR
buffer
,
DWORD
buffer_size
,
LPDWORD
required_size
)
{
INFCONTEXT
ctx
;
WCHAR
source_id_str
[
11
];
static
const
WCHAR
fmt
[]
=
{
'%'
,
'd'
,
0
};
DWORD
index
;
TRACE
(
"%p, %d, %d, %p, %d, %p
\n
"
,
hinf
,
source_id
,
info
,
buffer
,
buffer_size
,
required_size
);
sprintfW
(
source_id_str
,
fmt
,
source_id
);
if
(
!
SetupFindFirstLineW
(
hinf
,
source_disks_names_platform
,
source_id_str
,
&
ctx
)
&&
!
SetupFindFirstLineW
(
hinf
,
source_disks_names
,
source_id_str
,
&
ctx
))
return
FALSE
;
switch
(
info
)
{
case
SRCINFO_PATH
:
index
=
4
;
break
;
case
SRCINFO_TAGFILE
:
index
=
2
;
break
;
case
SRCINFO_DESCRIPTION
:
index
=
1
;
break
;
default:
WARN
(
"unknown info level: %d
\n
"
,
info
);
return
FALSE
;
}
if
(
SetupGetStringFieldW
(
&
ctx
,
index
,
buffer
,
buffer_size
,
required_size
))
return
TRUE
;
if
(
required_size
)
*
required_size
=
1
;
if
(
buffer
)
{
if
(
buffer_size
>=
1
)
buffer
[
0
]
=
0
;
else
{
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
return
FALSE
;
}
}
return
TRUE
;
}
dlls/setupapi/setupapi.spec
View file @
ae64a622
...
...
@@ -417,8 +417,8 @@
@ stdcall SetupGetSourceFileLocationW(ptr ptr wstr ptr ptr long ptr)
@ stub SetupGetSourceFileSizeA
@ stub SetupGetSourceFileSizeW
@ stdcall SetupGetSourceInfoA(ptr long long
s
tr long ptr)
@ stdcall SetupGetSourceInfoW(ptr long long
ws
tr long ptr)
@ stdcall SetupGetSourceInfoA(ptr long long
p
tr long ptr)
@ stdcall SetupGetSourceInfoW(ptr long long
p
tr long ptr)
@ stdcall SetupGetStringFieldA(ptr long ptr long ptr)
@ stdcall SetupGetStringFieldW(ptr long ptr long ptr)
@ stub SetupGetTargetPathA
...
...
dlls/setupapi/stubs.c
View file @
ae64a622
...
...
@@ -140,28 +140,6 @@ BOOL WINAPI SetupCopyOEMInfW(PCWSTR sourceinffile, PCWSTR sourcemedialoc,
}
/***********************************************************************
* SetupGetSourceInfoA (SETUPAPI.@)
*/
BOOL
WINAPI
SetupGetSourceInfoA
(
HINF
InfHandle
,
UINT
SourceId
,
UINT
InfoDesired
,
PSTR
ReturnBuffer
,
DWORD
ReturnBufferSize
,
LPDWORD
RequiredSize
)
{
FIXME
(
"(%p, %d, %d, %p, %d, %p): stub
\n
"
,
InfHandle
,
SourceId
,
InfoDesired
,
ReturnBuffer
,
ReturnBufferSize
,
RequiredSize
);
return
FALSE
;
}
/***********************************************************************
* SetupGetSourceInfoW (SETUPAPI.@)
*/
BOOL
WINAPI
SetupGetSourceInfoW
(
HINF
InfHandle
,
UINT
SourceId
,
UINT
InfoDesired
,
PWSTR
ReturnBuffer
,
DWORD
ReturnBufferSize
,
LPDWORD
RequiredSize
)
{
FIXME
(
"(%p, %d, %d, %p, %d, %p): stub
\n
"
,
InfHandle
,
SourceId
,
InfoDesired
,
ReturnBuffer
,
ReturnBufferSize
,
RequiredSize
);
return
FALSE
;
}
/***********************************************************************
* SetupInitializeFileLogW(SETUPAPI.@)
*/
HANDLE
WINAPI
SetupInitializeFileLogW
(
LPWSTR
LogFileName
,
DWORD
Flags
)
...
...
include/setupapi.h
View file @
ae64a622
...
...
@@ -692,6 +692,10 @@ DECL_WINELIB_SETUPAPI_TYPE_AW(PFILEPATHS)
#define LogSevFatalError 0x00000003
#define LogSevMaximum 0x00000004
#define SRCINFO_PATH 1
#define SRCINFO_TAGFILE 2
#define SRCINFO_DESCRIPTION 3
LONG
WINAPI
AddTagToGroupOrderList
(
PCWSTR
lpGroupName
,
DWORD
dwUnknown2
,
DWORD
dwUnknown3
);
DWORD
WINAPI
CaptureAndConvertAnsiArg
(
PCSTR
lpSrc
,
PWSTR
*
lpDst
);
DWORD
WINAPI
CaptureStringArg
(
PCWSTR
lpSrc
,
PWSTR
*
lpDst
);
...
...
@@ -817,6 +821,9 @@ BOOL WINAPI SetupGetMultiSzFieldW( PINFCONTEXT context, DWORD index, PWSTR b
BOOL
WINAPI
SetupGetSourceFileLocationA
(
HINF
hinf
,
PINFCONTEXT
context
,
PCSTR
filename
,
PUINT
source_id
,
PSTR
buffer
,
DWORD
buffer_size
,
PDWORD
required_size
);
BOOL
WINAPI
SetupGetSourceFileLocationW
(
HINF
hinf
,
PINFCONTEXT
context
,
PCWSTR
filename
,
PUINT
source_id
,
PWSTR
buffer
,
DWORD
buffer_size
,
PDWORD
required_size
);
#define SetupGetSourceFileLocation WINELIB_NAME_AW(SetupGetSourceFileLocation)
BOOL
WINAPI
SetupGetSourceInfoA
(
HINF
hinf
,
UINT
source_id
,
UINT
info
,
PSTR
buffer
,
DWORD
buffer_size
,
LPDWORD
required_size
);
BOOL
WINAPI
SetupGetSourceInfoW
(
HINF
hinf
,
UINT
source_id
,
UINT
info
,
PWSTR
buffer
,
DWORD
buffer_size
,
LPDWORD
required_size
);
#define SetupGetSourceInfo WINELIB_NAME_AW(SetupGetSourceInfo)
BOOL
WINAPI
SetupGetStringFieldA
(
PINFCONTEXT
context
,
DWORD
index
,
PSTR
buffer
,
DWORD
size
,
PDWORD
required
);
BOOL
WINAPI
SetupGetStringFieldW
(
PINFCONTEXT
context
,
DWORD
index
,
PWSTR
buffer
,
DWORD
size
,
PDWORD
required
);
#define SetupGetStringField WINELIB_NAME_AW(SetupGetStringField)
...
...
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