mirror of
https://github.com/reactos/reactos.git
synced 2024-08-21 02:43:48 +00:00
don't corrupt the image path
svn path=/trunk/; revision=31760
This commit is contained in:
parent
497eab27f4
commit
16f2303c0b
|
@ -1058,10 +1058,7 @@ ScmrCreateServiceW(handle_t BindingHandle,
|
||||||
|
|
||||||
if (dwServiceType & SERVICE_DRIVER)
|
if (dwServiceType & SERVICE_DRIVER)
|
||||||
{
|
{
|
||||||
/* FIXME: Adjust the image path
|
/* 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);
|
|
||||||
|
|
||||||
lpImagePath = (WCHAR*) HeapAlloc(GetProcessHeap(),
|
lpImagePath = (WCHAR*) HeapAlloc(GetProcessHeap(),
|
||||||
HEAP_ZERO_MEMORY,
|
HEAP_ZERO_MEMORY,
|
||||||
|
@ -1185,7 +1182,7 @@ ScmrCreateServiceW(handle_t BindingHandle,
|
||||||
0,
|
0,
|
||||||
REG_EXPAND_SZ,
|
REG_EXPAND_SZ,
|
||||||
(LPBYTE)lpImagePath,
|
(LPBYTE)lpImagePath,
|
||||||
(wcslen(lpImagePath) + 1) *sizeof(WCHAR));
|
(wcslen(lpImagePath) + 1) * sizeof(WCHAR));
|
||||||
if (dwError != ERROR_SUCCESS)
|
if (dwError != ERROR_SUCCESS)
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue