Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
134c03b3
Commit
134c03b3
authored
Nov 16, 2006
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 16, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Implement SetupGetTargetPath{A,W}.
parent
01ab25e4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
96 additions
and
2 deletions
+96
-2
query.c
dlls/setupapi/query.c
+91
-0
setupapi.spec
dlls/setupapi/setupapi.spec
+2
-2
setupapi.h
include/setupapi.h
+3
-0
No files found.
dlls/setupapi/query.c
View file @
134c03b3
...
@@ -516,3 +516,94 @@ BOOL WINAPI SetupGetSourceInfoW( HINF hinf, UINT source_id, UINT info,
...
@@ -516,3 +516,94 @@ BOOL WINAPI SetupGetSourceInfoW( HINF hinf, UINT source_id, UINT info,
}
}
return
TRUE
;
return
TRUE
;
}
}
/***********************************************************************
* SetupGetTargetPathA (SETUPAPI.@)
*/
BOOL
WINAPI
SetupGetTargetPathA
(
HINF
hinf
,
PINFCONTEXT
context
,
PCSTR
section
,
PSTR
buffer
,
DWORD
buffer_size
,
PDWORD
required_size
)
{
BOOL
ret
=
FALSE
;
WCHAR
*
sectionW
=
NULL
,
*
bufferW
=
NULL
;
DWORD
required
;
INT
size
;
TRACE
(
"%p, %p, %s, %p, 0x%08x, %p
\n
"
,
hinf
,
context
,
debugstr_a
(
section
),
buffer
,
buffer_size
,
required_size
);
if
(
section
&&
!
(
sectionW
=
strdupAtoW
(
section
)))
return
FALSE
;
if
(
!
SetupGetTargetPathW
(
hinf
,
context
,
sectionW
,
NULL
,
0
,
&
required
))
goto
done
;
if
(
!
(
bufferW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
required
*
sizeof
(
WCHAR
)
)))
goto
done
;
if
(
!
SetupGetTargetPathW
(
hinf
,
context
,
sectionW
,
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
,
sectionW
);
HeapFree
(
GetProcessHeap
(),
0
,
bufferW
);
return
ret
;
}
/***********************************************************************
* SetupGetTargetPathW (SETUPAPI.@)
*/
BOOL
WINAPI
SetupGetTargetPathW
(
HINF
hinf
,
PINFCONTEXT
context
,
PCWSTR
section
,
PWSTR
buffer
,
DWORD
buffer_size
,
PDWORD
required_size
)
{
static
const
WCHAR
destination_dirs
[]
=
{
'D'
,
'e'
,
's'
,
't'
,
'i'
,
'n'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'D'
,
'i'
,
'r'
,
's'
,
0
};
static
const
WCHAR
default_dest_dir
[]
=
{
'D'
,
'e'
,
'f'
,
'a'
,
'u'
,
'l'
,
't'
,
'D'
,
'e'
,
's'
,
't'
,
'D'
,
'i'
,
'r'
,
0
};
INFCONTEXT
ctx
;
WCHAR
*
dir
;
INT
size
;
TRACE
(
"%p, %p, %s, %p, 0x%08x, %p
\n
"
,
hinf
,
context
,
debugstr_w
(
section
),
buffer
,
buffer_size
,
required_size
);
if
(
context
&&
!
SetupFindFirstLineW
(
hinf
,
destination_dirs
,
NULL
,
context
))
return
FALSE
;
else
if
(
section
&&
!
SetupFindFirstLineW
(
hinf
,
section
,
NULL
,
&
ctx
))
return
FALSE
;
else
if
(
!
SetupFindFirstLineW
(
hinf
,
destination_dirs
,
default_dest_dir
,
&
ctx
))
return
FALSE
;
if
(
!
(
dir
=
PARSER_get_dest_dir
(
context
?
context
:
&
ctx
)))
return
FALSE
;
size
=
lstrlenW
(
dir
)
+
1
;
if
(
required_size
)
*
required_size
=
size
;
if
(
buffer
)
{
if
(
buffer_size
>=
size
)
lstrcpyW
(
buffer
,
dir
);
else
{
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
HeapFree
(
GetProcessHeap
(),
0
,
dir
);
return
FALSE
;
}
}
HeapFree
(
GetProcessHeap
(),
0
,
dir
);
return
TRUE
;
}
dlls/setupapi/setupapi.spec
View file @
134c03b3
...
@@ -421,8 +421,8 @@
...
@@ -421,8 +421,8 @@
@ stdcall SetupGetSourceInfoW(ptr long long ptr long ptr)
@ stdcall SetupGetSourceInfoW(ptr long long ptr long ptr)
@ stdcall SetupGetStringFieldA(ptr long ptr long ptr)
@ stdcall SetupGetStringFieldA(ptr long ptr long ptr)
@ stdcall SetupGetStringFieldW(ptr long ptr long ptr)
@ stdcall SetupGetStringFieldW(ptr long ptr long ptr)
@ st
ub SetupGetTargetPathA
@ st
dcall SetupGetTargetPathA(ptr ptr str ptr long ptr)
@ st
ub SetupGetTargetPathW
@ st
dcall SetupGetTargetPathW(ptr ptr wstr ptr long ptr)
@ stdcall SetupInitDefaultQueueCallback(long)
@ stdcall SetupInitDefaultQueueCallback(long)
@ stdcall SetupInitDefaultQueueCallbackEx(long long long long ptr)
@ stdcall SetupInitDefaultQueueCallbackEx(long long long long ptr)
@ stdcall SetupInitializeFileLogA (str long)
@ stdcall SetupInitializeFileLogA (str long)
...
...
include/setupapi.h
View file @
134c03b3
...
@@ -827,6 +827,9 @@ BOOL WINAPI SetupGetSourceInfoW( HINF hinf, UINT source_id, UINT info, PWSTR
...
@@ -827,6 +827,9 @@ BOOL WINAPI SetupGetSourceInfoW( HINF hinf, UINT source_id, UINT info, PWSTR
BOOL
WINAPI
SetupGetStringFieldA
(
PINFCONTEXT
context
,
DWORD
index
,
PSTR
buffer
,
DWORD
size
,
PDWORD
required
);
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
);
BOOL
WINAPI
SetupGetStringFieldW
(
PINFCONTEXT
context
,
DWORD
index
,
PWSTR
buffer
,
DWORD
size
,
PDWORD
required
);
#define SetupGetStringField WINELIB_NAME_AW(SetupGetStringField)
#define SetupGetStringField WINELIB_NAME_AW(SetupGetStringField)
BOOL
WINAPI
SetupGetTargetPathA
(
HINF
hinf
,
PINFCONTEXT
context
,
PCSTR
section
,
PSTR
buffer
,
DWORD
buffer_size
,
PDWORD
required_size
);
BOOL
WINAPI
SetupGetTargetPathW
(
HINF
hinf
,
PINFCONTEXT
context
,
PCWSTR
section
,
PWSTR
buffer
,
DWORD
buffer_size
,
PDWORD
required_size
);
#define SetupGetTargetPath WINELIB_NAME_AW(SetupGetTargetPath)
PVOID
WINAPI
SetupInitDefaultQueueCallback
(
HWND
);
PVOID
WINAPI
SetupInitDefaultQueueCallback
(
HWND
);
PVOID
WINAPI
SetupInitDefaultQueueCallbackEx
(
HWND
,
HWND
,
UINT
,
DWORD
,
PVOID
);
PVOID
WINAPI
SetupInitDefaultQueueCallbackEx
(
HWND
,
HWND
,
UINT
,
DWORD
,
PVOID
);
BOOL
WINAPI
SetupInstallFilesFromInfSectionA
(
HINF
,
HINF
,
HSPFILEQ
,
PCSTR
,
PCSTR
,
UINT
);
BOOL
WINAPI
SetupInstallFilesFromInfSectionA
(
HINF
,
HINF
,
HSPFILEQ
,
PCSTR
,
PCSTR
,
UINT
);
...
...
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