[WIN32 DLLS]
[reactos.git] / dll / win32 / ole32 / moniker.c
index a7c5a11..f4321bb 100644 (file)
@@ -127,6 +127,7 @@ static BOOL start_rpcss(void)
     WCHAR cmd[MAX_PATH];
     static const WCHAR rpcss[] = {'\\','r','p','c','s','s','.','e','x','e',0};
     BOOL rslt;
+    void *redir;
 
     TRACE("\n");
 
@@ -135,7 +136,9 @@ static BOOL start_rpcss(void)
     GetSystemDirectoryW( cmd, MAX_PATH - sizeof(rpcss)/sizeof(WCHAR) );
     strcatW( cmd, rpcss );
 
+    Wow64DisableWow64FsRedirection( &redir );
     rslt = CreateProcessW( cmd, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi );
+    Wow64RevertWow64FsRedirection( redir );
 
     if (rslt)
     {
@@ -1106,7 +1109,13 @@ HRESULT WINAPI MkParseDisplayName(LPBC pbc, LPCOLESTR szDisplayName,
 
     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;
@@ -1648,7 +1657,7 @@ HRESULT MonikerMarshal_Create(IMoniker *inner, IUnknown **outer)
     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);
 }