From 16f2303c0b248275aefde3f6b578dcbe1d3b5572 Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Sun, 13 Jan 2008 13:44:14 +0000 Subject: [PATCH] don't corrupt the image path svn path=/trunk/; revision=31760 --- reactos/base/system/services/rpcserver.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/reactos/base/system/services/rpcserver.c b/reactos/base/system/services/rpcserver.c index 4f5efa4feca..1b662e6bf41 100644 --- a/reactos/base/system/services/rpcserver.c +++ b/reactos/base/system/services/rpcserver.c @@ -1058,10 +1058,7 @@ ScmrCreateServiceW(handle_t BindingHandle, if (dwServiceType & SERVICE_DRIVER) { - /* FIXME: Adjust the image path - * Following line is VERY BAD, because it assumes that the - * first part of full file name is the OS directory */ - if (lpBinaryPathName[1] == ':') lpBinaryPathName += GetWindowsDirectoryW(NULL, 0); + /* FIXME: Adjust the image path */ lpImagePath = (WCHAR*) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, @@ -1185,7 +1182,7 @@ ScmrCreateServiceW(handle_t BindingHandle, 0, REG_EXPAND_SZ, (LPBYTE)lpImagePath, - (wcslen(lpImagePath) + 1) *sizeof(WCHAR)); + (wcslen(lpImagePath) + 1) * sizeof(WCHAR)); if (dwError != ERROR_SUCCESS) goto done; }