From: Biswapriyo Nath Subject: [PATCH] include/d3d9: add missing interfaces Message-Id: Date: Tue, 24 Mar 2020 20:36:47 +0530 From 2b3900af7158d840542dab8e83808627be2dc005 Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Tue, 24 Mar 2020 15:43:52 +0530 Subject: [PATCH] include/d3d9: add missing interfaces Signed-off-by: Biswapriyo Nath --- include/d3d9.h | 183 ++++++++++++++++++++++++++++++++++++++++++++ include/d3d9types.h | 33 +++++++- 2 files changed, 215 insertions(+), 1 deletion(-) diff --git a/include/d3d9.h b/include/d3d9.h index 3ebde45..84597ea 100644 --- a/include/d3d9.h +++ b/include/d3d9.h @@ -2201,6 +2201,189 @@ DECLARE_INTERFACE_(IDirect3DDevice9Ex, IDirect3DDevice9) #define IDirect3DDevice9Ex_GetDisplayModeEx(p,a,b,c) (p)->GetDisplayModeEx(a,b,c) #endif +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IDirect3D9ExOverlayExtension, 0x187aeb13, 0xaaf5, 0x4c59, 0x87, 0x6d, 0xe0, 0x59, 0x8, 0x8c, 0xd, 0xf8); +#endif +DEFINE_GUID(IID_IDirect3D9ExOverlayExtension, 0x187aeb13, 0xaaf5, 0x4c59, 0x87, 0x6d, 0xe0, 0x59, 0x8, 0x8c, 0xd, 0xf8); + +#define INTERFACE IDirect3D9ExOverlayExtension +DECLARE_INTERFACE_(IDirect3D9ExOverlayExtension, IUnknown) +{ + /* IUnknown */ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /* IDirect3D9ExOverlayExtension */ + STDMETHOD(CheckDeviceOverlayType)(THIS_ UINT Adapter, D3DDEVTYPE DevType, UINT OverlayWidth, + UINT OverlayHeight, D3DFORMAT OverlayFormat, D3DDISPLAYMODEEX *pDisplayMode, + D3DDISPLAYROTATION DisplayRotation, D3DOVERLAYCAPS *pOverlayCaps) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/* IUnknown */ +#define IDirect3D9ExOverlayExtension_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3D9ExOverlayExtension_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3D9ExOverlayExtension_Release(p) (p)->lpVtbl->Release(p) +/* IDirect3D9ExOverlayExtension */ +#define IDirect3D9ExOverlayExtension_CheckDeviceOverlayType(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->CheckDeviceOverlayType(p,a,b,c,d,e,f,g,h) +#else +/* IUnknown */ +#define IDirect3D9ExOverlayExtension_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3D9ExOverlayExtension_AddRef(p) (p)->AddRef() +#define IDirect3D9ExOverlayExtension_Release(p) (p)->Release() +/* IDirect3D9ExOverlayExtension */ +#define IDirect3D9ExOverlayExtension_CheckDeviceOverlayType(p,a,b,c,d,e,f,g,h) (p)->CheckDeviceOverlayType(a,b,c,d,e,f,g,h) +#endif + +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IDirect3DAuthenticatedChannel9, 0xff24beee, 0xda21, 0x4beb, 0x98, 0xb5, 0xd2, 0xf8, 0x99, 0xf9, 0x8a, 0xf9); +#endif +DEFINE_GUID(IID_IDirect3DAuthenticatedChannel9, 0xff24beee, 0xda21, 0x4beb, 0x98, 0xb5, 0xd2, 0xf8, 0x99, 0xf9, 0x8a, 0xf9); + +#define INTERFACE IDirect3DAuthenticatedChannel9 +DECLARE_INTERFACE_(IDirect3DAuthenticatedChannel9, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /* IDirect3DAuthenticatedChannel9 */ + STDMETHOD(GetCertificateSize)(THIS_ UINT *pCertificateSize) PURE; + STDMETHOD(GetCertificate)(THIS_ UINT CertifacteSize, BYTE *ppCertificate) PURE; + STDMETHOD(NegotiateKeyExchange)(THIS_ UINT DataSize, void *pData) PURE; + STDMETHOD(Query)(THIS_ UINT InputSize, const void *pInput, UINT OutputSize, void *pOutput) PURE; + STDMETHOD(Configure)(THIS_ UINT InputSize, const void *pInput, + D3DAUTHENTICATEDCHANNEL_CONFIGURE_OUTPUT *pOutput) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/* IUnknown */ +#define IDirect3DAuthenticatedChannel9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DAuthenticatedChannel9_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DAuthenticatedChannel9_Release(p) (p)->lpVtbl->Release(p) +/* IDirect3DAuthenticatedChannel9 */ +#define IDirect3DAuthenticatedChannel9_GetCertificateSize(p,a) (p)->lpVtbl->GetCertificateSize(p,a) +#define IDirect3DAuthenticatedChannel9_GetCertificate(p,a,b) (p)->lpVtbl->GetCertificate(p,a,b) +#define IDirect3DAuthenticatedChannel9_NegotiateKeyExchange(p,a,b) (p)->lpVtbl->NegotiateKeyExchange(p,a,b) +#define IDirect3DAuthenticatedChannel9_Query(p,a,b,c,d) (p)->lpVtbl->Query(p,a,b,c,d) +#define IDirect3DAuthenticatedChannel9_Configure(p,a,b,c) (p)->lpVtbl->Configure(p,a,b,c) +#else +/* IUnknown */ +#define IDirect3DAuthenticatedChannel9_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DAuthenticatedChannel9_AddRef(p) (p)->AddRef() +#define IDirect3DAuthenticatedChannel9_Release(p) (p)->Release() +/* IDirect3DAuthenticatedChannel9 */ +#define IDirect3DAuthenticatedChannel9_GetCertificateSize(p,a) (p)->GetCertificateSize(a) +#define IDirect3DAuthenticatedChannel9_GetCertificate(p,a,b) (p)->GetCertificate(a,b) +#define IDirect3DAuthenticatedChannel9_NegotiateKeyExchange(p,a,b) (p)->NegotiateKeyExchange(a,b) +#define IDirect3DAuthenticatedChannel9_Query(p,a,b,c,d) (p)->Query(a,b,c,d) +#define IDirect3DAuthenticatedChannel9_Configure(p,a,b,c) (p)->Configure(a,b,c) +#endif + +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IDirect3DCryptoSession9, 0xfa0ab799, 0x7a9c, 0x48ca, 0x8c, 0x5b, 0x23, 0x7e, 0x71, 0xa5, 0x44, 0x34); +#endif +DEFINE_GUID(IID_IDirect3DCryptoSession9, 0xfa0ab799, 0x7a9c, 0x48ca, 0x8c, 0x5b, 0x23, 0x7e, 0x71, 0xa5, 0x44, 0x34); + +#define INTERFACE IDirect3DCryptoSession9 +DECLARE_INTERFACE_(IDirect3DCryptoSession9, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /* IDirect3DCryptoSession9 */ + STDMETHOD(GetCertificateSize)(THIS_ UINT *pCertificateSize) PURE; + STDMETHOD(GetCertificate)(THIS_ UINT CertifacteSize, BYTE *ppCertificate) PURE; + STDMETHOD(NegotiateKeyExchange)(THIS_ UINT DataSize, void *pData) PURE; + STDMETHOD(EncryptionBlt)(THIS_ IDirect3DSurface9 *pSrcSurface, IDirect3DSurface9 *pDstSurface, + UINT DstSurfaceSize, void *pIV) PURE; + STDMETHOD(DecryptionBlt)(THIS_ IDirect3DSurface9 *pSrcSurface, IDirect3DSurface9 *pDstSurface, + UINT SrcSurfaceSize, D3DENCRYPTED_BLOCK_INFO *pEncryptedBlockInfo, void *pContentKey, void *pIV) PURE; + STDMETHOD(GetSurfacePitch)(THIS_ IDirect3DSurface9 *pSrcSurface, UINT *pSurfacePitch) PURE; + STDMETHOD(StartSessionKeyRefresh)(THIS_ void *pRandomNumber, UINT RandomNumberSize) PURE; + STDMETHOD(FinishSessionKeyRefresh)(THIS) PURE; + STDMETHOD(GetEncryptionBltKey)(THIS_ void *pReadbackKey, UINT KeySize) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/* IUnknown */ +#define IDirect3DCryptoSession9_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DCryptoSession9_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DCryptoSession9_Release(p) (p)->lpVtbl->Release(p) +/* IDirect3DCryptoSession9 */ +#define IDirect3DCryptoSession9_GetCertificateSize(p,a) (p)->lpVtbl->GetCertificateSize(p,a) +#define IDirect3DCryptoSession9_GetCertificate(p,a,b) (p)->lpVtbl->GetCertificate(p,a,b) +#define IDirect3DCryptoSession9_NegotiateKeyExchange(p,a,b) (p)->lpVtbl->NegotiateKeyExchange(p,a,b) +#define IDirect3DCryptoSession9_EncryptionBlt(p,a,b,c,d) (p)->lpVtbl->EncryptionBlt(p,a,b,c,d) +#define IDirect3DCryptoSession9_DecryptionBlt(p,a,b,c,d,e,f) (p)->lpVtbl->DecryptionBlt(p,a,b,c,d,e,f) +#define IDirect3DCryptoSession9_GetSurfacePitch(p,a,b) (p)->lpVtbl->GetSurfacePitch(p,a,b) +#define IDirect3DCryptoSession9_StartSessionKeyRefresh(p,a,b) (p)->lpVtbl->StartSessionKeyRefresh(p,a,b) +#define IDirect3DCryptoSession9_FinishSessionKeyRefresh(p) (p)->lpVtbl->FinishSessionKeyRefresh(p) +#define IDirect3DCryptoSession9_GetEncryptionBltKey(p,a,b) (p)->lpVtbl->GetEncryptionBltKey(p,a,b) +#else +/* IUnknown */ +#define IDirect3DCryptoSession9_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DCryptoSession9_AddRef(p) (p)->AddRef() +#define IDirect3DCryptoSession9_Release(p) (p)->Release() +/* IDirect3DCryptoSession9 */ +#define IDirect3DCryptoSession9_GetCertificateSize(p,a) (p)->GetCertificateSize(a) +#define IDirect3DCryptoSession9_GetCertificate(p,a,b) (p)->GetCertificate(a,b) +#define IDirect3DCryptoSession9_NegotiateKeyExchange(p,a,b) (p)->NegotiateKeyExchange(a,b) +#define IDirect3DCryptoSession9_EncryptionBlt(p,a,b,c,d) (p)->EncryptionBlt(a,b,c,d) +#define IDirect3DCryptoSession9_DecryptionBlt(p,a,b,c,d,e,f) (p)->DecryptionBlt(a,b,c,d,e,f) +#define IDirect3DCryptoSession9_GetSurfacePitch(p,a,b) (p)->GetSurfacePitch(a,b) +#define IDirect3DCryptoSession9_StartSessionKeyRefresh(p,a,b) (p)->StartSessionKeyRefresh(a,b) +#define IDirect3DCryptoSession9_FinishSessionKeyRefresh(p) (p)->FinishSessionKeyRefresh() +#define IDirect3DCryptoSession9_GetEncryptionBltKey(p,a,b) (p)->GetEncryptionBltKey(a,b) +#endif + +#ifdef __CRT_UUID_DECL +__CRT_UUID_DECL(IDirect3DDevice9Video, 0x26dc4561, 0xa1ee, 0x4ae7, 0x96, 0xda, 0x11, 0x8a, 0x36, 0xc0, 0xec, 0x95); +#endif +DEFINE_GUID(IID_IDirect3DDevice9Video, 0x26dc4561, 0xa1ee, 0x4ae7, 0x96, 0xda, 0x11, 0x8a, 0x36, 0xc0, 0xec, 0x95); + +#define INTERFACE IDirect3DDevice9Video +DECLARE_INTERFACE_(IDirect3DDevice9Video, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /* IDirect3DDevice9Video */ + STDMETHOD(GetContentProtectionCaps)(THIS_ const GUID *pCryptoType, const GUID *pDecodeProfile, + D3DCONTENTPROTECTIONCAPS *pCaps) PURE; + STDMETHOD(CreateAuthenticatedChannel)(THIS_ D3DAUTHENTICATEDCHANNELTYPE ChannelType, + IDirect3DAuthenticatedChannel9 **ppAuthenticatedChannel, HANDLE *pChannelHandle) PURE; + STDMETHOD(CreateCryptoSession)(THIS_ const GUID *pCryptoType, const GUID *pDecodeProfile, + IDirect3DCryptoSession9 **ppCryptoSession, HANDLE *pCryptoHandle) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/* IUnknown */ +#define IDirect3DDevice9Video_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DDevice9Video_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DDevice9Video_Release(p) (p)->lpVtbl->Release(p) +/* IDirect3DDevice9Video */ +#define IDirect3DDevice9Video_GetContentProtectionCaps(p,a,b,c) (p)->lpVtbl->GetContentProtectionCaps(p,a,b,c) +#define IDirect3DDevice9Video_CreateAuthenticatedChannel(p,a,b,c) (p)->lpVtbl->CreateAuthenticatedChannel(p,a,b,c) +#define IDirect3DDevice9Video_CreateCryptoSession(p,a,b,c,d) (p)->lpVtbl->CreateCryptoSession(p,a,b,c,d) +#else +/* IUnknown */ +#define IDirect3DDevice9Video_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DDevice9Video_AddRef(p) (p)->AddRef() +#define IDirect3DDevice9Video_Release(p) (p)->Release() +/* IDirect3DDevice9Video */ +#define IDirect3DDevice9Video_GetContentProtectionCaps(p,a,b,c) (p)->GetContentProtectionCaps(a,b,c) +#define IDirect3DDevice9Video_CreateAuthenticatedChannel(p,a,b,c) (p)->CreateAuthenticatedChannel(a,b,c) +#define IDirect3DDevice9Video_CreateCryptoSession(p,a,b,c,d) (p)->CreateCryptoSession(a,b,c,d) +#endif + #endif /* !defined(D3D_DISABLE_9EX) */ #ifdef __cplusplus diff --git a/include/d3d9types.h b/include/d3d9types.h index 56394df..58de4d7 100644 --- a/include/d3d9types.h +++ b/include/d3d9types.h @@ -1560,6 +1560,30 @@ typedef struct _D3DVOLUME_DESC { /* Parts added with d3d9ex */ #if !defined(D3D_DISABLE_9EX) + +#define D3D_OMAC_SIZE 16 + +typedef struct _D3D_OMAC +{ + BYTE Omac[D3D_OMAC_SIZE]; +} D3D_OMAC; + +typedef enum _D3DAUTHENTICATEDCHANNELTYPE +{ + D3DAUTHENTICATEDCHANNEL_D3D9 = 1, + D3DAUTHENTICATEDCHANNEL_DRIVER_SOFTWARE, + D3DAUTHENTICATEDCHANNEL_DRIVER_HARDWARE, +} D3DAUTHENTICATEDCHANNELTYPE; + +typedef struct _D3DAUTHENTICATEDCHANNEL_CONFIGURE_OUTPUT +{ + D3D_OMAC omac; + GUID ConfigureType; + HANDLE hChannel; + UINT SequenceNumber; + HRESULT ReturnCode; +} D3DAUTHENTICATEDCHANNEL_CONFIGURE_OUTPUT; + typedef enum D3DSCANLINEORDERING { D3DSCANLINEORDERING_UNKNOWN, @@ -1593,6 +1617,13 @@ typedef enum D3DDISPLAYROTATION D3DDISPLAYROTATION_270 } D3DDISPLAYROTATION; +typedef struct _D3DENCRYPTED_BLOCK_INFO +{ + UINT NumEncryptedBytesAtBeginning; + UINT NumBytesInSkipPattern; + UINT NumBytesInEncryptPattern; +} D3DENCRYPTED_BLOCK_INFO; + typedef struct _D3DMEMORYPRESSURE { UINT64 BytesEvictedFromProcess; @@ -1617,7 +1648,7 @@ typedef struct _D3DPRESENTSTATS LARGE_INTEGER SyncGPUTime; } D3DPRESENTSTATS; -#endif /* D3D_DISABLE_9EX */ +#endif /* !defined(D3D_DISABLE_9EX) */ typedef enum _D3DSHADER_COMPARISON { -- 2.26.0