1 // Copyright © 2015, Corey Richardson
2 // Licensed under the MIT License <LICENSE.md>
3 //! Direct3D include file
4 pub const D3D_SDK_VERSION: ::DWORD = 32;
5 pub const D3D9b_SDK_VERSION: ::DWORD = 31;
6 RIDL!(
7 interface IDirect3D9(IDirect3D9Vtbl): IUnknown(IUnknownVtbl) {
8     fn RegisterSoftwareDevice(&mut self, pInitializeFunction: *mut ::VOID) -> ::HRESULT,
9     fn GetAdapterCount(&mut self) -> ::UINT,
10     fn GetAdapterIdentifier(
11         &mut self, Adapter: ::UINT, Flags: ::DWORD, pIdentifier: *mut ::D3DADAPTER_IDENTIFIER9
12     ) -> ::HRESULT,
13     fn GetAdapterModeCount(&mut self, Adapter: ::UINT, Format: ::D3DFORMAT) -> ::UINT,
14     fn EnumAdapterModes(
15         &mut self, Adapter: ::UINT, Format: ::D3DFORMAT, Mode: ::UINT, pMode: *mut ::D3DDISPLAYMODE
16     ) -> ::HRESULT,
17     fn GetAdapterDisplayMode(
18         &mut self, Adapter: ::UINT, pMode: *mut ::D3DDISPLAYMODE
19     ) -> ::HRESULT,
20     fn CheckDeviceType(
21         &mut self, Adapter: ::UINT, DevType: ::D3DDEVTYPE, AdapterFormat: ::D3DFORMAT,
22         BackBufferFormat: ::D3DFORMAT, bWindowed: ::BOOL
23     ) -> ::HRESULT,
24     fn CheckDeviceFormat(
25         &mut self, Adapter: ::UINT, DeviceType: ::D3DDEVTYPE, AdapterFormat: ::D3DFORMAT,
26         Usage: ::DWORD, RType: ::D3DRESOURCETYPE, CheckFormat: ::D3DFORMAT
27     ) -> ::HRESULT,
28     fn CheckDeviceMultiSampleType(
29         &mut self, Adapter: ::UINT, DeviceType: ::D3DDEVTYPE, SurfaceFormat: ::D3DFORMAT,
30         Windowed: ::BOOL, MultiSampleType: ::D3DMULTISAMPLE_TYPE, pQualityLevels: *mut ::DWORD
31     ) -> ::HRESULT,
32     fn CheckDepthStencilMatch(
33         &mut self, Adapter: ::UINT, DeviceType: ::D3DDEVTYPE, AdapterFormat: ::D3DFORMAT,
34         RenderTargetFormat: ::D3DFORMAT, DepthStencilFormat: ::D3DFORMAT
35     ) -> ::HRESULT,
36     fn CheckDeviceFormatConversion(
37         &mut self, Adapter: ::UINT, DeviceType: ::D3DDEVTYPE, SourceFormat: ::D3DFORMAT,
38         TargetFormat: ::D3DFORMAT
39     ) -> ::HRESULT,
40     fn GetDeviceCaps(
41         &mut self, Adapter: ::UINT, DeviceType: ::D3DDEVTYPE, pCaps: *mut ::D3DCAPS9
42     ) -> ::HRESULT,
43     fn GetAdapterMonitor(&mut self, Adapter: ::UINT) -> ::HMONITOR,
44     fn CreateDevice(
45         &mut self, Adapter: ::UINT, DeviceType: ::D3DDEVTYPE, hFocusWindow: ::HWND,
46         BehaviorFlags: ::DWORD, pPresentationParameters: *mut ::D3DPRESENT_PARAMETERS,
47         ppReturnedDeviceInterface: *mut *mut IDirect3DDevice9
48     ) -> ::HRESULT
49 }
50 );
51 pub type LPDIRECT3D9 = *mut IDirect3D9;
52 pub type PDIRECT3D9 = *mut IDirect3D9;
53 RIDL!(
54 interface IDirect3DDevice9(IDirect3DDevice9Vtbl): IUnknown(IUnknownVtbl) {
55     fn TestCooperativeLevel(&mut self) -> ::HRESULT,
56     fn GetAvailableTextureMem(&mut self) -> ::UINT,
57     fn EvictManagedResources(&mut self) -> ::HRESULT,
58     fn GetDirect3D(&mut self, ppD3D9: *mut *mut IDirect3D9) -> ::HRESULT,
59     fn GetDeviceCaps(&mut self, pCaps: *mut ::D3DCAPS9) -> ::HRESULT,
60     fn GetDisplayMode(&mut self, iSwapChain: ::UINT, pMode: *mut ::D3DDISPLAYMODE) -> ::HRESULT,
61     fn GetCreationParameters(
62         &mut self, pParameters: *mut ::D3DDEVICE_CREATION_PARAMETERS
63     ) -> ::HRESULT,
64     fn SetCursorProperties(
65         &mut self, XHotSpot: ::UINT, YHotSpot: ::UINT, pCursorBitmap: *mut IDirect3DSurface9
66     ) -> ::HRESULT,
67     fn SetCursorPosition(&mut self, X: ::INT, Y: ::INT, Flags: ::DWORD) -> (),
68     fn ShowCursor(&mut self, bShow: ::BOOL) -> ::BOOL,
69     fn CreateAdditionalSwapChain(
70         &mut self, pPresentationParameters: *mut ::D3DPRESENT_PARAMETERS,
71         pSwapChain: *mut *mut IDirect3DSwapChain9
72     ) -> ::HRESULT,
73     fn GetSwapChain(
74         &mut self, iSwapChain: ::UINT, pSwapChain: *mut *mut IDirect3DSwapChain9
75     ) -> ::HRESULT,
76     fn GetNumberOfSwapChains(&mut self) -> ::UINT,
77     fn Reset(&mut self, pPresentationParameters: *mut ::D3DPRESENT_PARAMETERS) -> ::HRESULT,
78     fn Present(
79         &mut self, pSourceRect: *const ::RECT, pDestRect: *const ::RECT,
80         hDestWindowOverride: ::HWND, pDirtyRegion: *const ::RGNDATA
81     ) -> ::HRESULT,
82     fn GetBackBuffer(
83         &mut self, iSwapChain: ::UINT, iBackBuffer: ::UINT, Type: ::D3DBACKBUFFER_TYPE,
84         ppBackBuffer: *mut *mut IDirect3DSurface9
85     ) -> ::HRESULT,
86     fn GetRasterStatus(
87         &mut self, iSwapChain: ::UINT, pRasterStatus: *mut ::D3DRASTER_STATUS
88     ) -> ::HRESULT,
89     fn SetDialogBoxMode(&mut self, bEnableDialogs: ::BOOL) -> ::HRESULT,
90     fn SetGammaRamp(
91         &mut self, iSwapChain: ::UINT, Flags: ::DWORD, pRamp: *const ::D3DGAMMARAMP
92     ) -> (),
93     fn GetGammaRamp(&mut self, iSwapChain: ::UINT, pRamp: *mut ::D3DGAMMARAMP) -> (),
94     fn CreateTexture(
95         &mut self, Width: ::UINT, Height: ::UINT, Levels: ::UINT, Usage: ::DWORD,
96         Format: ::D3DFORMAT, Pool: ::D3DPOOL, ppTexture: *mut *mut IDirect3DTexture9,
97         pSharedHandle: *mut ::HANDLE
98     ) -> ::HRESULT,
99     fn CreateVolumeTexture(
100         &mut self, Width: ::UINT, Height: ::UINT, Depth: ::UINT, Levels: ::UINT, Usage: ::DWORD,
101         Format: ::D3DFORMAT, Pool: ::D3DPOOL, ppVolumeTexture: *mut *mut IDirect3DVolumeTexture9,
102         pSharedHandle: *mut ::HANDLE
103     ) -> ::HRESULT,
104     fn CreateCubeTexture(
105         &mut self, EdgeLength: ::UINT, Levels: ::UINT, Usage: ::DWORD, Format: ::D3DFORMAT,
106         Pool: ::D3DPOOL, ppCubeTexture: *mut *mut IDirect3DCubeTexture9,
107         pSharedHandle: *mut ::HANDLE
108     ) -> ::HRESULT,
109     fn CreateVertexBuffer(
110         &mut self, Length: ::UINT, Usage: ::DWORD, FVF: ::DWORD, Pool: ::D3DPOOL,
111         ppVertexBuffer: *mut *mut IDirect3DVertexBuffer9, pSharedHandle: *mut ::HANDLE
112     ) -> ::HRESULT,
113     fn CreateIndexBuffer(
114         &mut self, Length: ::UINT, Usage: ::DWORD, Format: ::D3DFORMAT, Pool: ::D3DPOOL,
115         ppIndexBuffer: *mut *mut IDirect3DIndexBuffer9, pSharedHandle: *mut ::HANDLE
116     ) -> ::HRESULT,
117     fn CreateRenderTarget(
118         &mut self, Width: ::UINT, Height: ::UINT, Format: ::D3DFORMAT,
119         MultiSample: ::D3DMULTISAMPLE_TYPE, MultisampleQuality: ::DWORD, Lockable: ::BOOL,
120         ppSurface: *mut *mut IDirect3DSurface9, pSharedHandle: *mut ::HANDLE
121     ) -> ::HRESULT,
122     fn CreateDepthStencilSurface(
123         &mut self, Width: ::UINT, Height: ::UINT, Format: ::D3DFORMAT,
124         MultiSample: ::D3DMULTISAMPLE_TYPE, MultisampleQuality: ::DWORD, Discard: ::BOOL,
125         ppSurface: *mut *mut IDirect3DSurface9, pSharedHandle: *mut ::HANDLE
126     ) -> ::HRESULT,
127     fn UpdateSurface(
128         &mut self, pSourceSurface: *mut IDirect3DSurface9, pSourceRect: *const ::RECT,
129         pDestinationSurface: *mut IDirect3DSurface9, pDestPoint: *const ::POINT
130     ) -> ::HRESULT,
131     fn UpdateTexture(
132         &mut self, pSourceTexture: *mut IDirect3DBaseTexture9,
133         pDestinationTexture: *mut IDirect3DBaseTexture9
134     ) -> ::HRESULT,
135     fn GetRenderTargetData(
136         &mut self, pRenderTarget: *mut IDirect3DSurface9, pDestSurface: *mut IDirect3DSurface9
137     ) -> ::HRESULT,
138     fn GetFrontBufferData(
139         &mut self, iSwapChain: ::UINT, pDestSurface: *mut IDirect3DSurface9
140     ) -> ::HRESULT,
141     fn StretchRect(
142         &mut self, pSourceSurface: *mut IDirect3DSurface9, pSourceRect: *const ::RECT,
143         pDestSurface: *mut IDirect3DSurface9, pDestRect: *const ::RECT,
144         Filter: ::D3DTEXTUREFILTERTYPE
145     ) -> ::HRESULT,
146     fn ColorFill(
147         &mut self, pSurface: *mut IDirect3DSurface9, pRect: *const ::RECT, color: ::D3DCOLOR
148     ) -> ::HRESULT,
149     fn CreateOffscreenPlainSurface(
150         &mut self, Width: ::UINT, Height: ::UINT, Format: ::D3DFORMAT, Pool: ::D3DPOOL,
151         ppSurface: *mut *mut IDirect3DSurface9, pSharedHandle: *mut ::HANDLE
152     ) -> ::HRESULT,
153     fn SetRenderTarget(
154         &mut self, RenderTargetIndex: ::DWORD, pRenderTarget: *mut IDirect3DSurface9
155     ) -> ::HRESULT,
156     fn GetRenderTarget(
157         &mut self, RenderTargetIndex: ::DWORD, ppRenderTarget: *mut *mut IDirect3DSurface9
158     ) -> ::HRESULT,
159     fn SetDepthStencilSurface(&mut self, pNewZStencil: *mut IDirect3DSurface9) -> ::HRESULT,
160     fn GetDepthStencilSurface(
161         &mut self, ppZStencilSurface: *mut *mut IDirect3DSurface9
162     ) -> ::HRESULT,
163     fn BeginScene(&mut self) -> ::HRESULT,
164     fn EndScene(&mut self) -> ::HRESULT,
165     fn Clear(
166         &mut self, Count: ::DWORD, pRects: *const ::D3DRECT, Flags: ::DWORD, Color: ::D3DCOLOR,
167         Z: ::FLOAT, Stencil: ::DWORD
168     ) -> ::HRESULT,
169     fn SetTransform(
170         &mut self, State: ::D3DTRANSFORMSTATETYPE, pMatrix: *const ::D3DMATRIX
171     ) -> ::HRESULT,
172     fn GetTransform(
173         &mut self, State: ::D3DTRANSFORMSTATETYPE, pMatrix: *mut ::D3DMATRIX
174     ) -> ::HRESULT,
175     fn MultiplyTransform(
176         &mut self, arg1: ::D3DTRANSFORMSTATETYPE, arg2: *const ::D3DMATRIX
177     ) -> ::HRESULT,
178     fn SetViewport(&mut self, pViewport: *const ::D3DVIEWPORT9) -> ::HRESULT,
179     fn GetViewport(&mut self, pViewport: *mut ::D3DVIEWPORT9) -> ::HRESULT,
180     fn SetMaterial(&mut self, pMaterial: *const ::D3DMATERIAL9) -> ::HRESULT,
181     fn GetMaterial(&mut self, pMaterial: *mut ::D3DMATERIAL9) -> ::HRESULT,
182     fn SetLight(&mut self, Index: ::DWORD, arg1: *const ::D3DLIGHT9) -> ::HRESULT,
183     fn GetLight(&mut self, Index: ::DWORD, arg1: *mut ::D3DLIGHT9) -> ::HRESULT,
184     fn LightEnable(&mut self, Index: ::DWORD, Enable: ::BOOL) -> ::HRESULT,
185     fn GetLightEnable(&mut self, Index: ::DWORD, pEnable: *mut ::BOOL) -> ::HRESULT,
186     fn SetClipPlane(&mut self, Index: ::DWORD, pPlane: *const ::FLOAT) -> ::HRESULT,
187     fn GetClipPlane(&mut self, Index: ::DWORD, pPlane: *mut ::FLOAT) -> ::HRESULT,
188     fn SetRenderState(&mut self, State: ::D3DRENDERSTATETYPE, Value: ::DWORD) -> ::HRESULT,
189     fn GetRenderState(&mut self, State: ::D3DRENDERSTATETYPE, pValue: *mut ::DWORD) -> ::HRESULT,
190     fn CreateStateBlock(
191         &mut self, Type: ::D3DSTATEBLOCKTYPE, ppSB: *mut *mut IDirect3DStateBlock9
192     ) -> ::HRESULT,
193     fn BeginStateBlock(&mut self) -> ::HRESULT,
194     fn EndStateBlock(&mut self, ppSB: *mut *mut IDirect3DStateBlock9) -> ::HRESULT,
195     fn SetClipStatus(&mut self, pClipStatus: *const ::D3DCLIPSTATUS9) -> ::HRESULT,
196     fn GetClipStatus(&mut self, pClipStatus: *mut ::D3DCLIPSTATUS9) -> ::HRESULT,
197     fn GetTexture(
198         &mut self, Stage: ::DWORD, ppTexture: *mut *mut IDirect3DBaseTexture9
199     ) -> ::HRESULT,
200     fn SetTexture(&mut self, Stage: ::DWORD, pTexture: *mut IDirect3DBaseTexture9) -> ::HRESULT,
201     fn GetTextureStageState(
202         &mut self, Stage: ::DWORD, Type: ::D3DTEXTURESTAGESTATETYPE, pValue: *mut ::DWORD
203     ) -> ::HRESULT,
204     fn SetTextureStageState(
205         &mut self, Stage: ::DWORD, Type: ::D3DTEXTURESTAGESTATETYPE, Value: ::DWORD
206     ) -> ::HRESULT,
207     fn GetSamplerState(
208         &mut self, Sampler: ::DWORD, Type: ::D3DSAMPLERSTATETYPE, pValue: *mut ::DWORD
209     ) -> ::HRESULT,
210     fn SetSamplerState(
211         &mut self, Sampler: ::DWORD, Type: ::D3DSAMPLERSTATETYPE, Value: ::DWORD
212     ) -> ::HRESULT,
213     fn ValidateDevice(&mut self, pNumPasses: *mut ::DWORD) -> ::HRESULT,
214     fn SetPaletteEntries(
215         &mut self, PaletteNumber: ::UINT, pEntries: *const ::PALETTEENTRY
216     ) -> ::HRESULT,
217     fn GetPaletteEntries(
218         &mut self, PaletteNumber: ::UINT, pEntries: *mut ::PALETTEENTRY
219     ) -> ::HRESULT,
220     fn SetCurrentTexturePalette(&mut self, PaletteNumber: ::UINT) -> ::HRESULT,
221     fn GetCurrentTexturePalette(&mut self, PaletteNumber: *mut ::UINT) -> ::HRESULT,
222     fn SetScissorRect(&mut self, pRect: *const ::RECT) -> ::HRESULT,
223     fn GetScissorRect(&mut self, pRect: *mut ::RECT) -> ::HRESULT,
224     fn SetSoftwareVertexProcessing(&mut self, bSoftware: ::BOOL) -> ::HRESULT,
225     fn GetSoftwareVertexProcessing(&mut self) -> ::BOOL,
226     fn SetNPatchMode(&mut self, nSegments: ::FLOAT) -> ::HRESULT,
227     fn GetNPatchMode(&mut self) -> ::FLOAT,
228     fn DrawPrimitive(
229         &mut self, PrimitiveType: ::D3DPRIMITIVETYPE, StartVertex: ::UINT, PrimitiveCount: ::UINT
230     ) -> ::HRESULT,
231     fn DrawIndexedPrimitive(
232         &mut self, arg1: ::D3DPRIMITIVETYPE, BaseVertexIndex: ::INT, MinVertexIndex: ::UINT,
233         NumVertices: ::UINT, startIndex: ::UINT, primCount: ::UINT
234     ) -> ::HRESULT,
235     fn DrawPrimitiveUP(
236         &mut self, PrimitiveType: ::D3DPRIMITIVETYPE, PrimitiveCount: ::UINT,
237         pVertexStreamZeroData: *const ::VOID, VertexStreamZeroStride: ::UINT
238     ) -> ::HRESULT,
239     fn DrawIndexedPrimitiveUP(
240         &mut self, PrimitiveType: ::D3DPRIMITIVETYPE, MinVertexIndex: ::UINT, NumVertices: ::UINT,
241         PrimitiveCount: ::UINT, pIndexData: *const ::VOID, IndexDataFormat: ::D3DFORMAT,
242         pVertexStreamZeroData: *const ::VOID, VertexStreamZeroStride: ::UINT
243     ) -> ::HRESULT,
244     fn ProcessVertices(
245         &mut self, SrcStartIndex: ::UINT, DestIndex: ::UINT, VertexCount: ::UINT,
246         pDestBuffer: *mut IDirect3DVertexBuffer9, pVertexDecl: *mut IDirect3DVertexDeclaration9,
247         Flags: ::DWORD
248     ) -> ::HRESULT,
249     fn CreateVertexDeclaration(
250         &mut self, pVertexElements: *const ::D3DVERTEXELEMENT9,
251         ppDecl: *mut *mut IDirect3DVertexDeclaration9
252     ) -> ::HRESULT,
253     fn SetVertexDeclaration(&mut self, pDecl: *mut IDirect3DVertexDeclaration9) -> ::HRESULT,
254     fn GetVertexDeclaration(&mut self, ppDecl: *mut *mut IDirect3DVertexDeclaration9) -> ::HRESULT,
255     fn SetFVF(&mut self, FVF: ::DWORD) -> ::HRESULT,
256     fn GetFVF(&mut self, pFVF: *mut ::DWORD) -> ::HRESULT,
257     fn CreateVertexShader(
258         &mut self, pFunction: *const ::DWORD, ppShader: *mut *mut IDirect3DVertexShader9
259     ) -> ::HRESULT,
260     fn SetVertexShader(&mut self, pShader: *mut IDirect3DVertexShader9) -> ::HRESULT,
261     fn GetVertexShader(&mut self, ppShader: *mut *mut IDirect3DVertexShader9) -> ::HRESULT,
262     fn SetVertexShaderConstantF(
263         &mut self, StartRegister: ::UINT, pConstantData: *const ::FLOAT, Vector4fCount: ::UINT
264     ) -> ::HRESULT,
265     fn GetVertexShaderConstantF(
266         &mut self, StartRegister: ::UINT, pConstantData: *mut ::FLOAT, Vector4fCount: ::UINT
267     ) -> ::HRESULT,
268     fn SetVertexShaderConstantI(
269         &mut self, StartRegister: ::UINT, pConstantData: *const ::INT, Vector4iCount: ::UINT
270     ) -> ::HRESULT,
271     fn GetVertexShaderConstantI(
272         &mut self, StartRegister: ::UINT, pConstantData: *mut ::INT, Vector4iCount: ::UINT
273     ) -> ::HRESULT,
274     fn SetVertexShaderConstantB(
275         &mut self, StartRegister: ::UINT, pConstantData: *const ::BOOL, BoolCount: ::UINT
276     ) -> ::HRESULT,
277     fn GetVertexShaderConstantB(
278         &mut self, StartRegister: ::UINT, pConstantData: *mut ::BOOL, BoolCount: ::UINT
279     ) -> ::HRESULT,
280     fn SetStreamSource(
281         &mut self, StreamNumber: ::UINT, pStreamData: *mut IDirect3DVertexBuffer9,
282         OffsetInBytes: ::UINT, Stride: ::UINT
283     ) -> ::HRESULT,
284     fn GetStreamSource(
285         &mut self, StreamNumber: ::UINT, ppStreamData: *mut *mut IDirect3DVertexBuffer9,
286         pOffsetInBytes: *mut ::UINT, pStride: *mut ::UINT
287     ) -> ::HRESULT,
288     fn SetStreamSourceFreq(&mut self, StreamNumber: ::UINT, Setting: ::UINT) -> ::HRESULT,
289     fn GetStreamSourceFreq(&mut self, StreamNumber: ::UINT, pSetting: *mut ::UINT) -> ::HRESULT,
290     fn SetIndices(&mut self, pIndexData: *mut IDirect3DIndexBuffer9) -> ::HRESULT,
291     fn GetIndices(&mut self, ppIndexData: *mut *mut IDirect3DIndexBuffer9) -> ::HRESULT,
292     fn CreatePixelShader(
293         &mut self, pFunction: *const ::DWORD, ppShader: *mut *mut IDirect3DPixelShader9
294     ) -> ::HRESULT,
295     fn SetPixelShader(&mut self, pShader: *mut IDirect3DPixelShader9) -> ::HRESULT,
296     fn GetPixelShader(&mut self, ppShader: *mut *mut IDirect3DPixelShader9) -> ::HRESULT,
297     fn SetPixelShaderConstantF(
298         &mut self, StartRegister: ::UINT, pConstantData: *const ::FLOAT, Vector4fCount: ::UINT
299     ) -> ::HRESULT,
300     fn GetPixelShaderConstantF(
301         &mut self, StartRegister: ::UINT, pConstantData: *mut ::FLOAT, Vector4fCount: ::UINT
302     ) -> ::HRESULT,
303     fn SetPixelShaderConstantI(
304         &mut self, StartRegister: ::UINT, pConstantData: *const ::INT, Vector4iCount: ::UINT
305     ) -> ::HRESULT,
306     fn GetPixelShaderConstantI(
307         &mut self, StartRegister: ::UINT, pConstantData: *mut ::INT, Vector4iCount: ::UINT
308     ) -> ::HRESULT,
309     fn SetPixelShaderConstantB(
310         &mut self, StartRegister: ::UINT, pConstantData: *const ::BOOL, BoolCount: ::UINT
311     ) -> ::HRESULT,
312     fn GetPixelShaderConstantB(
313         &mut self, StartRegister: ::UINT, pConstantData: *mut ::BOOL, BoolCount: ::UINT
314     ) -> ::HRESULT,
315     fn DrawRectPatch(
316         &mut self, Handle: ::UINT, pNumSegs: *const ::FLOAT,
317         pRectPatchInfo: *const ::D3DRECTPATCH_INFO
318     ) -> ::HRESULT,
319     fn DrawTriPatch(
320         &mut self, Handle: ::UINT, pNumSegs: *const ::FLOAT,
321         pTriPatchInfo: *const ::D3DTRIPATCH_INFO
322     ) -> ::HRESULT,
323     fn DeletePatch(&mut self, Handle: ::UINT) -> ::HRESULT,
324     fn CreateQuery(
325         &mut self, Type: ::D3DQUERYTYPE, ppQuery: *mut *mut IDirect3DQuery9
326     ) -> ::HRESULT
327 }
328 );
329 pub type LPDIRECT3DDEVICE9 = *mut IDirect3DDevice9;
330 pub type PDIRECT3DDEVICE9 = *mut IDirect3DDevice9;
331 RIDL!(
332 interface IDirect3DStateBlock9(IDirect3DStateBlock9Vtbl): IUnknown(IUnknownVtbl) {
333     fn GetDevice(&mut self, ppDevice: *mut *mut IDirect3DDevice9) -> ::HRESULT,
334     fn Capture(&mut self) -> ::HRESULT,
335     fn Apply(&mut self) -> ::HRESULT
336 }
337 );
338 pub type LPDIRECT3DSTATEBLOCK9 = *mut IDirect3DStateBlock9;
339 pub type PDIRECT3DSTATEBLOCK9 = *mut IDirect3DStateBlock9;
340 RIDL!(
341 interface IDirect3DSwapChain9(IDirect3DSwapChain9Vtbl): IUnknown(IUnknownVtbl) {
342     fn Present(
343         &mut self, pSourceRect: *const ::RECT, pDestRect: *const ::RECT,
344         hDestWindowOverride: ::HWND, pDirtyRegion: *const ::RGNDATA, dwFlags: ::DWORD
345     ) -> ::HRESULT,
346     fn GetFrontBufferData(&mut self, pDestSurface: *mut IDirect3DSurface9) -> ::HRESULT,
347     fn GetBackBuffer(
348         &mut self, iBackBuffer: ::UINT, Type: ::D3DBACKBUFFER_TYPE,
349         ppBackBuffer: *mut *mut IDirect3DSurface9
350     ) -> ::HRESULT,
351     fn GetRasterStatus(&mut self, pRasterStatus: *mut ::D3DRASTER_STATUS) -> ::HRESULT,
352     fn GetDisplayMode(&mut self, pMode: *mut ::D3DDISPLAYMODE) -> ::HRESULT,
353     fn GetDevice(&mut self, ppDevice: *mut *mut IDirect3DDevice9) -> ::HRESULT,
354     fn GetPresentParameters(
355         &mut self, pPresentationParameters: *mut ::D3DPRESENT_PARAMETERS
356     ) -> ::HRESULT
357 }
358 );
359 pub type LPDIRECT3DSWAPCHAIN9 = *mut IDirect3DSwapChain9;
360 pub type PDIRECT3DSWAPCHAIN9 = *mut IDirect3DSwapChain9;
361 RIDL!(
362 interface IDirect3DResource9(IDirect3DResource9Vtbl): IUnknown(IUnknownVtbl) {
363     fn GetDevice(&mut self, ppDevice: *mut *mut IDirect3DDevice9) -> ::HRESULT,
364     fn SetPrivateData(
365         &mut self, refguid: *const ::GUID, pData: *const ::VOID, SizeOfData: ::DWORD,
366         Flags: ::DWORD
367     ) -> ::HRESULT,
368     fn GetPrivateData(
369         &mut self, refguid: *const ::GUID, pData: *mut ::VOID, pSizeOfData: *mut ::DWORD
370     ) -> ::HRESULT,
371     fn FreePrivateData(&mut self, refguid: *const ::GUID) -> ::HRESULT,
372     fn SetPriority(&mut self, PriorityNew: ::DWORD) -> ::DWORD,
373     fn GetPriority(&mut self) -> ::DWORD,
374     fn PreLoad(&mut self) -> (),
375     fn GetType(&mut self) -> ::D3DRESOURCETYPE
376 }
377 );
378 pub type LPDIRECT3DRESOURCE9 = *mut IDirect3DResource9;
379 pub type PDIRECT3DRESOURCE9 = *mut IDirect3DResource9;
380 RIDL!(
381 interface IDirect3DVertexDeclaration9(IDirect3DVertexDeclaration9Vtbl): IUnknown(IUnknownVtbl) {
382     fn GetDevice(&mut self, ppDevice: *mut *mut IDirect3DDevice9) -> ::HRESULT,
383     fn GetDeclaration(
384         &mut self, pElement: *mut ::D3DVERTEXELEMENT9, pNumElements: *mut ::UINT
385     ) -> ::HRESULT
386 }
387 );
388 pub type LPDIRECT3DVERTEXDECLARATION9 = *mut IDirect3DVertexDeclaration9;
389 pub type PDIRECT3DVERTEXDECLARATION9 = *mut IDirect3DVertexDeclaration9;
390 RIDL!(
391 interface IDirect3DVertexShader9(IDirect3DVertexShader9Vtbl): IUnknown(IUnknownVtbl) {
392     fn GetDevice(&mut self, ppDevice: *mut *mut IDirect3DDevice9) -> ::HRESULT,
393     fn GetFunction(&mut self, arg1: *mut ::VOID, pSizeOfData: *mut ::UINT) -> ::HRESULT
394 }
395 );
396 pub type LPDIRECT3DVERTEXSHADER9 = *mut IDirect3DVertexShader9;
397 pub type PDIRECT3DVERTEXSHADER9 = *mut IDirect3DVertexShader9;
398 RIDL!(
399 interface IDirect3DPixelShader9(IDirect3DPixelShader9Vtbl): IUnknown(IUnknownVtbl) {
400     fn GetDevice(&mut self, ppDevice: *mut *mut IDirect3DDevice9) -> ::HRESULT,
401     fn GetFunction(&mut self, arg1: *mut ::VOID, pSizeOfData: *mut ::UINT) -> ::HRESULT
402 }
403 );
404 pub type LPDIRECT3DPIXELSHADER9 = *mut IDirect3DPixelShader9;
405 pub type PDIRECT3DPIXELSHADER9 = *mut IDirect3DPixelShader9;
406 RIDL!(
407 interface IDirect3DBaseTexture9(IDirect3DBaseTexture9Vtbl): IDirect3DResource9(IDirect3DResource9Vtbl) {
408     fn SetLOD(&mut self, LODNew: ::DWORD) -> ::DWORD,
409     fn GetLOD(&mut self) -> ::DWORD,
410     fn GetLevelCount(&mut self) -> ::DWORD,
411     fn SetAutoGenFilterType(&mut self, FilterType: ::D3DTEXTUREFILTERTYPE) -> ::HRESULT,
412     fn GetAutoGenFilterType(&mut self) -> ::D3DTEXTUREFILTERTYPE,
413     fn GenerateMipSubLevels(&mut self) -> ()
414 }
415 );
416 pub type LPDIRECT3DBASETEXTURE9 = *mut IDirect3DBaseTexture9;
417 pub type PDIRECT3DBASETEXTURE9 = *mut IDirect3DBaseTexture9;
418 RIDL!(
419 interface IDirect3DTexture9(IDirect3DTexture9Vtbl): IDirect3DBaseTexture9(IDirect3DBaseTexture9Vtbl) {
420     fn GetLevelDesc(&mut self, Level: ::UINT, pDesc: *mut ::D3DSURFACE_DESC) -> ::HRESULT,
421     fn GetSurfaceLevel(
422         &mut self, Level: ::UINT, ppSurfaceLevel: *mut *mut IDirect3DSurface9
423     ) -> ::HRESULT,
424     fn LockRect(
425         &mut self, Level: ::UINT, pLockedRect: *mut ::D3DLOCKED_RECT, pRect: *const ::RECT,
426         Flags: ::DWORD
427     ) -> ::HRESULT,
428     fn UnlockRect(&mut self, Level: ::UINT) -> ::HRESULT,
429     fn AddDirtyRect(&mut self, pDirtyRect: *const ::RECT) -> ::HRESULT
430 }
431 );
432 pub type LPDIRECT3DTEXTURE9 = *mut IDirect3DTexture9;
433 pub type PDIRECT3DTEXTURE9 = *mut IDirect3DTexture9;
434 RIDL!(
435 interface IDirect3DVolumeTexture9(IDirect3DVolumeTexture9Vtbl): IDirect3DBaseTexture9(IDirect3DBaseTexture9Vtbl) {
436     fn GetLevelDesc(&mut self, Level: ::UINT, pDesc: *mut ::D3DVOLUME_DESC) -> ::HRESULT,
437     fn GetVolumeLevel(
438         &mut self, Level: ::UINT, ppVolumeLevel: *mut *mut IDirect3DVolume9
439     ) -> ::HRESULT,
440     fn LockBox(
441         &mut self, Level: ::UINT, pLockedVolume: *mut ::D3DLOCKED_BOX, pBox: *const ::D3DBOX,
442         Flags: ::DWORD
443     ) -> ::HRESULT,
444     fn UnlockBox(&mut self, Level: ::UINT) -> ::HRESULT,
445     fn AddDirtyBox(&mut self, pDirtyBox: *const ::D3DBOX) -> ::HRESULT
446 }
447 );
448 pub type LPDIRECT3DVOLUMETEXTURE9 = *mut IDirect3DVolumeTexture9;
449 pub type PDIRECT3DVOLUMETEXTURE9 = *mut IDirect3DVolumeTexture9;
450 RIDL!(
451 interface IDirect3DCubeTexture9(IDirect3DCubeTexture9Vtbl): IDirect3DBaseTexture9(IDirect3DBaseTexture9Vtbl) {
452     fn GetLevelDesc(&mut self, Level: ::UINT, pDesc: *mut ::D3DSURFACE_DESC) -> ::HRESULT,
453     fn GetCubeMapSurface(
454         &mut self, FaceType: ::D3DCUBEMAP_FACES, Level: ::UINT,
455         ppCubeMapSurface: *mut *mut IDirect3DSurface9
456     ) -> ::HRESULT,
457     fn LockRect(
458         &mut self, FaceType: ::D3DCUBEMAP_FACES, Level: ::UINT, pLockedRect: *mut ::D3DLOCKED_RECT,
459         pRect: *const ::RECT, Flags: ::DWORD
460     ) -> ::HRESULT,
461     fn UnlockRect(&mut self, FaceType: ::D3DCUBEMAP_FACES, Level: ::UINT) -> ::HRESULT,
462     fn AddDirtyRect(
463         &mut self, FaceType: ::D3DCUBEMAP_FACES, pDirtyRect: *const ::RECT
464     ) -> ::HRESULT
465 }
466 );
467 pub type LPDIRECT3DCUBETEXTURE9 = *mut IDirect3DCubeTexture9;
468 pub type PDIRECT3DCUBETEXTURE9 = *mut IDirect3DCubeTexture9;
469 RIDL!(
470 interface IDirect3DVertexBuffer9(IDirect3DVertexBuffer9Vtbl): IDirect3DResource9(IDirect3DResource9Vtbl) {
471     fn Lock(
472         &mut self, OffsetToLock: ::UINT, SizeToLock: ::UINT, ppbData: *mut *mut ::VOID,
473         Flags: ::DWORD
474     ) -> ::HRESULT,
475     fn Unlock(&mut self) -> ::HRESULT,
476     fn GetDesc(&mut self, pDesc: *mut ::D3DVERTEXBUFFER_DESC) -> ::HRESULT
477 }
478 );
479 pub type LPDIRECT3DVERTEXBUFFER9 = *mut IDirect3DVertexBuffer9;
480 pub type PDIRECT3DVERTEXBUFFER9 = *mut IDirect3DVertexBuffer9;
481 RIDL!(
482 interface IDirect3DIndexBuffer9(IDirect3DIndexBuffer9Vtbl): IDirect3DResource9(IDirect3DResource9Vtbl) {
483     fn Lock(
484         &mut self, OffsetToLock: ::UINT, SizeToLock: ::UINT, ppbData: *mut *mut ::VOID,
485         Flags: ::DWORD
486     ) -> ::HRESULT,
487     fn Unlock(&mut self) -> ::HRESULT,
488     fn GetDesc(&mut self, pDesc: *mut ::D3DINDEXBUFFER_DESC) -> ::HRESULT
489 }
490 );
491 pub type LPDIRECT3DINDEXBUFFER9 = *mut IDirect3DIndexBuffer9;
492 pub type PDIRECT3DINDEXBUFFER9 = *mut IDirect3DIndexBuffer9;
493 RIDL!(
494 interface IDirect3DSurface9(IDirect3DSurface9Vtbl): IDirect3DResource9(IDirect3DResource9Vtbl) {
495     fn GetContainer(&mut self, riid: *const ::IID, ppContainer: *mut *mut ::VOID) -> ::HRESULT,
496     fn GetDesc(&mut self, pDesc: *mut ::D3DSURFACE_DESC) -> ::HRESULT,
497     fn LockRect(
498         &mut self, pLockedRect: *mut ::D3DLOCKED_RECT, pRect: *const ::RECT, Flags: ::DWORD
499     ) -> ::HRESULT,
500     fn UnlockRect(&mut self) -> ::HRESULT,
501     fn GetDC(&mut self, phdc: *mut ::HDC) -> ::HRESULT,
502     fn ReleaseDC(&mut self, hdc: ::HDC) -> ::HRESULT
503 }
504 );
505 pub type LPDIRECT3DSURFACE9 = *mut IDirect3DSurface9;
506 pub type PDIRECT3DSURFACE9 = *mut IDirect3DSurface9;
507 RIDL!(
508 interface IDirect3DVolume9(IDirect3DVolume9Vtbl): IUnknown(IUnknownVtbl) {
509     fn GetDevice(&mut self, ppDevice: *mut *mut IDirect3DDevice9) -> ::HRESULT,
510     fn SetPrivateData(
511         &mut self, refguid: *const ::GUID, pData: *const ::VOID, SizeOfData: ::DWORD,
512         Flags: ::DWORD
513     ) -> ::HRESULT,
514     fn GetPrivateData(
515         &mut self, refguid: *const ::GUID, pData: *mut ::VOID, pSizeOfData: *mut ::DWORD
516     ) -> ::HRESULT,
517     fn FreePrivateData(&mut self, refguid: *const ::GUID) -> ::HRESULT,
518     fn GetContainer(&mut self, riid: *const ::IID, ppContainer: *mut *mut ::VOID) -> ::HRESULT,
519     fn GetDesc(&mut self, pDesc: *mut ::D3DVOLUME_DESC) -> ::HRESULT,
520     fn LockBox(
521         &mut self, pLockedVolume: *mut ::D3DLOCKED_BOX, pBox: *const ::D3DBOX, Flags: ::DWORD
522     ) -> ::HRESULT,
523     fn UnlockBox(&mut self) -> ::HRESULT
524 }
525 );
526 pub type LPDIRECT3DVOLUME9 = *mut IDirect3DVolume9;
527 pub type PDIRECT3DVOLUME9 = *mut IDirect3DVolume9;
528 RIDL!(
529 interface IDirect3DQuery9(IDirect3DQuery9Vtbl): IUnknown(IUnknownVtbl) {
530     fn GetDevice(&mut self, ppDevice: *mut *mut IDirect3DDevice9) -> ::HRESULT,
531     fn GetType(&mut self) -> ::D3DRESOURCETYPE,
532     fn GetDataSize(&mut self) -> ::DWORD,
533     fn Issue(&mut self, dwIssueFlags: ::DWORD) -> ::HRESULT,
534     fn GetData(
535         &mut self, pData: *mut ::VOID, dwSize: ::DWORD, dwGetDataFlags: ::DWORD
536     ) -> ::HRESULT
537 }
538 );
539 pub type LPDIRECT3DQUERY9 = *mut IDirect3DQuery9;
540 pub type PDIRECT3DQUERY9 = *mut IDirect3DQuery9;
541 pub const D3DCREATE_FPU_PRESERVE: ::DWORD = 0x2;
542 pub const D3DCREATE_MULTITHREADED: ::DWORD = 0x4;
543 pub const D3DCREATE_PUREDEVICE: ::DWORD = 0x10;
544 pub const D3DCREATE_SOFTWARE_VERTEXPROCESSING: ::DWORD = 0x20;
545 pub const D3DCREATE_HARDWARE_VERTEXPROCESSING: ::DWORD = 0x40;
546 pub const D3DCREATE_MIXED_VERTEXPROCESSING: ::DWORD = 0x80;
547 pub const D3DCREATE_DISABLE_DRIVER_MANAGEMENT: ::DWORD = 0x100;
548 pub const D3DCREATE_ADAPTERGROUP_DEVICE: ::DWORD = 0x200;
549 pub const D3DCREATE_DISABLE_DRIVER_MANAGEMENT_EX: ::DWORD = 0x400;
550 pub const D3DCREATE_NOWINDOWCHANGES: ::DWORD = 0x800;
551 pub const D3DCREATE_DISABLE_PSGP_THREADING: ::DWORD = 0x2000;
552 pub const D3DCREATE_ENABLE_PRESENTSTATS: ::DWORD = 0x4000;
553 pub const D3DCREATE_DISABLE_PRESENTSTATS: ::DWORD = 0x8000;
554 pub const D3DCREATE_SCREENSAVER: ::DWORD = 0x10000000;
555 pub const D3DADAPTER_DEFAULT: ::DWORD = 0;
556 RIDL!(
557 interface IDirect3D9Ex(IDirect3D9ExVtbl): IDirect3D9(IDirect3D9Vtbl) {
558     fn GetAdapterModeCountEx(
559         &mut self, Adapter: ::UINT, pFilter: *const ::D3DDISPLAYMODEFILTER
560     ) -> ::UINT,
561     fn EnumAdapterModesEx(
562         &mut self, Adapter: ::UINT, pFilter: *const ::D3DDISPLAYMODEFILTER, Mode: ::UINT,
563         pMode: *mut ::D3DDISPLAYMODEEX
564     ) -> ::HRESULT,
565     fn GetAdapterDisplayModeEx(
566         &mut self, Adapter: ::UINT, pMode: *mut ::D3DDISPLAYMODEEX,
567         pRotation: *mut ::D3DDISPLAYROTATION
568     ) -> ::HRESULT,
569     fn CreateDeviceEx(
570         &mut self, Adapter: ::UINT, DeviceType: ::D3DDEVTYPE, hFocusWindow: ::HWND,
571         BehaviorFlags: ::DWORD, pPresentationParameters: *mut ::D3DPRESENT_PARAMETERS,
572         pFullscreenDisplayMode: *mut ::D3DDISPLAYMODEEX,
573         ppReturnedDeviceInterface: *mut *mut IDirect3DDevice9Ex
574     ) -> ::HRESULT,
575     fn GetAdapterLUID(&mut self, Adapter: ::UINT, pLUID: *mut ::LUID) -> ::HRESULT
576 }
577 );
578 pub type LPDIRECT3D9EX = *mut IDirect3D9Ex;
579 pub type PDIRECT3D9EX = *mut IDirect3D9Ex;
580 RIDL!(
581 interface IDirect3DDevice9Ex(IDirect3DDevice9ExVtbl): IDirect3DDevice9(IDirect3DDevice9Vtbl) {
582     fn SetConvolutionMonoKernel(
583         &mut self, width: ::UINT, height: ::UINT, rows: *mut ::FLOAT, columns: *mut ::FLOAT
584     ) -> ::HRESULT,
585     fn ComposeRects(
586         &mut self, pSrc: *mut IDirect3DSurface9, pDst: *mut IDirect3DSurface9,
587         pSrcRectDescs: *mut IDirect3DVertexBuffer9, NumRects: ::UINT,
588         pDstRectDescs: *mut IDirect3DVertexBuffer9, Operation: ::D3DCOMPOSERECTSOP, Xoffset: ::INT,
589         Yoffset: ::INT
590     ) -> ::HRESULT,
591     fn PresentEx(
592         &mut self, pSourceRect: *const ::RECT, pDestRect: *const ::RECT,
593         hDestWindowOverride: ::HWND, pDirtyRegion: *const ::RGNDATA, dwFlags: ::DWORD
594     ) -> ::HRESULT,
595     fn GetGPUThreadPriority(&mut self, pPriority: *mut ::INT) -> ::HRESULT,
596     fn SetGPUThreadPriority(&mut self, Priority: ::INT) -> ::HRESULT,
597     fn WaitForVBlank(&mut self, iSwapChain: ::UINT) -> ::HRESULT,
598     fn CheckResourceResidency(
599         &mut self, pResourceArray: *mut *mut IDirect3DResource9, NumResources: ::UINT32
600     ) -> ::HRESULT,
601     fn SetMaximumFrameLatency(&mut self, MaxLatency: ::UINT) -> ::HRESULT,
602     fn GetMaximumFrameLatency(&mut self, pMaxLatency: *mut ::UINT) -> ::HRESULT,
603     fn CheckDeviceState(&mut self, hDestinationWindow: ::HWND) -> ::HRESULT,
604     fn CreateRenderTargetEx(
605         &mut self, Width: ::UINT, Height: ::UINT, Format: ::D3DFORMAT,
606         MultiSample: ::D3DMULTISAMPLE_TYPE, MultisampleQuality: ::DWORD, Lockable: ::BOOL,
607         ppSurface: *mut *mut IDirect3DSurface9, pSharedHandle: *mut ::HANDLE, Usage: ::DWORD
608     ) -> ::HRESULT,
609     fn CreateOffscreenPlainSurfaceEx(
610         &mut self, Width: ::UINT, Height: ::UINT, Format: ::D3DFORMAT, Pool: ::D3DPOOL,
611         ppSurface: *mut *mut IDirect3DSurface9, pSharedHandle: *mut ::HANDLE, Usage: ::DWORD
612     ) -> ::HRESULT,
613     fn CreateDepthStencilSurfaceEx(
614         &mut self, Width: ::UINT, Height: ::UINT, Format: ::D3DFORMAT,
615         MultiSample: ::D3DMULTISAMPLE_TYPE, MultisampleQuality: ::DWORD, Discard: ::BOOL,
616         ppSurface: *mut *mut IDirect3DSurface9, pSharedHandle: *mut ::HANDLE, Usage: ::DWORD
617     ) -> ::HRESULT,
618     fn ResetEx(
619         &mut self, pPresentationParameters: *mut ::D3DPRESENT_PARAMETERS,
620         pFullscreenDisplayMode: *mut ::D3DDISPLAYMODEEX
621     ) -> ::HRESULT,
622     fn GetDisplayModeEx(
623         &mut self, iSwapChain: ::UINT, pMode: *mut ::D3DDISPLAYMODEEX,
624         pRotation: *mut ::D3DDISPLAYROTATION
625     ) -> ::HRESULT
626 }
627 );
628 pub type LPDIRECT3DDEVICE9EX = *mut IDirect3DDevice9Ex;
629 pub type PDIRECT3DDEVICE9EX = *mut IDirect3DDevice9Ex;
630 RIDL!(
631 interface IDirect3DSwapChain9Ex(IDirect3DSwapChain9ExVtbl): IDirect3DSwapChain9(IDirect3DSwapChain9Vtbl) {
632     fn GetLastPresentCount(&mut self, pLastPresentCount: *mut ::UINT) -> ::HRESULT,
633     fn GetPresentStats(&mut self, pPresentationStatistics: *mut ::D3DPRESENTSTATS) -> ::HRESULT,
634     fn GetDisplayModeEx(
635         &mut self, pMode: *mut ::D3DDISPLAYMODEEX, pRotation: *mut ::D3DDISPLAYROTATION
636     ) -> ::HRESULT
637 }
638 );
639 pub type LPDIRECT3DSWAPCHAIN9EX = *mut IDirect3DSwapChain9Ex;
640 pub type PDIRECT3DSWAPCHAIN9EX = *mut IDirect3DSwapChain9Ex;
641 RIDL!(
642 interface IDirect3D9ExOverlayExtension(IDirect3D9ExOverlayExtensionVtbl): IUnknown(IUnknownVtbl) {
643     fn CheckDeviceOverlayType(
644         &mut self, Adapter: ::UINT, DevType: ::D3DDEVTYPE, OverlayWidth: ::UINT,
645         OverlayHeight: ::UINT, OverlayFormat: ::D3DFORMAT, pDisplayMode: *mut ::D3DDISPLAYMODEEX,
646         DisplayRotation: ::D3DDISPLAYROTATION, pOverlayCaps: *mut ::D3DOVERLAYCAPS
647     ) -> ::HRESULT
648 }
649 );
650 pub type LPDIRECT3D9EXOVERLAYEXTENSION = *mut IDirect3D9ExOverlayExtension;
651 pub type PDIRECT3D9EXOVERLAYEXTENSION = *mut IDirect3D9ExOverlayExtension;
652 RIDL!(
653 interface IDirect3DDevice9Video(IDirect3DDevice9VideoVtbl): IUnknown(IUnknownVtbl) {
654     fn GetContentProtectionCaps(
655         &mut self, pCryptoType: *const ::GUID, pDecodeProfile: *const ::GUID,
656         pCaps: *mut ::D3DCONTENTPROTECTIONCAPS
657     ) -> ::HRESULT,
658     fn CreateAuthenticatedChannel(
659         &mut self, ChannelType: ::D3DAUTHENTICATEDCHANNELTYPE,
660         ppAuthenticatedChannel: *mut *mut IDirect3DAuthenticatedChannel9,
661         pChannelHandle: *mut ::HANDLE
662     ) -> ::HRESULT,
663     fn CreateCryptoSession(
664         &mut self, pCryptoType: *const ::GUID, pDecodeProfile: *const ::GUID,
665         ppCryptoSession: *mut *mut IDirect3DCryptoSession9, pCryptoHandle: *mut ::HANDLE
666     ) -> ::HRESULT
667 }
668 );
669 pub type LPDIRECT3DDEVICE9VIDEO = *mut IDirect3DDevice9Video;
670 pub type PDIRECT3DDEVICE9VIDEO = *mut IDirect3DDevice9Video;
671 RIDL!(
672 interface IDirect3DAuthenticatedChannel9(IDirect3DAuthenticatedChannel9Vtbl): IUnknown(IUnknownVtbl) {
673     fn GetCertificateSize(&mut self, pCertificateSize: *mut ::UINT) -> ::HRESULT,
674     fn GetCertificate(&mut self, CertifacteSize: ::UINT, ppCertificate: *mut ::BYTE) -> ::HRESULT,
675     fn NegotiateKeyExchange(&mut self, DataSize: ::UINT, pData: *mut ::VOID) -> ::HRESULT,
676     fn Query(
677         &mut self, InputSize: ::UINT, pInput: *const ::VOID, OutputSize: ::UINT,
678         pOutput: *mut ::VOID
679     ) -> ::HRESULT,
680     fn Configure(
681         &mut self, InputSize: ::UINT, pInput: *const ::VOID,
682         pOutput: *mut ::D3DAUTHENTICATEDCHANNEL_CONFIGURE_OUTPUT
683     ) -> ::HRESULT
684 }
685 );
686 pub type LPDIRECT3DAUTHENTICATEDCHANNEL9 = *mut IDirect3DAuthenticatedChannel9;
687 pub type PDIRECT3DAUTHENTICATEDCHANNEL9 = *mut IDirect3DAuthenticatedChannel9;
688 RIDL!(
689 interface IDirect3DCryptoSession9(IDirect3DCryptoSession9Vtbl): IUnknown(IUnknownVtbl) {
690     fn GetCertificateSize(&mut self, pCertificateSize: *mut ::UINT) -> ::HRESULT,
691     fn GetCertificate(&mut self, CertifacteSize: ::UINT, ppCertificate: *mut ::BYTE) -> ::HRESULT,
692     fn NegotiateKeyExchange(&mut self, DataSize: ::UINT, pData: *mut ::VOID) -> ::HRESULT,
693     fn EncryptionBlt(
694         &mut self, pSrcSurface: *mut IDirect3DSurface9, pDstSurface: *mut IDirect3DSurface9,
695         DstSurfaceSize: ::UINT, pIV: *mut ::VOID
696     ) -> ::HRESULT,
697     fn DecryptionBlt(
698         &mut self, pSrcSurface: *mut IDirect3DSurface9, pDstSurface: *mut IDirect3DSurface9,
699         SrcSurfaceSize: ::UINT, pEncryptedBlockInfo: *mut ::D3DENCRYPTED_BLOCK_INFO,
700         pContentKey: *mut ::VOID, pIV: *mut ::VOID
701     ) -> ::HRESULT,
702     fn GetSurfacePitch(
703         &mut self, pSrcSurface: *mut IDirect3DSurface9, pSurfacePitch: *mut ::UINT
704     ) -> ::HRESULT,
705     fn StartSessionKeyRefresh(
706         &mut self, pRandomNumber: *mut ::VOID, RandomNumberSize: ::UINT
707     ) -> ::HRESULT,
708     fn FinishSessionKeyRefresh(&mut self) -> ::HRESULT,
709     fn GetEncryptionBltKey(&mut self, pReadbackKey: *mut ::VOID, KeySize: ::UINT) -> ::HRESULT
710 }
711 );
712 pub type LPDIRECT3DCRYPTOSESSION9 = *mut IDirect3DCryptoSession9;
713 pub type PDIRECT3DCRYPTOSESSION9 = *mut IDirect3DCryptoSession9;
714