https://git.reactos.org/?p=reactos.git;a=commitdiff;h=49bb853b2440c7152f34c…
commit 49bb853b2440c7152f34c216023e88212dafe8f1
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Sat Nov 13 11:43:41 2021 -0500
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Sat Jan 1 12:42:04 2022 -0500
[GDI32_VISTA] Move D3DKMT functions out of gdi32. CORE-17433
---
dll/apisets/CMakeLists.txt | 2 +-
dll/apisets/api-ms-win-dx-d3dkmt-l1-1-0.spec | 4 ++--
dll/apisets/update.py | 1 +
dll/directx/wine/wined3d/CMakeLists.txt | 2 +-
modules/rostests/winetests/gdi32/CMakeLists.txt | 2 +-
win32ss/CMakeLists.txt | 1 +
win32ss/gdi/gdi32/gdi32.spec | 3 ---
win32ss/gdi/gdi32/objects/dc.c | 13 -------------
win32ss/gdi/gdi32_vista/CMakeLists.txt | 26 +++++++++++++++++++++++++
win32ss/gdi/gdi32_vista/dc.c | 26 +++++++++++++++++++++++++
win32ss/gdi/gdi32_vista/gdi32_vista.rc | 5 +++++
win32ss/gdi/gdi32_vista/gdi32_vista.spec | 2 ++
12 files changed, 66 insertions(+), 21 deletions(-)
diff --git a/dll/apisets/CMakeLists.txt b/dll/apisets/CMakeLists.txt
index 3273531b34a..f101725bf77 100644
--- a/dll/apisets/CMakeLists.txt
+++ b/dll/apisets/CMakeLists.txt
@@ -200,7 +200,7 @@ add_apiset(api-ms-win-downlevel-shlwapi-l1-1-0 0x611f0000 shlwapi)
add_apiset(api-ms-win-downlevel-shlwapi-l2-1-0 0x61200000 shlwapi)
add_apiset(api-ms-win-downlevel-user32-l1-1-0 0x61210000 user32)
add_apiset(api-ms-win-downlevel-version-l1-1-0 0x61220000 version)
-add_apiset(api-ms-win-dx-d3dkmt-l1-1-0 0x61230000 gdi32)
+add_apiset(api-ms-win-dx-d3dkmt-l1-1-0 0x61230000 gdi32_vista gdi32)
add_apiset(api-ms-win-eventing-classicprovider-l1-1-0 0x61290000 advapi32)
add_apiset(api-ms-win-eventing-consumer-l1-1-0 0x612a0000 advapi32)
add_apiset(api-ms-win-eventing-controller-l1-1-0 0x612b0000 advapi32)
diff --git a/dll/apisets/api-ms-win-dx-d3dkmt-l1-1-0.spec
b/dll/apisets/api-ms-win-dx-d3dkmt-l1-1-0.spec
index 241a6eab50f..a0ba046c0b6 100644
--- a/dll/apisets/api-ms-win-dx-d3dkmt-l1-1-0.spec
+++ b/dll/apisets/api-ms-win-dx-d3dkmt-l1-1-0.spec
@@ -14,7 +14,7 @@
@ stub D3DKMTCreateAllocation
@ stub D3DKMTCreateAllocation2
@ stub D3DKMTCreateContext
-@ stdcall D3DKMTCreateDCFromMemory() gdi32.D3DKMTCreateDCFromMemory
+@ stdcall D3DKMTCreateDCFromMemory() gdi32_vista.D3DKMTCreateDCFromMemory
@ stub D3DKMTCreateDevice
@ stub D3DKMTCreateKeyedMutex
@ stub D3DKMTCreateKeyedMutex2
@@ -24,7 +24,7 @@
@ stub D3DKMTCreateSynchronizationObject2
@ stub D3DKMTDestroyAllocation
@ stub D3DKMTDestroyContext
-@ stdcall D3DKMTDestroyDCFromMemory() gdi32.D3DKMTDestroyDCFromMemory
+@ stdcall D3DKMTDestroyDCFromMemory() gdi32_vista.D3DKMTDestroyDCFromMemory
@ stub D3DKMTDestroyDevice
@ stub D3DKMTDestroyKeyedMutex
@ stub D3DKMTDestroyOutputDupl
diff --git a/dll/apisets/update.py b/dll/apisets/update.py
index c30a8bef7d1..9ff10fe2408 100644
--- a/dll/apisets/update.py
+++ b/dll/apisets/update.py
@@ -405,6 +405,7 @@ def generate_specnames(dll_dir):
yield (os.path.join(dll_dir, 'appcompat', 'apphelp',
'apphelp.spec'), 'apphelp')
yield (os.path.join(dll_dir, '..', 'win32ss', 'user',
'user32', 'user32.spec'), 'user32')
yield (os.path.join(dll_dir, '..', 'win32ss', 'gdi',
'gdi32', 'gdi32.spec'), 'gdi32')
+ yield (os.path.join(dll_dir, '..', 'win32ss', 'gdi',
'gdi32_vista', 'gdi32_vista.spec'), 'gdi32_vista')
def run(wineroot):
global NL_CHAR
diff --git a/dll/directx/wine/wined3d/CMakeLists.txt
b/dll/directx/wine/wined3d/CMakeLists.txt
index 10f144b93e6..58f15cfbc14 100644
--- a/dll/directx/wine/wined3d/CMakeLists.txt
+++ b/dll/directx/wine/wined3d/CMakeLists.txt
@@ -49,7 +49,7 @@ add_library(d3dwine MODULE
set_module_type(d3dwine win32dll)
target_link_libraries(d3dwine wine)
-add_importlibs(d3dwine user32 opengl32 gdi32 advapi32 msvcrt kernel32 ntdll)
+add_importlibs(d3dwine user32 opengl32 gdi32 gdi32_vista advapi32 msvcrt kernel32 ntdll)
add_pch(d3dwine precomp.h SOURCE)
add_cd_file(TARGET d3dwine DESTINATION reactos/system32 FOR all)
diff --git a/modules/rostests/winetests/gdi32/CMakeLists.txt
b/modules/rostests/winetests/gdi32/CMakeLists.txt
index bd8ec4419d5..3a7abed6b52 100644
--- a/modules/rostests/winetests/gdi32/CMakeLists.txt
+++ b/modules/rostests/winetests/gdi32/CMakeLists.txt
@@ -31,7 +31,7 @@ if(MSVC AND ARCH STREQUAL "amd64")
endif()
set_module_type(gdi32_winetest win32cui)
-add_importlibs(gdi32_winetest gdi32 user32 advapi32 msvcrt kernel32)
+add_importlibs(gdi32_winetest gdi32 gdi32_vista user32 advapi32 msvcrt kernel32)
if(MSVC)
add_importlibs(gdi32_winetest ntdll)
diff --git a/win32ss/CMakeLists.txt b/win32ss/CMakeLists.txt
index 727461031cd..51c8ec4c5f4 100644
--- a/win32ss/CMakeLists.txt
+++ b/win32ss/CMakeLists.txt
@@ -11,6 +11,7 @@ if(USE_DIBLIB)
endif()
add_subdirectory(gdi/gdi32)
+add_subdirectory(gdi/gdi32_vista)
add_subdirectory(printing)
add_subdirectory(reactx)
add_subdirectory(user/user32)
diff --git a/win32ss/gdi/gdi32/gdi32.spec b/win32ss/gdi/gdi32/gdi32.spec
index 53fd576d31e..0db97d36c0d 100644
--- a/win32ss/gdi/gdi32/gdi32.spec
+++ b/win32ss/gdi/gdi32/gdi32.spec
@@ -608,6 +608,3 @@
608 stdcall bMakePathNameW(wstr wstr wstr long)
609 stdcall cGetTTFFromFOT(long long long long long long long)
610 stdcall gdiPlaySpoolStream(long long long long long long)
-; FIXME: Wine DX Dlls need these
-@ stdcall D3DKMTCreateDCFromMemory(ptr)
-@ stdcall D3DKMTDestroyDCFromMemory(ptr)
diff --git a/win32ss/gdi/gdi32/objects/dc.c b/win32ss/gdi/gdi32/objects/dc.c
index 3f20b9f6392..580776819f9 100644
--- a/win32ss/gdi/gdi32/objects/dc.c
+++ b/win32ss/gdi/gdi32/objects/dc.c
@@ -1579,16 +1579,3 @@ SelectObject(
return NULL;
}
-
-/***********************************************************************
- * D3DKMTCreateDCFromMemory (GDI32.@)
- */
-DWORD WINAPI D3DKMTCreateDCFromMemory( D3DKMT_CREATEDCFROMMEMORY *desc )
-{
- return NtGdiDdDDICreateDCFromMemory( desc );
-}
-
-DWORD WINAPI D3DKMTDestroyDCFromMemory( const D3DKMT_DESTROYDCFROMMEMORY *desc )
-{
- return NtGdiDdDDIDestroyDCFromMemory( desc );
-}
diff --git a/win32ss/gdi/gdi32_vista/CMakeLists.txt
b/win32ss/gdi/gdi32_vista/CMakeLists.txt
new file mode 100644
index 00000000000..411e5b403ac
--- /dev/null
+++ b/win32ss/gdi/gdi32_vista/CMakeLists.txt
@@ -0,0 +1,26 @@
+
+include_directories(
+ include
+ ${REACTOS_SOURCE_DIR}/win32ss/include)
+
+spec2def(gdi32_vista.dll gdi32_vista.spec ADD_IMPORTLIB)
+
+list(APPEND SOURCE
+ dc.c)
+
+add_library(gdi32_vista MODULE
+ ${SOURCE}
+ gdi32_vista.rc
+ ${CMAKE_CURRENT_BINARY_DIR}/gdi32_vista.def)
+
+set_module_type(gdi32_vista
+ win32dll
+ ENTRYPOINT 0
+ UNICODE)
+
+target_link_libraries(gdi32_vista win32ksys)
+
+#add_importlibs(gdi32_vista user32 advapi32 kernel32 ntdll)
+#add_pch(gdi32_vista include/precomp.h SOURCE)
+add_dependencies(gdi32_vista psdk)
+add_cd_file(TARGET gdi32_vista DESTINATION reactos/system32 FOR all)
diff --git a/win32ss/gdi/gdi32_vista/dc.c b/win32ss/gdi/gdi32_vista/dc.c
new file mode 100644
index 00000000000..c985aa22255
--- /dev/null
+++ b/win32ss/gdi/gdi32_vista/dc.c
@@ -0,0 +1,26 @@
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+#define NTOS_MODE_USER
+#include <stdarg.h>
+#include <windef.h>
+#include <winbase.h>
+#include <ndk/rtlfuncs.h>
+#include <wingdi.h>
+#include <winddi.h>
+#include <prntfont.h>
+#include <ntgdityp.h>
+#include <ntgdi.h>
+
+/***********************************************************************
+ * D3DKMTCreateDCFromMemory (GDI32.@)
+ */
+DWORD WINAPI D3DKMTCreateDCFromMemory( D3DKMT_CREATEDCFROMMEMORY *desc )
+{
+ return NtGdiDdDDICreateDCFromMemory( desc );
+}
+
+DWORD WINAPI D3DKMTDestroyDCFromMemory( const D3DKMT_DESTROYDCFROMMEMORY *desc )
+{
+ return NtGdiDdDDIDestroyDCFromMemory( desc );
+}
diff --git a/win32ss/gdi/gdi32_vista/gdi32_vista.rc
b/win32ss/gdi/gdi32_vista/gdi32_vista.rc
new file mode 100644
index 00000000000..116013b55e2
--- /dev/null
+++ b/win32ss/gdi/gdi32_vista/gdi32_vista.rc
@@ -0,0 +1,5 @@
+#define REACTOS_VERSION_DLL
+#define REACTOS_STR_FILE_DESCRIPTION "GDI Client DLL"
+#define REACTOS_STR_INTERNAL_NAME "gdi32_vista"
+#define REACTOS_STR_ORIGINAL_FILENAME "gdi32_vista.dll"
+#include <reactos/version.rc>
diff --git a/win32ss/gdi/gdi32_vista/gdi32_vista.spec
b/win32ss/gdi/gdi32_vista/gdi32_vista.spec
new file mode 100644
index 00000000000..13ddbd8c7e5
--- /dev/null
+++ b/win32ss/gdi/gdi32_vista/gdi32_vista.spec
@@ -0,0 +1,2 @@
+@ stdcall D3DKMTCreateDCFromMemory(ptr)
+@ stdcall D3DKMTDestroyDCFromMemory(ptr)