Author: cwittich Date: Sun Jan 13 16:44:14 2008 New Revision: 31760
URL: http://svn.reactos.org/svn/reactos?rev=31760&view=rev Log: don't corrupt the image path
Modified: trunk/reactos/base/system/services/rpcserver.c
Modified: trunk/reactos/base/system/services/rpcserver.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/rpcser... ============================================================================== --- trunk/reactos/base/system/services/rpcserver.c (original) +++ trunk/reactos/base/system/services/rpcserver.c Sun Jan 13 16:44:14 2008 @@ -1058,10 +1058,7 @@
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 @@ 0, REG_EXPAND_SZ, (LPBYTE)lpImagePath, - (wcslen(lpImagePath) + 1) *sizeof(WCHAR)); + (wcslen(lpImagePath) + 1) * sizeof(WCHAR)); if (dwError != ERROR_SUCCESS) goto done; }