- Update to r53061
[reactos.git] / dll / win32 / kernel32 / include / kernel32.h
old mode 100755 (executable)
new mode 100644 (file)
index 55b1338..ec4109f
@@ -9,11 +9,22 @@
 #define resource                203
 #define kernel32session         204
 
+
+#if DBG
+#define DEBUG_CHANNEL(ch) static ULONG gDebugChannel = ch;
+#else
+#define DEBUG_CHANNEL(ch)
+#endif
+
 #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 STUB \
+  SetLastError(ERROR_CALL_NOT_IMPLEMENTED); \
+  DPRINT1("%s() is UNIMPLEMENTED!\n", __FUNCTION__)
+
 #define debugstr_a  
 #define debugstr_w
 #define wine_dbgstr_w  
 /* Undocumented CreateProcess flag */
 #define STARTF_SHELLPRIVATE         0x400
   
-#define SetLastErrorByStatus(x) RtlSetLastWin32ErrorAndNtStatusFromNtStatus((x))
-#define GetLastError()          NtCurrentTeb()->LastErrorValue
-#define SetLastError(x)         NtCurrentTeb()->LastErrorValue = (x)
-
 typedef struct _CODEPAGE_ENTRY
 {
    LIST_ENTRY Entry;
@@ -73,6 +80,8 @@ typedef struct _CODEPAGE_ENTRY
    CPTABLEINFO CodePageTable;
 } CODEPAGE_ENTRY, *PCODEPAGE_ENTRY;
 
+extern PBASE_STATIC_SERVER_DATA BaseStaticServerData;
+
 typedef
 DWORD
 (*WaitForInputIdleType)(
@@ -86,12 +95,19 @@ extern HANDLE hProcessHeap;
 extern HANDLE hBaseDir;
 extern HMODULE hCurrentModule;
 
-extern RTL_CRITICAL_SECTION DllLock;
+extern RTL_CRITICAL_SECTION BaseDllDirectoryLock;
 
-extern UNICODE_STRING DllDirectory;
+extern UNICODE_STRING BaseDllDirectory;
+extern UNICODE_STRING BaseDefaultPath;
+extern UNICODE_STRING BaseDefaultPathAppend;
+extern PLDR_DATA_TABLE_ENTRY BasepExeLdrEntry;
 
 extern LPTOP_LEVEL_EXCEPTION_FILTER GlobalTopLevelExceptionFilter;
 
+extern SYSTEM_BASIC_INFORMATION BaseCachedSysInfo;
+
+extern BOOLEAN BaseRunningInServerProcess;
+
 /* FUNCTION PROTOTYPES *******************************************************/
 
 BOOL WINAPI VerifyConsoleIoHandle(HANDLE Handle);
@@ -123,6 +139,11 @@ DWORD FilenameU2A_FitOrFail(LPSTR  DestA, INT destLen, PUNICODE_STRING SourceU);
 #define HeapFree RtlFreeHeap
 #define _lread  (_readfun)_hread
 
+PLARGE_INTEGER
+WINAPI
+BaseFormatTimeOut(OUT PLARGE_INTEGER Timeout,
+                  IN DWORD dwMilliseconds);
+
 POBJECT_ATTRIBUTES
 WINAPI
 BasepConvertObjectAttributes(OUT POBJECT_ATTRIBUTES ObjectAttributes,
@@ -185,17 +206,14 @@ BasepAnsiStringToHeapUnicodeString(IN LPCSTR AnsiString,
                                    
 PUNICODE_STRING
 WINAPI
-Basep8BitStringToCachedUnicodeString(IN LPCSTR String);
+Basep8BitStringToStaticUnicodeString(IN LPCSTR AnsiString);
 
-NTSTATUS
-WINAPI
-Basep8BitStringToLiveUnicodeString(OUT PUNICODE_STRING UnicodeString,
-                                   IN LPCSTR String);
-
-NTSTATUS
+BOOLEAN
 WINAPI
-Basep8BitStringToHeapUnicodeString(OUT PUNICODE_STRING UnicodeString,
-                                   IN LPCSTR String);
+Basep8BitStringToDynamicUnicodeString(OUT PUNICODE_STRING UnicodeString,
+                                      IN LPCSTR String);
+#define BasepUnicodeStringTo8BitString RtlUnicodeStringToAnsiString
 
 typedef NTSTATUS (NTAPI *PRTL_CONVERT_STRING)(IN PUNICODE_STRING UnicodeString,
                                               IN PANSI_STRING AnsiString,
@@ -209,6 +227,12 @@ BasepMapFile(IN LPCWSTR lpApplicationName,
              OUT PHANDLE hSection,
              IN PUNICODE_STRING ApplicationName);
 
+LPWSTR
+WINAPI
+BasepGetDllPath(LPWSTR FullPath,
+                PVOID Environment);
+
+
 PCODEPAGE_ENTRY FASTCALL
 IntGetCodePageEntry(UINT CodePage);
 
@@ -218,3 +242,10 @@ GetDllLoadPath(LPCWSTR lpModule);
 VOID
 WINAPI
 InitCommandLines(VOID);
+
+VOID
+WINAPI
+BaseSetLastNTError(IN NTSTATUS Status);
+
+/* FIXME */
+WCHAR WINAPI RtlAnsiCharToUnicodeChar(LPSTR *);