v3: fix some issues with the declaration of the parameter and add prototype to d3dkmthk.h
While you're at it, could you also do the same for D3DKMTOpenAdapterFromHdc() and D3DKMTEscape()?
If this one is ok, I`ll send updates for those later.
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=46571 Signed-off-by: Louis Lenders xerox.xerox2000x@gmail.com --- .../api-ms-win-dx-d3dkmt-l1-1-0.spec | 2 +- dlls/gdi32/driver.c | 13 +++++++++++++ dlls/gdi32/gdi32.spec | 1 + include/d3dukmdt.h | 2 ++ include/ddk/d3dkmthk.h | 6 ++++++ 5 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/dlls/api-ms-win-dx-d3dkmt-l1-1-0/api-ms-win-dx-d3dkmt-l1-1-0.spec b/dlls/api-ms-win-dx-d3dkmt-l1-1-0/api-ms-win-dx-d3dkmt-l1-1-0.spec index 405afb986f..e8aa38edf4 100644 --- a/dlls/api-ms-win-dx-d3dkmt-l1-1-0/api-ms-win-dx-d3dkmt-l1-1-0.spec +++ b/dlls/api-ms-win-dx-d3dkmt-l1-1-0/api-ms-win-dx-d3dkmt-l1-1-0.spec @@ -6,7 +6,7 @@ @ stub D3DKMTCheckOcclusion @ stub D3DKMTCheckSharedResourceAccess @ stub D3DKMTCheckVidPnExclusiveOwnership -@ stub D3DKMTCloseAdapter +@ stdcall D3DKMTCloseAdapter(ptr) gdi32.D3DKMTCloseAdapter @ stub D3DKMTConfigureSharedResource @ stub D3DKMTCreateAllocation @ stub D3DKMTCreateAllocation2 diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c index 8920b73f59..fd25f7d713 100644 --- a/dlls/gdi32/driver.c +++ b/dlls/gdi32/driver.c @@ -26,12 +26,16 @@ #include <stdarg.h> #include <string.h> #include <stdio.h> +#include "ntstatus.h" +#define WIN32_NO_STATUS #include "windef.h" #include "winbase.h" +#include "wingdi.h" #include "ddrawgdi.h" #include "wine/winbase16.h" #include "winuser.h" #include "winternl.h" +#include "ddk/d3dkmthk.h"
#include "gdi_private.h" #include "wine/unicode.h" @@ -1253,3 +1257,12 @@ NTSTATUS WINAPI D3DKMTEscape( const void *pData ) FIXME("(%p): stub\n", pData); return STATUS_NO_MEMORY; } + +/****************************************************************************** + * D3DKMTCloseAdapter [GDI32.@] + */ +NTSTATUS WINAPI D3DKMTCloseAdapter( const D3DKMT_CLOSEADAPTER *data ) +{ + FIXME("(%p): stub\n", data); + return STATUS_SUCCESS; +} diff --git a/dlls/gdi32/gdi32.spec b/dlls/gdi32/gdi32.spec index 2dc8f0e887..6e8f0285f4 100644 --- a/dlls/gdi32/gdi32.spec +++ b/dlls/gdi32/gdi32.spec @@ -80,6 +80,7 @@ @ stdcall CreateScalableFontResourceA(long str str str) @ stdcall CreateScalableFontResourceW(long wstr wstr wstr) @ stdcall CreateSolidBrush(long) +@ stdcall D3DKMTCloseAdapter(ptr) @ stdcall D3DKMTCreateDCFromMemory(ptr) @ stdcall D3DKMTDestroyDCFromMemory(ptr) @ stdcall D3DKMTEscape(ptr) diff --git a/include/d3dukmdt.h b/include/d3dukmdt.h index a7be710ef1..ce2b0c2488 100644 --- a/include/d3dukmdt.h +++ b/include/d3dukmdt.h @@ -25,6 +25,8 @@ ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24)) #endif /* MAKEFOURCC */
+typedef UINT D3DKMT_HANDLE; + typedef enum _D3DDDIFORMAT { D3DDDIFMT_UNKNOWN = 0, diff --git a/include/ddk/d3dkmthk.h b/include/ddk/d3dkmthk.h index 80c0c8a27e..bfa77da7d4 100644 --- a/include/ddk/d3dkmthk.h +++ b/include/ddk/d3dkmthk.h @@ -34,6 +34,11 @@ typedef struct _D3DKMT_CREATEDCFROMMEMORY HANDLE hBitmap; } D3DKMT_CREATEDCFROMMEMORY;
+typedef struct _D3DKMT_CLOSEADAPTER +{ + D3DKMT_HANDLE hAdapter; +} D3DKMT_CLOSEADAPTER; + typedef struct _D3DKMT_DESTROYDCFROMMEMORY { HDC hDc; @@ -45,6 +50,7 @@ extern "C" { #endif /* __cplusplus */
+NTSTATUS WINAPI D3DKMTCloseAdapter(const D3DKMT_CLOSEADAPTER *data); NTSTATUS WINAPI D3DKMTCreateDCFromMemory(D3DKMT_CREATEDCFROMMEMORY *desc); NTSTATUS WINAPI D3DKMTDestroyDCFromMemory(const D3DKMT_DESTROYDCFROMMEMORY *desc);