[PATCH v2] gdi32: add D3DKMTCloseAdapter stub

Huw Davies huw at codeweavers.com
Tue Mar 12 05:07:16 CDT 2019


On Fri, Mar 08, 2019 at 07:50:46AM -0500, Louis Lenders wrote:
> 
> v2: change return value to STATUS_SUCCESS
> 
> 
> Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=46571
> 
> 
> 
> Signed-off-by: Louis Lenders <xerox.xerox2000x at gmail.com>
> ---
>  .../api-ms-win-dx-d3dkmt-l1-1-0.spec                  |  2 +-
>  dlls/gdi32/driver.c                                   | 11 +++++++++++
>  dlls/gdi32/gdi32.spec                                 |  1 +
>  3 files changed, 13 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..78a16dd150 100644
> --- a/dlls/gdi32/driver.c
> +++ b/dlls/gdi32/driver.c
> @@ -26,6 +26,8 @@
>  #include <stdarg.h>
>  #include <string.h>
>  #include <stdio.h>
> +#include "ntstatus.h"
> +#define WIN32_NO_STATUS
>  #include "windef.h"
>  #include "winbase.h"
>  #include "ddrawgdi.h"
> @@ -1253,3 +1255,12 @@ NTSTATUS WINAPI D3DKMTEscape( const void *pData )
>      FIXME("(%p): stub\n", pData);
>      return STATUS_NO_MEMORY;
>  }
> +
> +/******************************************************************************
> + *		D3DKMTCloseAdapter [GDI32.@]
> + */
> +NTSTATUS WINAPI D3DKMTCloseAdapter( const void *pData )
> +{
> +    FIXME("(%p): stub\n", pData);
> +    return STATUS_SUCCESS;
> +}

The parameter should be const D3DKMT_CLOSEADAPTER * and let's call it
data not pData.  You should add both the function prototype and the
declaration of structure to include/ddk/d3dkmthk.h .

While you're at it, could you also do the same for
D3DKMTOpenAdapterFromHdc() and D3DKMTEscape()?

Thanks,
Huw.



More information about the wine-devel mailing list