Merged r17748,17750,17752 from trunk.
Modified:
branches/cache_manager_rewrite/reactos/lib/shell32/cpanelfolder.c
Modified: branches/cache_manager_rewrite/reactos/lib/shell32/shlexec.c
Modified: branches/cache_manager_rewrite/reactos/ntoskrnl/lpc/send.c
Modified: branches/cache_manager_rewrite/reactos/subsys/csrss/api/wapi.c
_____
Modified:
branches/cache_manager_rewrite/reactos/lib/shell32/cpanelfolder.c
--- branches/cache_manager_rewrite/reactos/lib/shell32/cpanelfolder.c
2005-10-17 22:27:49 UTC (rev 18542)
+++ branches/cache_manager_rewrite/reactos/lib/shell32/cpanelfolder.c
2005-10-17 22:40:24 UTC (rev 18543)
@@ -970,6 +970,7 @@
SHELLEXECUTEINFOW sei_tmp;
PIDLCPanelStruct* pcpanel;
WCHAR path[MAX_PATH];
+ WCHAR params[MAX_PATH];
BOOL ret;
int l;
@@ -990,12 +991,13 @@
/* pass applet name to Control_RunDLL to distinguish between
applets in one .cpl file */
path[l++] = '"';
- path[l++] = ' ';
+ path[l] = '\0';
- MultiByteToWideChar(CP_ACP, 0,
pcpanel->szName+pcpanel->offsDispName, -1, path+l, MAX_PATH);
+ MultiByteToWideChar(CP_ACP, 0,
pcpanel->szName+pcpanel->offsDispName, -1, params, MAX_PATH);
memcpy(&sei_tmp, psei, sizeof(sei_tmp));
sei_tmp.lpFile = path;
+ sei_tmp.lpParameters = params;
sei_tmp.fMask &= ~SEE_MASK_INVOKEIDLIST;
sei_tmp.lpVerb = wCplopen;
_____
Modified: branches/cache_manager_rewrite/reactos/lib/shell32/shlexec.c
--- branches/cache_manager_rewrite/reactos/lib/shell32/shlexec.c
2005-10-17 22:27:49 UTC (rev 18542)
+++ branches/cache_manager_rewrite/reactos/lib/shell32/shlexec.c
2005-10-17 22:40:24 UTC (rev 18543)
@@ -1263,9 +1263,10 @@
lpFile = wfileName;
+ strcpyW(wcmd, wszApplicationName);
if (sei_tmp.lpParameters[0]) {
- strcatW(wszApplicationName, wSpace);
- strcatW(wszApplicationName, wszParameters);
+ strcatW(wcmd, wSpace);
+ strcatW(wcmd, wszParameters);
}
/* We set the default to open, and that should generally work.
@@ -1273,7 +1274,7 @@
if (!sei_tmp.lpVerb)
sei_tmp.lpVerb = wszOpen;
- retval = execfunc(wszApplicationName, NULL, FALSE, &sei_tmp, sei);
+ retval = execfunc(wcmd, NULL, FALSE, &sei_tmp, sei);
if (retval > 32)
return TRUE;
_____
Modified: branches/cache_manager_rewrite/reactos/ntoskrnl/lpc/send.c
--- branches/cache_manager_rewrite/reactos/ntoskrnl/lpc/send.c
2005-10-17 22:27:49 UTC (rev 18542)
+++ branches/cache_manager_rewrite/reactos/ntoskrnl/lpc/send.c
2005-10-17 22:40:24 UTC (rev 18543)
@@ -38,6 +38,8 @@
#ifdef __USE_NT_LPC__
Msg.h.u2.s2.Type = LPC_CLIENT_DIED;
#endif
+ Msg.h.u1.s1.TotalLength = sizeof(Msg);
+ Msg.h.u1.s1.DataLength = sizeof(Msg) - sizeof(PORT_MESSAGE);
Msg.CreateTime = CreateTime;
Status = LpcRequestPort (Port, &Msg.h);
return(Status);
_____
Modified: branches/cache_manager_rewrite/reactos/subsys/csrss/api/wapi.c
--- branches/cache_manager_rewrite/reactos/subsys/csrss/api/wapi.c
2005-10-17 22:27:49 UTC (rev 18542)
+++ branches/cache_manager_rewrite/reactos/subsys/csrss/api/wapi.c
2005-10-17 22:40:24 UTC (rev 18543)
@@ -177,7 +177,8 @@
ServerApiPortThread (PVOID PortHandle)
{
NTSTATUS Status = STATUS_SUCCESS;
- PORT_MESSAGE Request;
+ BYTE RawRequest[sizeof(PORT_MESSAGE) + sizeof(CSR_CONNECTION_INFO)];
+ PPORT_MESSAGE Request = (PPORT_MESSAGE)RawRequest;
HANDLE hApiListenPort = * (PHANDLE) PortHandle;
HANDLE ServerPort = (HANDLE) 0;
HANDLE ServerThread = (HANDLE) 0;
@@ -192,10 +193,10 @@
REMOTE_PORT_VIEW LpcRead;
ServerPort = NULL;
- Status = NtListenPort (hApiListenPort, &Request);
+ Status = NtListenPort (hApiListenPort, Request);
if (!NT_SUCCESS(Status))
{
- DPRINT1("CSR: NtListenPort() failed\n");
+ DPRINT1("CSR: NtListenPort() failed, status=%x\n", Status);
break;
}
Status = NtAcceptConnectPort(& ServerPort,
@@ -210,11 +211,11 @@
break;
}
- ProcessData =
CsrCreateProcessData(Request.ClientId.UniqueProcess);
+ ProcessData =
CsrCreateProcessData(Request->ClientId.UniqueProcess);
if (ProcessData == NULL)
{
DPRINT1("Unable to allocate or find data for process
0x%x\n",
- Request.ClientId.UniqueProcess);
+ Request->ClientId.UniqueProcess);
Status = STATUS_UNSUCCESSFUL;
break;
}