{
PROCESS_INFORMATION pi;
STARTUPINFOW si;
- static WCHAR cmd[6];
- static const WCHAR rpcss[] = {'r','p','c','s','s',0};
+ WCHAR cmd[MAX_PATH];
+ static const WCHAR rpcss[] = {'\\','r','p','c','s','s','.','e','x','e',0};
BOOL rslt;
+ void *redir;
TRACE("\n");
- ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
ZeroMemory(&si, sizeof(STARTUPINFOA));
si.cb = sizeof(STARTUPINFOA);
+ GetSystemDirectoryW( cmd, MAX_PATH - sizeof(rpcss)/sizeof(WCHAR) );
+ strcatW( cmd, rpcss );
- memcpy(cmd, rpcss, sizeof(rpcss));
-
- rslt = CreateProcessW(
- NULL, /* executable */
- cmd, /* command line */
- NULL, /* process security attributes */
- NULL, /* primary thread security attributes */
- FALSE, /* inherit handles */
- 0, /* creation flags */
- NULL, /* use parent's environment */
- NULL, /* use parent's current directory */
- &si, /* STARTUPINFO pointer */
- &pi /* PROCESS_INFORMATION */
- );
+ Wow64DisableWow64FsRedirection( &redir );
+ rslt = CreateProcessW( cmd, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi );
+ Wow64RevertWow64FsRedirection( redir );
if (rslt)
{
TRACE("(%p, %s, %p, %p)\n", pbc, debugstr_w(szDisplayName), pchEaten, ppmk);
- if (!(IsValidInterface((LPUNKNOWN) pbc)))
+ if (!pbc || !IsValidInterface((LPUNKNOWN) pbc))
+ return E_INVALIDARG;
+
+ if (!szDisplayName || !*szDisplayName)
+ return E_INVALIDARG;
+
+ if (!pchEaten || !ppmk)
return E_INVALIDARG;
*pchEaten = 0;
return S_OK;
}
-void * __RPC_USER MIDL_user_allocate(SIZE_T size)
+void * __RPC_USER MIDL_user_allocate(size_t size)
{
return HeapAlloc(GetProcessHeap(), 0, size);
}