[PSDK] Add some missing definitions to winbase.h. Import libloaderapi.h from Wine...
authorAmine Khaldi <amine.khaldi@reactos.org>
Thu, 19 Oct 2017 10:06:20 +0000 (11:06 +0100)
committerAmine Khaldi <amine.khaldi@reactos.org>
Thu, 19 Oct 2017 21:29:35 +0000 (22:29 +0100)
sdk/include/psdk/libloaderapi.h [new file with mode: 0644]
sdk/include/psdk/winbase.h

diff --git a/sdk/include/psdk/libloaderapi.h b/sdk/include/psdk/libloaderapi.h
new file mode 100644 (file)
index 0000000..8f112a7
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2017 Alexandre Julliard
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef _APISETLIBLOADER_
+#define _APISETLIBLOADER_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef void *DLL_DIRECTORY_COOKIE, **PDLL_DIRECTORY_COOKIE;
+
+WINBASEAPI DLL_DIRECTORY_COOKIE WINAPI AddDllDirectory(const WCHAR *);
+WINBASEAPI BOOL WINAPI RemoveDllDirectory(DLL_DIRECTORY_COOKIE);
+WINBASEAPI BOOL WINAPI SetDefaultDllDirectories(DWORD);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  /* _APISETLIBLOADER_ */
index 09812fc..ec3615a 100644 (file)
@@ -11,6 +11,8 @@
 extern "C" {
 #endif
 
+#include <libloaderapi.h>
+
 #ifdef _MSC_VER
 #pragma warning(push)
 #pragma warning(disable:4201)
@@ -331,12 +333,19 @@ extern "C" {
 #define PROCESS_HEAP_ENTRY_BUSY 4
 #define PROCESS_HEAP_ENTRY_MOVEABLE 16
 #define PROCESS_HEAP_ENTRY_DDESHARE 32
-#define DONT_RESOLVE_DLL_REFERENCES 1
-#define LOAD_LIBRARY_AS_DATAFILE 2
-#define LOAD_WITH_ALTERED_SEARCH_PATH 8
-#define LOAD_IGNORE_CODE_AUTHZ_LEVEL 16
-#define LOAD_LIBRARY_AS_IMAGE_RESOURCE 32
-#define LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE 64
+
+#define DONT_RESOLVE_DLL_REFERENCES         1
+#define LOAD_LIBRARY_AS_DATAFILE            2
+#define LOAD_WITH_ALTERED_SEARCH_PATH       8
+#define LOAD_IGNORE_CODE_AUTHZ_LEVEL        16
+#define LOAD_LIBRARY_AS_IMAGE_RESOURCE      32
+#define LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE  64
+#define LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR    256
+#define LOAD_LIBRARY_SEARCH_APPLICATION_DIR 512
+#define LOAD_LIBRARY_SEARCH_USER_DIRS       1024
+#define LOAD_LIBRARY_SEARCH_SYSTEM32        2048
+#define LOAD_LIBRARY_SEARCH_DEFAULT_DIRS    4096
+
 #define LMEM_FIXED 0
 #define LMEM_MOVEABLE 2
 #define LMEM_NONZEROLHND 2
@@ -576,6 +585,11 @@ extern "C" {
 #define CONDITION_VARIABLE_LOCKMODE_SHARED  RTL_CONDITION_VARIABLE_LOCKMODE_SHARED
 #endif
 
+#define BASE_SEARCH_PATH_ENABLE_SAFE_SEARCHMODE  0x00001
+#define BASE_SEARCH_PATH_DISABLE_SAFE_SEARCHMODE 0x10000
+#define BASE_SEARCH_PATH_PERMANENT               0x08000
+#define BASE_SEARCH_PATH_INVALID_FLAGS           (~0x18001)
+
 #define INIT_ONCE_STATIC_INIT RTL_RUN_ONCE_INIT
 
 #if (_WIN32_WINNT >= 0x0600)