https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f61627e540ca929882df4…
commit f61627e540ca929882df4ea594c29e3894424e7c
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Thu Oct 19 11:06:20 2017 +0100
[PSDK] Add some missing definitions to winbase.h. Import libloaderapi.h from Wine
Staging 2.16. CORE-13762
---
sdk/include/psdk/libloaderapi.h | 36 ++++++++++++++++++++++++++++++++++++
sdk/include/psdk/winbase.h | 26 ++++++++++++++++++++------
2 files changed, 56 insertions(+), 6 deletions(-)
diff --git a/sdk/include/psdk/libloaderapi.h b/sdk/include/psdk/libloaderapi.h
new file mode 100644
index 0000000000..8f112a7d60
--- /dev/null
+++ b/sdk/include/psdk/libloaderapi.h
@@ -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_ */
diff --git a/sdk/include/psdk/winbase.h b/sdk/include/psdk/winbase.h
index 09812fc128..ec3615aa3e 100644
--- a/sdk/include/psdk/winbase.h
+++ b/sdk/include/psdk/winbase.h
@@ -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)