Author: hbelusca
Date: Tue Sep 10 20:45:53 2013
New Revision: 60012
URL:
http://svn.reactos.org/svn/reactos?rev=60012&view=rev
Log:
[BASESRV]
- Fix header formatting plus windows headers inclusion.
- RtlCreateUnicodeString returns booleans, not ntstatuses, so fix the code appropriately.
Modified:
trunk/reactos/subsystems/win/basesrv/basesrv.h
trunk/reactos/subsystems/win/basesrv/init.c
Modified: trunk/reactos/subsystems/win/basesrv/basesrv.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win/basesrv/bas…
==============================================================================
--- trunk/reactos/subsystems/win/basesrv/basesrv.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win/basesrv/basesrv.h [iso-8859-1] Tue Sep 10 20:45:53 2013
@@ -12,10 +12,18 @@
#pragma once
/* PSDK/NDK Headers */
+#include <stdarg.h>
#define WIN32_NO_STATUS
-#include <windows.h>
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+#include <windef.h>
+#include <winbase.h>
+#include <winreg.h>
#define NTOS_MODE_USER
#include <ndk/ntndk.h>
+
+/* PSEH for SEH Support */
+#include <pseh/pseh2.h>
/* CSRSS Header */
#include <csr/csrsrv.h>
@@ -31,25 +39,24 @@
} BASESRV_KERNEL_IMPORTS, *PBASESRV_KERNEL_IMPORTS;
/* FIXME: BASENLS.H */
-typedef NTSTATUS(*WINAPI POPEN_DATA_FILE) (HANDLE hFile,
- PWCHAR FileName
- );
+typedef NTSTATUS(*WINAPI POPEN_DATA_FILE)(HANDLE hFile,
+ PWCHAR FileName);
-typedef BOOL(*WINAPI PGET_CP_FILE_NAME_FROM_REGISTRY)(UINT CodePage,
- LPWSTR FileName,
- ULONG FileNameSize
- );
+typedef BOOL(*WINAPI PGET_CP_FILE_NAME_FROM_REGISTRY)(UINT CodePage,
+ LPWSTR FileName,
+ ULONG FileNameSize);
-typedef BOOL(*WINAPI PGET_NLS_SECTION_NAME)(UINT CodePage,
- UINT Base,
- ULONG Unknown,
- LPWSTR BaseName,
- LPWSTR Result,
- ULONG ResultSize
- );
+typedef BOOL(*WINAPI PGET_NLS_SECTION_NAME)(UINT CodePage,
+ UINT Base,
+ ULONG Unknown,
+ LPWSTR BaseName,
+ LPWSTR Result,
+ ULONG ResultSize);
typedef BOOL(*WINAPI PVALIDATE_LOCALE)(IN ULONG LocaleId);
-typedef NTSTATUS(*WINAPI PCREATE_NLS_SECURTY_DESCRIPTOR)(IN PVOID Buffer, IN ULONG
BufferSize, IN ULONG AceType);
+typedef NTSTATUS(*WINAPI PCREATE_NLS_SECURTY_DESCRIPTOR)(IN PVOID Buffer,
+ IN ULONG BufferSize,
+ IN ULONG AceType);
/* Globals */
extern HANDLE BaseSrvHeap;
Modified: trunk/reactos/subsystems/win/basesrv/init.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win/basesrv/ini…
==============================================================================
--- trunk/reactos/subsystems/win/basesrv/init.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win/basesrv/init.c [iso-8859-1] Tue Sep 10 20:45:53 2013
@@ -280,6 +280,7 @@
BaseInitializeStaticServerData(IN PCSR_SERVER_DLL LoadedServerDll)
{
NTSTATUS Status;
+ BOOLEAN Success;
WCHAR Buffer[MAX_PATH];
PWCHAR HeapBuffer;
UNICODE_STRING SystemRootString;
@@ -327,21 +328,21 @@
/* Create the base directory */
Buffer[SystemRootString.Length / sizeof(WCHAR)] = UNICODE_NULL;
- Status = RtlCreateUnicodeString(&BaseSrvWindowsDirectory,
- SystemRootString.Buffer);
- ASSERT(NT_SUCCESS(Status));
+ Success = RtlCreateUnicodeString(&BaseSrvWindowsDirectory,
+ SystemRootString.Buffer);
+ ASSERT(Success);
/* Create the system directory */
wcscat(SystemRootString.Buffer, L"\\System32");
- Status = RtlCreateUnicodeString(&BaseSrvWindowsSystemDirectory,
- SystemRootString.Buffer);
- ASSERT(NT_SUCCESS(Status));
+ Success = RtlCreateUnicodeString(&BaseSrvWindowsSystemDirectory,
+ SystemRootString.Buffer);
+ ASSERT(Success);
/* Create the kernel32 path */
wcscat(SystemRootString.Buffer, L"\\kernel32.dll");
- Status = RtlCreateUnicodeString(&BaseSrvKernel32DllPath,
- SystemRootString.Buffer);
- ASSERT(NT_SUCCESS(Status));
+ Success = RtlCreateUnicodeString(&BaseSrvKernel32DllPath,
+ SystemRootString.Buffer);
+ ASSERT(Success);
/* FIXME: Check Session ID */
wcscpy(Buffer, L"\\BaseNamedObjects");