Sync with trunk (r48545)
[reactos.git] / dll / win32 / kernel32 / include / kernel32.h
index ec6b78f..55b1338 100755 (executable)
@@ -1,6 +1,25 @@
-#ifndef _KERNEL32_INCLUDE_KERNEL32_H
-#define _KERNEL32_INCLUDE_KERNEL32_H
-
+#pragma once
+
+//
+// Kernel32 Filter IDs
+//
+#define kernel32file            200
+#define kernel32ver             201
+#define actctx                  202
+#define resource                203
+#define kernel32session         204
+
+#define TRACE(fmt, ...)         TRACE__(gDebugChannel, fmt, ##__VA_ARGS__)
+#define WARN(fmt, ...)          WARN__(gDebugChannel, fmt, ##__VA_ARGS__)
+#define FIXME(fmt, ...)         WARN__(gDebugChannel, fmt,## __VA_ARGS__)
+#define ERR(fmt, ...)           ERR__(gDebugChannel, fmt, ##__VA_ARGS__)
+
+#define debugstr_a  
+#define debugstr_w
+#define wine_dbgstr_w  
+#define debugstr_guid
+
+#include "wine/unicode.h"
 #include "baseheap.h"
 
 #define BINARY_UNKNOWN (0)
@@ -32,7 +51,7 @@
 #endif
 
 #define IsConsoleHandle(h) \
-  (((((ULONG)h) & 0x10000003) == 0x3) ? TRUE : FALSE)
+  (((((ULONG_PTR)h) & 0x10000003) == 0x3) ? TRUE : FALSE)
 
 #define HANDLE_DETACHED_PROCESS    (HANDLE)-2
 #define HANDLE_CREATE_NEW_CONSOLE  (HANDLE)-3
@@ -41,8 +60,9 @@
 /* Undocumented CreateProcess flag */
 #define STARTF_SHELLPRIVATE         0x400
   
-#define SetLastErrorByStatus(__S__) \
- ((void)SetLastError(RtlNtStatusToDosError(__S__)))
+#define SetLastErrorByStatus(x) RtlSetLastWin32ErrorAndNtStatusFromNtStatus((x))
+#define GetLastError()          NtCurrentTeb()->LastErrorValue
+#define SetLastError(x)         NtCurrentTeb()->LastErrorValue = (x)
 
 typedef struct _CODEPAGE_ENTRY
 {
@@ -86,6 +106,8 @@ HANDLE WINAPI OpenConsoleW (LPCWSTR wsName,
                             BOOL   bInheritHandle,
                             DWORD  dwShareMode);
 
+BOOL WINAPI SetConsoleInputExeNameW(LPCWSTR lpInputExeName);
+
 PTEB GetTeb(VOID);
 
 HANDLE FASTCALL TranslateStdHandle(HANDLE hHandle);
@@ -99,6 +121,7 @@ DWORD FilenameU2A_FitOrFail(LPSTR  DestA, INT destLen, PUNICODE_STRING SourceU);
 #define HeapAlloc RtlAllocateHeap
 #define HeapReAlloc RtlReAllocateHeap
 #define HeapFree RtlFreeHeap
+#define _lread  (_readfun)_hread
 
 POBJECT_ATTRIBUTES
 WINAPI
@@ -109,8 +132,8 @@ BasepConvertObjectAttributes(OUT POBJECT_ATTRIBUTES ObjectAttributes,
 NTSTATUS
 WINAPI
 BasepCreateStack(HANDLE hProcess,
-                 ULONG StackReserve,
-                 ULONG StackCommit,
+                 SIZE_T StackReserve,
+                 SIZE_T StackCommit,
                  PINITIAL_TEB InitialTeb);
                  
 VOID
@@ -192,5 +215,6 @@ IntGetCodePageEntry(UINT CodePage);
 LPWSTR
 GetDllLoadPath(LPCWSTR lpModule);
 
-#endif /* ndef _KERNEL32_INCLUDE_KERNEL32_H */
-
+VOID
+WINAPI
+InitCommandLines(VOID);