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
a0816068
Commit
a0816068
authored
Apr 09, 2014
by
Hermès Bélusca-Maïto
Committed by
Alexandre Julliard
Apr 16, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Automatically expand CPL applet path string.
parent
d01a5533
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
+17
-7
control.c
dlls/shell32/control.c
+17
-7
No files found.
dlls/shell32/control.c
View file @
a0816068
...
...
@@ -62,6 +62,7 @@ void Control_UnloadApplet(CPlApplet* applet)
CPlApplet
*
Control_LoadApplet
(
HWND
hWnd
,
LPCWSTR
cmd
,
CPanel
*
panel
)
{
CPlApplet
*
applet
;
DWORD
len
;
unsigned
i
;
CPLINFO
info
;
NEWCPLINFOW
newinfo
;
...
...
@@ -69,21 +70,30 @@ CPlApplet* Control_LoadApplet(HWND hWnd, LPCWSTR cmd, CPanel* panel)
if
(
!
(
applet
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
applet
))))
return
applet
;
if
(
!
(
applet
->
cmd
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlenW
(
cmd
)
+
1
)
*
sizeof
(
WCHAR
))))
{
WARN
(
"Cannot allocate memory for applet path
\n
"
);
len
=
ExpandEnvironmentStringsW
(
cmd
,
NULL
,
0
);
if
(
len
>
0
)
{
if
(
!
(
applet
->
cmd
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
len
+
1
)
*
sizeof
(
WCHAR
))))
{
WARN
(
"Cannot allocate memory for applet path
\n
"
);
goto
theError
;
}
ExpandEnvironmentStringsW
(
cmd
,
applet
->
cmd
,
len
+
1
);
}
else
{
WARN
(
"Cannot expand applet path
\n
"
);
goto
theError
;
}
lstrcpyW
(
applet
->
cmd
,
cmd
);
applet
->
hWnd
=
hWnd
;
if
(
!
(
applet
->
hModule
=
LoadLibraryW
(
cmd
)))
{
WARN
(
"Cannot load control panel applet %s
\n
"
,
debugstr_w
(
cmd
));
if
(
!
(
applet
->
hModule
=
LoadLibraryW
(
applet
->
cmd
)))
{
WARN
(
"Cannot load control panel applet %s
\n
"
,
debugstr_w
(
applet
->
cmd
));
goto
theError
;
}
if
(
!
(
applet
->
proc
=
(
APPLET_PROC
)
GetProcAddress
(
applet
->
hModule
,
"CPlApplet"
)))
{
WARN
(
"Not a valid control panel applet %s
\n
"
,
debugstr_w
(
cmd
));
WARN
(
"Not a valid control panel applet %s
\n
"
,
debugstr_w
(
applet
->
cmd
));
goto
theError
;
}
if
(
!
applet
->
proc
(
hWnd
,
CPL_INIT
,
0L
,
0L
))
{
...
...
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