Author: gadamopoulos
Date: Fri Feb 17 17:23:17 2017
New Revision: 73818
URL:
http://svn.reactos.org/svn/reactos?rev=73818&view=rev
Log:
[SHELL32] -Expand the name of the cpl file because CreateActCtx needs a full path.
Modified:
trunk/reactos/dll/win32/shell32/wine/control.c
Modified: trunk/reactos/dll/win32/shell32/wine/control.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/wine/con…
==============================================================================
--- trunk/reactos/dll/win32/shell32/wine/control.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/wine/control.c [iso-8859-1] Fri Feb 17 17:23:17 2017
@@ -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 @@
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 @@
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);