Alexandre Julliard : rpcrt4: Specify the full application path when starting rpcss.exe.
Alexandre Julliard
julliard at winehq.org
Tue Oct 27 09:46:31 CDT 2009
Module: wine
Branch: master
Commit: c4ebf3687b6964a95f0b2d474f47c928bb2abcbf
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c4ebf3687b6964a95f0b2d474f47c928bb2abcbf
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Oct 27 11:20:42 2009 +0100
rpcrt4: Specify the full application path when starting rpcss.exe.
---
dlls/rpcrt4/rpc_epmap.c | 22 +++++-----------------
1 files changed, 5 insertions(+), 17 deletions(-)
diff --git a/dlls/rpcrt4/rpc_epmap.c b/dlls/rpcrt4/rpc_epmap.c
index 60c4255..c1b8d1d 100644
--- a/dlls/rpcrt4/rpc_epmap.c
+++ b/dlls/rpcrt4/rpc_epmap.c
@@ -79,30 +79,18 @@ static BOOL start_rpcss(void)
{
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;
TRACE("\n");
- ZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
ZeroMemory(&si, sizeof(STARTUPINFOA));
si.cb = sizeof(STARTUPINFOA);
+ GetSystemDirectoryW( cmd, MAX_PATH - sizeof(rpcss)/sizeof(WCHAR) );
+ lstrcatW( 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 */
- );
+ rslt = CreateProcessW( cmd, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi );
if (rslt)
{
More information about the wine-cvs
mailing list