build.version.props: MyFsctlRegisterPath, MyNpRegisterPath, MyEventLogRegisterPath

This commit is contained in:
Bill Zissimopoulos
2022-08-19 17:43:55 +01:00
parent ec832b45ff
commit 637e8bb8c2
8 changed files with 117 additions and 18 deletions

View File

@ -584,8 +584,9 @@ NTSTATUS FspFsctlRegister(VOID)
SERVICE_DESCRIPTION ServiceDescription;
NTSTATUS Result;
if (0 == GetModuleFileNameW(DllInstance, DriverPath, MAX_PATH))
return FspNtStatusFromWin32(GetLastError());
Result = FspGetModuleFileName(DllInstance, DriverPath, MAX_PATH, L"" MyFsctlRegisterPath);
if (!NT_SUCCESS(Result))
return Result;
Size = lstrlenW(DriverPath);
if (4 < Size &&
@ -599,6 +600,14 @@ NTSTATUS FspFsctlRegister(VOID)
DriverPath[Size - 2] = L'y';
DriverPath[Size - 1] = L's';
}
else if (4 < Size &&
(L'.' == DriverPath[Size - 4]) &&
(L'S' == DriverPath[Size - 3] || L's' == DriverPath[Size - 3]) &&
(L'Y' == DriverPath[Size - 2] || L'y' == DriverPath[Size - 2]) &&
(L'S' == DriverPath[Size - 1] || L's' == DriverPath[Size - 1]) &&
(L'\0' == DriverPath[Size]))
{
}
else
/* should not happen! */
return STATUS_NO_SUCH_DEVICE;