mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 22:05:49 +00:00
[SHELL32] -Expand the name of the cpl file because CreateActCtx needs a full path.
svn path=/trunk/; revision=73818
This commit is contained in:
parent
b742e89b01
commit
2667ff688f
1 changed files with 6 additions and 1 deletions
|
@ -30,6 +30,8 @@
|
|||
#include <shellapi.h>
|
||||
#include <wine/debug.h>
|
||||
|
||||
#include <strsafe.h>
|
||||
|
||||
#include "cpanel.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
|
@ -57,6 +59,7 @@ CPlApplet* Control_LoadApplet(HWND hWnd, LPCWSTR cmd, CPanel* panel)
|
|||
ACTCTXW ActCtx = {sizeof(ACTCTX), ACTCTX_FLAG_RESOURCE_NAME_VALID};
|
||||
ULONG_PTR cookie;
|
||||
BOOL bActivated;
|
||||
WCHAR fileBuffer[MAX_PATH];
|
||||
#endif
|
||||
CPlApplet* applet;
|
||||
DWORD len;
|
||||
|
@ -86,7 +89,9 @@ CPlApplet* Control_LoadApplet(HWND hWnd, LPCWSTR cmd, CPanel* panel)
|
|||
applet->hWnd = hWnd;
|
||||
|
||||
#ifdef __REACTOS__
|
||||
ActCtx.lpSource = applet->cmd;
|
||||
StringCchCopy(fileBuffer, MAX_PATH, applet->cmd);
|
||||
SearchPath(NULL, fileBuffer, NULL, MAX_PATH, fileBuffer, NULL);
|
||||
ActCtx.lpSource = fileBuffer;
|
||||
ActCtx.lpResourceName = (LPCWSTR)123;
|
||||
applet->hActCtx = CreateActCtx(&ActCtx);
|
||||
bActivated = (applet->hActCtx != INVALID_HANDLE_VALUE ? ActivateActCtx(applet->hActCtx, &cookie) : FALSE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue