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
12a9ed0a
Commit
12a9ed0a
authored
Apr 07, 2006
by
James Hawkins
Committed by
Alexandre Julliard
Apr 07, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advpack: Forward DelNodeRunDLL32A to its Unicode counterpart.
parent
cc4b01a0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
12 deletions
+33
-12
advpack.spec
dlls/advpack/advpack.spec
+1
-1
files.c
dlls/advpack/files.c
+32
-11
No files found.
dlls/advpack/advpack.spec
View file @
12a9ed0a
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
@ stdcall DelNodeW(wstr long)
@ stdcall DelNodeW(wstr long)
@ stdcall DelNode(str long) DelNodeA
@ stdcall DelNode(str long) DelNodeA
@ stdcall DelNodeRunDLL32A(ptr ptr str long)
@ stdcall DelNodeRunDLL32A(ptr ptr str long)
#
stdcall DelNodeRunDLL32W(ptr ptr wstr long)
@
stdcall DelNodeRunDLL32W(ptr ptr wstr long)
@ stdcall DelNodeRunDLL32(ptr ptr str long) DelNodeRunDLL32A
@ stdcall DelNodeRunDLL32(ptr ptr str long) DelNodeRunDLL32A
@ stdcall -private DllMain(long long ptr)
@ stdcall -private DllMain(long long ptr)
@ stdcall DoInfInstall(ptr)
@ stdcall DoInfInstall(ptr)
...
...
dlls/advpack/files.c
View file @
12a9ed0a
...
@@ -454,14 +454,14 @@ HRESULT WINAPI DelNodeW( LPCWSTR pszFileOrDirName, DWORD dwFlags )
...
@@ -454,14 +454,14 @@ HRESULT WINAPI DelNodeW( LPCWSTR pszFileOrDirName, DWORD dwFlags )
/* sequentially returns pointers to parameters in a parameter list
/* sequentially returns pointers to parameters in a parameter list
* returns NULL if the parameter is empty, e.g. one,,three */
* returns NULL if the parameter is empty, e.g. one,,three */
static
LP
STR
get_parameter
(
LPSTR
*
params
,
char
separator
)
static
LP
WSTR
get_parameter
(
LPWSTR
*
params
,
WCHAR
separator
)
{
{
LPSTR
token
=
*
params
;
LP
W
STR
token
=
*
params
;
if
(
!*
params
)
if
(
!*
params
)
return
NULL
;
return
NULL
;
*
params
=
strchr
(
*
params
,
separator
);
*
params
=
strchr
W
(
*
params
,
separator
);
if
(
*
params
)
if
(
*
params
)
*
(
*
params
)
++
=
'\0'
;
*
(
*
params
)
++
=
'\0'
;
...
@@ -474,6 +474,27 @@ static LPSTR get_parameter(LPSTR *params, char separator)
...
@@ -474,6 +474,27 @@ static LPSTR get_parameter(LPSTR *params, char separator)
/***********************************************************************
/***********************************************************************
* DelNodeRunDLL32A (ADVPACK.@)
* DelNodeRunDLL32A (ADVPACK.@)
*
*
* See DelNodeRunDLL32W.
*/
HRESULT
WINAPI
DelNodeRunDLL32A
(
HWND
hWnd
,
HINSTANCE
hInst
,
LPSTR
cmdline
,
INT
show
)
{
UNICODE_STRING
params
;
HRESULT
hr
;
TRACE
(
"(%p, %p, %s, %i)
\n
"
,
hWnd
,
hInst
,
debugstr_a
(
cmdline
),
show
);
RtlCreateUnicodeStringFromAsciiz
(
&
params
,
cmdline
);
hr
=
DelNodeRunDLL32W
(
hWnd
,
hInst
,
params
.
Buffer
,
show
);
RtlFreeUnicodeString
(
&
params
);
return
hr
;
}
/***********************************************************************
* DelNodeRunDLL32W (ADVPACK.@)
*
* Deletes a file or directory, WinMain style.
* Deletes a file or directory, WinMain style.
*
*
* PARAMS
* PARAMS
...
@@ -486,27 +507,27 @@ static LPSTR get_parameter(LPSTR *params, char separator)
...
@@ -486,27 +507,27 @@ static LPSTR get_parameter(LPSTR *params, char separator)
* Success: S_OK.
* Success: S_OK.
* Failure: E_FAIL.
* Failure: E_FAIL.
*/
*/
HRESULT
WINAPI
DelNodeRunDLL32
A
(
HWND
hWnd
,
HINSTANCE
hInst
,
LPSTR
cmdline
,
INT
show
)
HRESULT
WINAPI
DelNodeRunDLL32
W
(
HWND
hWnd
,
HINSTANCE
hInst
,
LPWSTR
cmdline
,
INT
show
)
{
{
LPSTR
szFilename
,
szFlags
;
LP
W
STR
szFilename
,
szFlags
;
LPSTR
cmdline_copy
,
cmdline_ptr
;
LP
W
STR
cmdline_copy
,
cmdline_ptr
;
DWORD
dwFlags
=
0
;
DWORD
dwFlags
=
0
;
HRESULT
res
;
HRESULT
res
;
TRACE
(
"(%p, %p, %s, %i)
\n
"
,
hWnd
,
hInst
,
debugstr_
a
(
cmdline
),
show
);
TRACE
(
"(%p, %p, %s, %i)
\n
"
,
hWnd
,
hInst
,
debugstr_
w
(
cmdline
),
show
);
cmdline_copy
=
HeapAlloc
(
GetProcessHeap
(),
0
,
lstrlenA
(
cmdline
)
+
1
);
cmdline_copy
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlenW
(
cmdline
)
+
1
)
*
sizeof
(
WCHAR
)
);
cmdline_ptr
=
cmdline_copy
;
cmdline_ptr
=
cmdline_copy
;
lstrcpy
A
(
cmdline_copy
,
cmdline
);
lstrcpy
W
(
cmdline_copy
,
cmdline
);
/* get the parameters at indexes 0 and 1 respectively */
/* get the parameters at indexes 0 and 1 respectively */
szFilename
=
get_parameter
(
&
cmdline_ptr
,
','
);
szFilename
=
get_parameter
(
&
cmdline_ptr
,
','
);
szFlags
=
get_parameter
(
&
cmdline_ptr
,
','
);
szFlags
=
get_parameter
(
&
cmdline_ptr
,
','
);
if
(
szFlags
)
if
(
szFlags
)
dwFlags
=
atol
(
szFlags
);
dwFlags
=
atol
W
(
szFlags
);
res
=
DelNode
A
(
szFilename
,
dwFlags
);
res
=
DelNode
W
(
szFilename
,
dwFlags
);
HeapFree
(
GetProcessHeap
(),
0
,
cmdline_copy
);
HeapFree
(
GetProcessHeap
(),
0
,
cmdline_copy
);
...
...
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