d3drm: Implement IDirect3DRMMesh_SetVertices.
[wine] / dlls / d3drm / device.c
1 /*
2  * Implementation of IDirect3DRMDevice Interface
3  *
4  * Copyright 2011, 2012 AndrĂ© Hentschel
5  *
6  * This file contains the (internal) driver registration functions,
7  * driver enumeration APIs and DirectDraw creation functions.
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22  */
23
24 #include "wine/debug.h"
25
26 #define COBJMACROS
27
28 #include "winbase.h"
29 #include "wingdi.h"
30
31 #include "d3drm_private.h"
32 #include "initguid.h"
33 #include "d3drmwin.h"
34
35 WINE_DEFAULT_DEBUG_CHANNEL(d3drm);
36
37 typedef struct {
38     IDirect3DRMDevice2 IDirect3DRMDevice2_iface;
39     IDirect3DRMDevice3 IDirect3DRMDevice3_iface;
40     IDirect3DRMWinDevice IDirect3DRMWinDevice_iface;
41     LONG ref;
42 } IDirect3DRMDeviceImpl;
43
44 static inline IDirect3DRMDeviceImpl *impl_from_IDirect3DRMDevice2(IDirect3DRMDevice2 *iface)
45 {
46     return CONTAINING_RECORD(iface, IDirect3DRMDeviceImpl, IDirect3DRMDevice2_iface);
47 }
48
49 static inline IDirect3DRMDeviceImpl *impl_from_IDirect3DRMDevice3(IDirect3DRMDevice3 *iface)
50 {
51     return CONTAINING_RECORD(iface, IDirect3DRMDeviceImpl, IDirect3DRMDevice3_iface);
52 }
53
54 static inline IDirect3DRMDeviceImpl *impl_from_IDirect3DRMWinDevice(IDirect3DRMWinDevice *iface)
55 {
56     return CONTAINING_RECORD(iface, IDirect3DRMDeviceImpl, IDirect3DRMWinDevice_iface);
57 }
58
59 /*** IUnknown methods ***/
60 static HRESULT WINAPI IDirect3DRMDevice2Impl_QueryInterface(IDirect3DRMDevice2* iface,
61                                                             REFIID riid, void** object)
62 {
63     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
64
65     TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_guid(riid), object);
66
67     *object = NULL;
68
69     if (IsEqualGUID(riid, &IID_IUnknown) ||
70         IsEqualGUID(riid, &IID_IDirect3DRMDevice) ||
71         IsEqualGUID(riid, &IID_IDirect3DRMDevice2))
72     {
73         *object = &This->IDirect3DRMDevice2_iface;
74     }
75     else if(IsEqualGUID(riid, &IID_IDirect3DRMDevice3))
76     {
77         *object = &This->IDirect3DRMDevice3_iface;
78     }
79     else if(IsEqualGUID(riid, &IID_IDirect3DRMWinDevice))
80     {
81         *object = &This->IDirect3DRMWinDevice_iface;
82     }
83     else
84     {
85         FIXME("interface %s not implemented\n", debugstr_guid(riid));
86         return E_NOINTERFACE;
87     }
88
89     IDirect3DRMDevice2_AddRef(iface);
90     return S_OK;
91 }
92
93 static ULONG WINAPI IDirect3DRMDevice2Impl_AddRef(IDirect3DRMDevice2* iface)
94 {
95     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
96     ULONG ref = InterlockedIncrement(&This->ref);
97
98     TRACE("(%p)->(): new ref = %d\n", iface, ref);
99
100     return ref;
101 }
102
103 static ULONG WINAPI IDirect3DRMDevice2Impl_Release(IDirect3DRMDevice2* iface)
104 {
105     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
106     ULONG ref = InterlockedDecrement(&This->ref);
107
108     TRACE("(%p)->(): new ref = %d\n", iface, ref);
109
110     if (!ref)
111         HeapFree(GetProcessHeap(), 0, This);
112
113     return ref;
114 }
115
116 /*** IDirect3DRMObject methods ***/
117 static HRESULT WINAPI IDirect3DRMDevice2Impl_Clone(IDirect3DRMDevice2* iface,
118                                                         LPUNKNOWN unkwn, REFIID riid,
119                                                         LPVOID* object)
120 {
121     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
122
123     FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface, This, unkwn, debugstr_guid(riid), object);
124
125     return E_NOTIMPL;
126 }
127
128 static HRESULT WINAPI IDirect3DRMDevice2Impl_AddDestroyCallback(IDirect3DRMDevice2* iface,
129                                                                      D3DRMOBJECTCALLBACK cb,
130                                                                      LPVOID argument)
131 {
132     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
133
134     FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
135
136     return E_NOTIMPL;
137 }
138
139 static HRESULT WINAPI IDirect3DRMDevice2Impl_DeleteDestroyCallback(IDirect3DRMDevice2* iface,
140                                                                         D3DRMOBJECTCALLBACK cb,
141                                                                         LPVOID argument)
142 {
143     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
144
145     FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
146
147     return E_NOTIMPL;
148 }
149
150 static HRESULT WINAPI IDirect3DRMDevice2Impl_SetAppData(IDirect3DRMDevice2* iface,
151                                                              DWORD data)
152 {
153     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
154
155     FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
156
157     return E_NOTIMPL;
158 }
159
160 static DWORD WINAPI IDirect3DRMDevice2Impl_GetAppData(IDirect3DRMDevice2* iface)
161 {
162     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
163
164     FIXME("(%p/%p)->(): stub\n", iface, This);
165
166     return 0;
167 }
168
169 static HRESULT WINAPI IDirect3DRMDevice2Impl_SetName(IDirect3DRMDevice2* iface, LPCSTR name)
170 {
171     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
172
173     FIXME("(%p/%p)->(%s): stub\n", iface, This, name);
174
175     return E_NOTIMPL;
176 }
177
178 static HRESULT WINAPI IDirect3DRMDevice2Impl_GetName(IDirect3DRMDevice2* iface,
179                                                           LPDWORD size, LPSTR name)
180 {
181     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
182
183     FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
184
185     return E_NOTIMPL;
186 }
187
188 static HRESULT WINAPI IDirect3DRMDevice2Impl_GetClassName(IDirect3DRMDevice2* iface,
189                                                                LPDWORD size, LPSTR name)
190 {
191     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
192
193     FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
194
195     return E_NOTIMPL;
196 }
197
198 /*** IDirect3DRMDevice methods ***/
199 static HRESULT WINAPI IDirect3DRMDevice2Impl_Init(IDirect3DRMDevice2* iface, ULONG width,
200                                                   ULONG height)
201 {
202     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
203
204     FIXME("(%p/%p)->(%u, %u): stub\n", iface, This, width, height);
205
206     return E_NOTIMPL;
207 }
208
209 /*** IDirect3DRMDevice2 methods ***/
210 static HRESULT WINAPI IDirect3DRMDevice2Impl_InitFromD3D(IDirect3DRMDevice2* iface,
211                                                          LPDIRECT3D lpD3D,
212                                                          LPDIRECT3DDEVICE lpD3DDev)
213 {
214     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
215
216     FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, lpD3D, lpD3DDev);
217
218     return E_NOTIMPL;
219 }
220
221 static HRESULT WINAPI IDirect3DRMDevice2Impl_InitFromClipper(IDirect3DRMDevice2* iface,
222                                                              LPDIRECTDRAWCLIPPER lpDDClipper,
223                                                              LPGUID lpGUID, int width, int height)
224 {
225     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
226
227     FIXME("(%p/%p)->(%p, %p, %u, %u): stub\n", iface, This, lpDDClipper, lpGUID, width, height);
228
229     return E_NOTIMPL;
230 }
231
232 static HRESULT WINAPI IDirect3DRMDevice2Impl_Update(IDirect3DRMDevice2* iface)
233 {
234     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
235
236     FIXME("(%p/%p)->(): stub\n", iface, This);
237
238     return E_NOTIMPL;
239 }
240
241 static HRESULT WINAPI IDirect3DRMDevice2Impl_AddUpdateCallback(IDirect3DRMDevice2* iface,
242                                                                D3DRMUPDATECALLBACK cb, LPVOID arg)
243 {
244     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
245
246     FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, arg);
247
248     return E_NOTIMPL;
249 }
250
251 static HRESULT WINAPI IDirect3DRMDevice2Impl_DeleteUpdateCallback(IDirect3DRMDevice2* iface,
252                                                                   D3DRMUPDATECALLBACK cb,
253                                                                   LPVOID arg)
254 {
255     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
256
257     FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, arg);
258
259     return E_NOTIMPL;
260 }
261
262 static HRESULT WINAPI IDirect3DRMDevice2Impl_SetBufferCount(IDirect3DRMDevice2* iface, DWORD count)
263 {
264     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
265
266     FIXME("(%p/%p)->(%u): stub\n", iface, This, count);
267
268     return E_NOTIMPL;
269 }
270
271 static DWORD WINAPI IDirect3DRMDevice2Impl_GetBufferCount(IDirect3DRMDevice2* iface)
272 {
273     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
274
275     FIXME("(%p/%p)->(): stub\n", iface, This);
276
277     return E_NOTIMPL;
278 }
279
280 static HRESULT WINAPI IDirect3DRMDevice2Impl_SetDither(IDirect3DRMDevice2* iface, BOOL enable)
281 {
282     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
283
284     FIXME("(%p/%p)->(%d): stub\n", iface, This, enable);
285
286     return E_NOTIMPL;
287 }
288
289 static HRESULT WINAPI IDirect3DRMDevice2Impl_SetShades(IDirect3DRMDevice2* iface, DWORD count)
290 {
291     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
292
293     FIXME("(%p/%p)->(%u): stub\n", iface, This, count);
294
295     return E_NOTIMPL;
296 }
297
298 static HRESULT WINAPI IDirect3DRMDevice2Impl_SetQuality(IDirect3DRMDevice2* iface,
299                                                         D3DRMRENDERQUALITY quality)
300 {
301     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
302
303     FIXME("(%p/%p)->(%u): stub\n", iface, This, quality);
304
305     return E_NOTIMPL;
306 }
307
308 static HRESULT WINAPI IDirect3DRMDevice2Impl_SetTextureQuality(IDirect3DRMDevice2* iface,
309                                                                D3DRMTEXTUREQUALITY quality)
310 {
311     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
312
313     FIXME("(%p/%p)->(%u): stub\n", iface, This, quality);
314
315     return E_NOTIMPL;
316 }
317
318 static HRESULT WINAPI IDirect3DRMDevice2Impl_GetViewports(IDirect3DRMDevice2* iface,
319                                                           LPDIRECT3DRMVIEWPORTARRAY *return_views)
320 {
321     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
322
323     FIXME("(%p/%p)->(%p): stub\n", iface, This, return_views);
324
325     return E_NOTIMPL;
326 }
327
328 static BOOL WINAPI IDirect3DRMDevice2Impl_GetDither(IDirect3DRMDevice2* iface)
329 {
330     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
331
332     FIXME("(%p/%p)->(): stub\n", iface, This);
333
334     return E_NOTIMPL;
335 }
336
337 static DWORD WINAPI IDirect3DRMDevice2Impl_GetShades(IDirect3DRMDevice2* iface)
338 {
339     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
340
341     FIXME("(%p/%p)->(): stub\n", iface, This);
342
343     return E_NOTIMPL;
344 }
345
346 static DWORD WINAPI IDirect3DRMDevice2Impl_GetHeight(IDirect3DRMDevice2* iface)
347 {
348     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
349
350     FIXME("(%p/%p)->(): stub\n", iface, This);
351
352     return E_NOTIMPL;
353 }
354
355 static DWORD WINAPI IDirect3DRMDevice2Impl_GetWidth(IDirect3DRMDevice2* iface)
356 {
357     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
358
359     FIXME("(%p/%p)->(): stub\n", iface, This);
360
361     return E_NOTIMPL;
362 }
363
364 static DWORD WINAPI IDirect3DRMDevice2Impl_GetTrianglesDrawn(IDirect3DRMDevice2* iface)
365 {
366     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
367
368     FIXME("(%p/%p)->(): stub\n", iface, This);
369
370     return E_NOTIMPL;
371 }
372
373 static DWORD WINAPI IDirect3DRMDevice2Impl_GetWireframeOptions(IDirect3DRMDevice2* iface)
374 {
375     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
376
377     FIXME("(%p/%p)->(): stub\n", iface, This);
378
379     return E_NOTIMPL;
380 }
381
382 static D3DRMRENDERQUALITY WINAPI IDirect3DRMDevice2Impl_GetQuality(IDirect3DRMDevice2* iface)
383 {
384     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
385
386     FIXME("(%p/%p)->(): stub\n", iface, This);
387
388     return E_NOTIMPL;
389 }
390
391 static D3DCOLORMODEL WINAPI IDirect3DRMDevice2Impl_GetColorModel(IDirect3DRMDevice2* iface)
392 {
393     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
394
395     FIXME("(%p/%p)->(): stub\n", iface, This);
396
397     return E_NOTIMPL;
398 }
399
400 static D3DRMTEXTUREQUALITY WINAPI IDirect3DRMDevice2Impl_GetTextureQuality(IDirect3DRMDevice2* iface)
401 {
402     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
403
404     FIXME("(%p/%p)->(): stub\n", iface, This);
405
406     return E_NOTIMPL;
407 }
408
409 static HRESULT WINAPI IDirect3DRMDevice2Impl_GetDirect3DDevice(IDirect3DRMDevice2* iface,
410                                                                LPDIRECT3DDEVICE * dev)
411 {
412     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
413
414     FIXME("(%p/%p)->(%p): stub\n", iface, This, dev);
415
416     return E_NOTIMPL;
417 }
418
419 static HRESULT WINAPI IDirect3DRMDevice2Impl_InitFromD3D2(IDirect3DRMDevice2* iface,
420                                                           LPDIRECT3D2 lpD3D,
421                                                           LPDIRECT3DDEVICE2 lpD3DDev)
422 {
423     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
424
425     FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, lpD3D, lpD3DDev);
426
427     return E_NOTIMPL;
428 }
429
430 static HRESULT WINAPI IDirect3DRMDevice2Impl_InitFromSurface(IDirect3DRMDevice2* iface,
431                                                              LPGUID lpGUID, LPDIRECTDRAW lpDD,
432                                                              LPDIRECTDRAWSURFACE lpDDSBack)
433 {
434     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
435
436     FIXME("(%p/%p)->(%p, %p, %p): stub\n", iface, This, lpGUID, lpDD, lpDDSBack);
437
438     return E_NOTIMPL;
439 }
440
441 static HRESULT WINAPI IDirect3DRMDevice2Impl_SetRenderMode(IDirect3DRMDevice2* iface, DWORD dwFlags)
442 {
443     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
444
445     FIXME("(%p/%p)->(%u): stub\n", iface, This, dwFlags);
446
447     return E_NOTIMPL;
448 }
449
450 static DWORD WINAPI IDirect3DRMDevice2Impl_GetRenderMode(IDirect3DRMDevice2* iface)
451 {
452     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
453
454     FIXME("(%p/%p)->(): stub\n", iface, This);
455
456     return E_NOTIMPL;
457 }
458
459 static HRESULT WINAPI IDirect3DRMDevice2Impl_GetDirect3DDevice2(IDirect3DRMDevice2* iface,
460                                                                 LPDIRECT3DDEVICE2 * dev)
461 {
462     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice2(iface);
463
464     FIXME("(%p/%p)->(%p): stub\n", iface, This, dev);
465
466     return E_NOTIMPL;
467 }
468
469 static const struct IDirect3DRMDevice2Vtbl Direct3DRMDevice2_Vtbl =
470 {
471     /*** IUnknown methods ***/
472     IDirect3DRMDevice2Impl_QueryInterface,
473     IDirect3DRMDevice2Impl_AddRef,
474     IDirect3DRMDevice2Impl_Release,
475     /*** IDirect3DRMObject methods ***/
476     IDirect3DRMDevice2Impl_Clone,
477     IDirect3DRMDevice2Impl_AddDestroyCallback,
478     IDirect3DRMDevice2Impl_DeleteDestroyCallback,
479     IDirect3DRMDevice2Impl_SetAppData,
480     IDirect3DRMDevice2Impl_GetAppData,
481     IDirect3DRMDevice2Impl_SetName,
482     IDirect3DRMDevice2Impl_GetName,
483     IDirect3DRMDevice2Impl_GetClassName,
484     /*** IDirect3DRMDevice methods ***/
485     IDirect3DRMDevice2Impl_Init,
486     IDirect3DRMDevice2Impl_InitFromD3D,
487     IDirect3DRMDevice2Impl_InitFromClipper,
488     IDirect3DRMDevice2Impl_Update,
489     IDirect3DRMDevice2Impl_AddUpdateCallback,
490     IDirect3DRMDevice2Impl_DeleteUpdateCallback,
491     IDirect3DRMDevice2Impl_SetBufferCount,
492     IDirect3DRMDevice2Impl_GetBufferCount,
493     IDirect3DRMDevice2Impl_SetDither,
494     IDirect3DRMDevice2Impl_SetShades,
495     IDirect3DRMDevice2Impl_SetQuality,
496     IDirect3DRMDevice2Impl_SetTextureQuality,
497     IDirect3DRMDevice2Impl_GetViewports,
498     IDirect3DRMDevice2Impl_GetDither,
499     IDirect3DRMDevice2Impl_GetShades,
500     IDirect3DRMDevice2Impl_GetHeight,
501     IDirect3DRMDevice2Impl_GetWidth,
502     IDirect3DRMDevice2Impl_GetTrianglesDrawn,
503     IDirect3DRMDevice2Impl_GetWireframeOptions,
504     IDirect3DRMDevice2Impl_GetQuality,
505     IDirect3DRMDevice2Impl_GetColorModel,
506     IDirect3DRMDevice2Impl_GetTextureQuality,
507     IDirect3DRMDevice2Impl_GetDirect3DDevice,
508     /*** IDirect3DRMDevice2 methods ***/
509     IDirect3DRMDevice2Impl_InitFromD3D2,
510     IDirect3DRMDevice2Impl_InitFromSurface,
511     IDirect3DRMDevice2Impl_SetRenderMode,
512     IDirect3DRMDevice2Impl_GetRenderMode,
513     IDirect3DRMDevice2Impl_GetDirect3DDevice2
514 };
515
516
517 /*** IUnknown methods ***/
518 static HRESULT WINAPI IDirect3DRMDevice3Impl_QueryInterface(IDirect3DRMDevice3* iface,
519                                                             REFIID riid, void** object)
520 {
521     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
522     return IDirect3DRMDevice2_QueryInterface(&This->IDirect3DRMDevice2_iface, riid, object);
523 }
524
525 static ULONG WINAPI IDirect3DRMDevice3Impl_AddRef(IDirect3DRMDevice3* iface)
526 {
527     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
528     return IDirect3DRMDevice2_AddRef(&This->IDirect3DRMDevice2_iface);
529 }
530
531 static ULONG WINAPI IDirect3DRMDevice3Impl_Release(IDirect3DRMDevice3* iface)
532 {
533     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
534     return IDirect3DRMDevice2_Release(&This->IDirect3DRMDevice2_iface);
535 }
536
537 /*** IDirect3DRMObject methods ***/
538 static HRESULT WINAPI IDirect3DRMDevice3Impl_Clone(IDirect3DRMDevice3* iface,
539                                                         LPUNKNOWN unkwn, REFIID riid,
540                                                         LPVOID* object)
541 {
542     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
543
544     FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface, This, unkwn, debugstr_guid(riid), object);
545
546     return E_NOTIMPL;
547 }
548
549 static HRESULT WINAPI IDirect3DRMDevice3Impl_AddDestroyCallback(IDirect3DRMDevice3* iface,
550                                                                      D3DRMOBJECTCALLBACK cb,
551                                                                      LPVOID argument)
552 {
553     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
554
555     FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
556
557     return E_NOTIMPL;
558 }
559
560 static HRESULT WINAPI IDirect3DRMDevice3Impl_DeleteDestroyCallback(IDirect3DRMDevice3* iface,
561                                                                         D3DRMOBJECTCALLBACK cb,
562                                                                         LPVOID argument)
563 {
564     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
565
566     FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
567
568     return E_NOTIMPL;
569 }
570
571 static HRESULT WINAPI IDirect3DRMDevice3Impl_SetAppData(IDirect3DRMDevice3* iface,
572                                                              DWORD data)
573 {
574     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
575
576     FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
577
578     return E_NOTIMPL;
579 }
580
581 static DWORD WINAPI IDirect3DRMDevice3Impl_GetAppData(IDirect3DRMDevice3* iface)
582 {
583     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
584
585     FIXME("(%p/%p)->(): stub\n", iface, This);
586
587     return 0;
588 }
589
590 static HRESULT WINAPI IDirect3DRMDevice3Impl_SetName(IDirect3DRMDevice3* iface, LPCSTR name)
591 {
592     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
593
594     FIXME("(%p/%p)->(%s): stub\n", iface, This, name);
595
596     return E_NOTIMPL;
597 }
598
599 static HRESULT WINAPI IDirect3DRMDevice3Impl_GetName(IDirect3DRMDevice3* iface,
600                                                           LPDWORD size, LPSTR name)
601 {
602     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
603
604     FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
605
606     return E_NOTIMPL;
607 }
608
609 static HRESULT WINAPI IDirect3DRMDevice3Impl_GetClassName(IDirect3DRMDevice3* iface,
610                                                                LPDWORD size, LPSTR name)
611 {
612     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
613
614     FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
615
616     return E_NOTIMPL;
617 }
618
619 /*** IDirect3DRMDevice methods ***/
620 static HRESULT WINAPI IDirect3DRMDevice3Impl_Init(IDirect3DRMDevice3* iface, ULONG width,
621                                                   ULONG height)
622 {
623     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
624
625     FIXME("(%p/%p)->(%u, %u): stub\n", iface, This, width, height);
626
627     return E_NOTIMPL;
628 }
629
630 static HRESULT WINAPI IDirect3DRMDevice3Impl_InitFromD3D(IDirect3DRMDevice3* iface,
631                                                          LPDIRECT3D lpD3D,
632                                                          LPDIRECT3DDEVICE lpD3DDev)
633 {
634     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
635
636     FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, lpD3D, lpD3DDev);
637
638     return E_NOTIMPL;
639 }
640
641 static HRESULT WINAPI IDirect3DRMDevice3Impl_InitFromClipper(IDirect3DRMDevice3* iface,
642                                                              LPDIRECTDRAWCLIPPER lpDDClipper,
643                                                              LPGUID lpGUID, int width, int height)
644 {
645     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
646
647     FIXME("(%p/%p)->(%p, %p, %u, %u): stub\n", iface, This, lpDDClipper, lpGUID, width, height);
648
649     return E_NOTIMPL;
650 }
651
652 static HRESULT WINAPI IDirect3DRMDevice3Impl_Update(IDirect3DRMDevice3* iface)
653 {
654     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
655
656     FIXME("(%p/%p)->(): stub\n", iface, This);
657
658     return E_NOTIMPL;
659 }
660
661 static HRESULT WINAPI IDirect3DRMDevice3Impl_AddUpdateCallback(IDirect3DRMDevice3* iface,
662                                                                D3DRMUPDATECALLBACK cb, LPVOID arg)
663 {
664     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
665
666     FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, arg);
667
668     return E_NOTIMPL;
669 }
670
671 static HRESULT WINAPI IDirect3DRMDevice3Impl_DeleteUpdateCallback(IDirect3DRMDevice3* iface,
672                                                                   D3DRMUPDATECALLBACK cb,
673                                                                   LPVOID arg)
674 {
675     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
676
677     FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, arg);
678
679     return E_NOTIMPL;
680 }
681
682 static HRESULT WINAPI IDirect3DRMDevice3Impl_SetBufferCount(IDirect3DRMDevice3* iface, DWORD count)
683 {
684     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
685
686     FIXME("(%p/%p)->(%u): stub\n", iface, This, count);
687
688     return E_NOTIMPL;
689 }
690
691 static DWORD WINAPI IDirect3DRMDevice3Impl_GetBufferCount(IDirect3DRMDevice3* iface)
692 {
693     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
694
695     FIXME("(%p/%p)->(): stub\n", iface, This);
696
697     return E_NOTIMPL;
698 }
699
700 static HRESULT WINAPI IDirect3DRMDevice3Impl_SetDither(IDirect3DRMDevice3* iface, BOOL enable)
701 {
702     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
703
704     FIXME("(%p/%p)->(%d): stub\n", iface, This, enable);
705
706     return E_NOTIMPL;
707 }
708
709 static HRESULT WINAPI IDirect3DRMDevice3Impl_SetShades(IDirect3DRMDevice3* iface, DWORD count)
710 {
711     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
712
713     FIXME("(%p/%p)->(%u): stub\n", iface, This, count);
714
715     return E_NOTIMPL;
716 }
717
718 static HRESULT WINAPI IDirect3DRMDevice3Impl_SetQuality(IDirect3DRMDevice3* iface,
719                                                         D3DRMRENDERQUALITY quality)
720 {
721     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
722
723     FIXME("(%p/%p)->(%u): stub\n", iface, This, quality);
724
725     return E_NOTIMPL;
726 }
727
728 static HRESULT WINAPI IDirect3DRMDevice3Impl_SetTextureQuality(IDirect3DRMDevice3* iface,
729                                                                D3DRMTEXTUREQUALITY quality)
730 {
731     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
732
733     FIXME("(%p/%p)->(%u): stub\n", iface, This, quality);
734
735     return E_NOTIMPL;
736 }
737
738 static HRESULT WINAPI IDirect3DRMDevice3Impl_GetViewports(IDirect3DRMDevice3* iface,
739                                                           LPDIRECT3DRMVIEWPORTARRAY *return_views)
740 {
741     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
742
743     FIXME("(%p/%p)->(%p): stub\n", iface, This, return_views);
744
745     return E_NOTIMPL;
746 }
747
748 static BOOL WINAPI IDirect3DRMDevice3Impl_GetDither(IDirect3DRMDevice3* iface)
749 {
750     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
751
752     FIXME("(%p/%p)->(): stub\n", iface, This);
753
754     return E_NOTIMPL;
755 }
756
757 static DWORD WINAPI IDirect3DRMDevice3Impl_GetShades(IDirect3DRMDevice3* iface)
758 {
759     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
760
761     FIXME("(%p/%p)->(): stub\n", iface, This);
762
763     return E_NOTIMPL;
764 }
765
766 static DWORD WINAPI IDirect3DRMDevice3Impl_GetHeight(IDirect3DRMDevice3* iface)
767 {
768     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
769
770     FIXME("(%p/%p)->(): stub\n", iface, This);
771
772     return E_NOTIMPL;
773 }
774
775 static DWORD WINAPI IDirect3DRMDevice3Impl_GetWidth(IDirect3DRMDevice3* iface)
776 {
777     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
778
779     FIXME("(%p/%p)->(): stub\n", iface, This);
780
781     return E_NOTIMPL;
782 }
783
784 static DWORD WINAPI IDirect3DRMDevice3Impl_GetTrianglesDrawn(IDirect3DRMDevice3* iface)
785 {
786     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
787
788     FIXME("(%p/%p)->(): stub\n", iface, This);
789
790     return E_NOTIMPL;
791 }
792
793 static DWORD WINAPI IDirect3DRMDevice3Impl_GetWireframeOptions(IDirect3DRMDevice3* iface)
794 {
795     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
796
797     FIXME("(%p/%p)->(): stub\n", iface, This);
798
799     return E_NOTIMPL;
800 }
801
802 static D3DRMRENDERQUALITY WINAPI IDirect3DRMDevice3Impl_GetQuality(IDirect3DRMDevice3* iface)
803 {
804     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
805
806     FIXME("(%p/%p)->(): stub\n", iface, This);
807
808     return E_NOTIMPL;
809 }
810
811 static D3DCOLORMODEL WINAPI IDirect3DRMDevice3Impl_GetColorModel(IDirect3DRMDevice3* iface)
812 {
813     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
814
815     FIXME("(%p/%p)->(): stub\n", iface, This);
816
817     return E_NOTIMPL;
818 }
819
820 static D3DRMTEXTUREQUALITY WINAPI IDirect3DRMDevice3Impl_GetTextureQuality(IDirect3DRMDevice3* iface)
821 {
822     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
823
824     FIXME("(%p/%p)->(): stub\n", iface, This);
825
826     return E_NOTIMPL;
827 }
828
829 static HRESULT WINAPI IDirect3DRMDevice3Impl_GetDirect3DDevice(IDirect3DRMDevice3* iface,
830                                                                LPDIRECT3DDEVICE * dev)
831 {
832     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
833
834     FIXME("(%p/%p)->(%p): stub\n", iface, This, dev);
835
836     return E_NOTIMPL;
837 }
838
839 /*** IDirect3DRMDevice2 methods ***/
840 static HRESULT WINAPI IDirect3DRMDevice3Impl_InitFromD3D2(IDirect3DRMDevice3* iface,
841                                                           LPDIRECT3D2 lpD3D,
842                                                           LPDIRECT3DDEVICE2 lpD3DDev)
843 {
844     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
845
846     FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, lpD3D, lpD3DDev);
847
848     return E_NOTIMPL;
849 }
850
851 static HRESULT WINAPI IDirect3DRMDevice3Impl_InitFromSurface(IDirect3DRMDevice3* iface,
852                                                              LPGUID lpGUID, LPDIRECTDRAW lpDD,
853                                                              LPDIRECTDRAWSURFACE lpDDSBack)
854 {
855     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
856
857     FIXME("(%p/%p)->(%p, %p, %p): stub\n", iface, This, lpGUID, lpDD, lpDDSBack);
858
859     return E_NOTIMPL;
860 }
861
862 static HRESULT WINAPI IDirect3DRMDevice3Impl_SetRenderMode(IDirect3DRMDevice3* iface, DWORD dwFlags)
863 {
864     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
865
866     FIXME("(%p/%p)->(%u): stub\n", iface, This, dwFlags);
867
868     return E_NOTIMPL;
869 }
870
871 static DWORD WINAPI IDirect3DRMDevice3Impl_GetRenderMode(IDirect3DRMDevice3* iface)
872 {
873     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
874
875     FIXME("(%p/%p)->(): stub\n", iface, This);
876
877     return E_NOTIMPL;
878 }
879
880 static HRESULT WINAPI IDirect3DRMDevice3Impl_GetDirect3DDevice2(IDirect3DRMDevice3* iface,
881                                                                 LPDIRECT3DDEVICE2 * dev)
882 {
883     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
884
885     FIXME("(%p/%p)->(%p): stub\n", iface, This, dev);
886
887     return E_NOTIMPL;
888 }
889
890 /*** IDirect3DRMDevice3 methods ***/
891 static HRESULT WINAPI IDirect3DRMDevice3Impl_FindPreferredTextureFormat(IDirect3DRMDevice3* iface,
892                                                                         DWORD bitdepths,
893                                                                         DWORD flags,
894                                                                         LPDDPIXELFORMAT lpDDPF)
895 {
896     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
897
898     FIXME("(%p/%p)->(%u, %u, %p): stub\n", iface, This, bitdepths, flags, lpDDPF);
899
900     return E_NOTIMPL;
901 }
902
903 static HRESULT WINAPI IDirect3DRMDevice3Impl_RenderStateChange(IDirect3DRMDevice3* iface,
904                                                                D3DRENDERSTATETYPE type, DWORD val,
905                                                                DWORD flags)
906 {
907     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
908
909     FIXME("(%p/%p)->(%u, %u, %u): stub\n", iface, This, type, val, flags);
910
911     return E_NOTIMPL;
912 }
913
914 static HRESULT WINAPI IDirect3DRMDevice3Impl_LightStateChange(IDirect3DRMDevice3* iface,
915                                                               D3DLIGHTSTATETYPE type, DWORD val,
916                                                               DWORD flags)
917 {
918     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
919
920     FIXME("(%p/%p)->(%u, %u, %u): stub\n", iface, This, type, val, flags);
921
922     return E_NOTIMPL;
923 }
924
925 static HRESULT WINAPI IDirect3DRMDevice3Impl_GetStateChangeOptions(IDirect3DRMDevice3* iface,
926                                                                    DWORD stateclass, DWORD statenum,
927                                                                    LPDWORD flags)
928 {
929     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
930
931     FIXME("(%p/%p)->(%u, %u, %p): stub\n", iface, This, stateclass, statenum, flags);
932
933     return E_NOTIMPL;
934 }
935
936 static HRESULT WINAPI IDirect3DRMDevice3Impl_SetStateChangeOptions(IDirect3DRMDevice3* iface,
937                                                                    DWORD stateclass, DWORD statenum,
938                                                                    DWORD flags)
939 {
940     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMDevice3(iface);
941
942     FIXME("(%p/%p)->(%u, %u, %u): stub\n", iface, This, stateclass, statenum, flags);
943
944     return E_NOTIMPL;
945 }
946
947 static const struct IDirect3DRMDevice3Vtbl Direct3DRMDevice3_Vtbl =
948 {
949     /*** IUnknown methods ***/
950     IDirect3DRMDevice3Impl_QueryInterface,
951     IDirect3DRMDevice3Impl_AddRef,
952     IDirect3DRMDevice3Impl_Release,
953     /*** IDirect3DRMObject methods ***/
954     IDirect3DRMDevice3Impl_Clone,
955     IDirect3DRMDevice3Impl_AddDestroyCallback,
956     IDirect3DRMDevice3Impl_DeleteDestroyCallback,
957     IDirect3DRMDevice3Impl_SetAppData,
958     IDirect3DRMDevice3Impl_GetAppData,
959     IDirect3DRMDevice3Impl_SetName,
960     IDirect3DRMDevice3Impl_GetName,
961     IDirect3DRMDevice3Impl_GetClassName,
962     /*** IDirect3DRMDevice methods ***/
963     IDirect3DRMDevice3Impl_Init,
964     IDirect3DRMDevice3Impl_InitFromD3D,
965     IDirect3DRMDevice3Impl_InitFromClipper,
966     IDirect3DRMDevice3Impl_Update,
967     IDirect3DRMDevice3Impl_AddUpdateCallback,
968     IDirect3DRMDevice3Impl_DeleteUpdateCallback,
969     IDirect3DRMDevice3Impl_SetBufferCount,
970     IDirect3DRMDevice3Impl_GetBufferCount,
971     IDirect3DRMDevice3Impl_SetDither,
972     IDirect3DRMDevice3Impl_SetShades,
973     IDirect3DRMDevice3Impl_SetQuality,
974     IDirect3DRMDevice3Impl_SetTextureQuality,
975     IDirect3DRMDevice3Impl_GetViewports,
976     IDirect3DRMDevice3Impl_GetDither,
977     IDirect3DRMDevice3Impl_GetShades,
978     IDirect3DRMDevice3Impl_GetHeight,
979     IDirect3DRMDevice3Impl_GetWidth,
980     IDirect3DRMDevice3Impl_GetTrianglesDrawn,
981     IDirect3DRMDevice3Impl_GetWireframeOptions,
982     IDirect3DRMDevice3Impl_GetQuality,
983     IDirect3DRMDevice3Impl_GetColorModel,
984     IDirect3DRMDevice3Impl_GetTextureQuality,
985     IDirect3DRMDevice3Impl_GetDirect3DDevice,
986     /*** IDirect3DRMDevice2 methods ***/
987     IDirect3DRMDevice3Impl_InitFromD3D2,
988     IDirect3DRMDevice3Impl_InitFromSurface,
989     IDirect3DRMDevice3Impl_SetRenderMode,
990     IDirect3DRMDevice3Impl_GetRenderMode,
991     IDirect3DRMDevice3Impl_GetDirect3DDevice2,
992     /*** IDirect3DRMDevice3 methods ***/
993     IDirect3DRMDevice3Impl_FindPreferredTextureFormat,
994     IDirect3DRMDevice3Impl_RenderStateChange,
995     IDirect3DRMDevice3Impl_LightStateChange,
996     IDirect3DRMDevice3Impl_GetStateChangeOptions,
997     IDirect3DRMDevice3Impl_SetStateChangeOptions
998 };
999
1000
1001 /*** IUnknown methods ***/
1002 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_QueryInterface(IDirect3DRMWinDevice* iface,
1003                                                               REFIID riid, void** object)
1004 {
1005     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1006     return IDirect3DRMDevice2_QueryInterface(&This->IDirect3DRMDevice2_iface, riid, object);
1007 }
1008
1009 static ULONG WINAPI IDirect3DRMWinDeviceImpl_AddRef(IDirect3DRMWinDevice* iface)
1010 {
1011     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1012     return IDirect3DRMDevice2_AddRef(&This->IDirect3DRMDevice2_iface);
1013 }
1014
1015 static ULONG WINAPI IDirect3DRMWinDeviceImpl_Release(IDirect3DRMWinDevice* iface)
1016 {
1017     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1018     return IDirect3DRMDevice2_Release(&This->IDirect3DRMDevice2_iface);
1019 }
1020
1021 /*** IDirect3DRMObject methods ***/
1022 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_Clone(IDirect3DRMWinDevice* iface,
1023                                                         LPUNKNOWN unkwn, REFIID riid,
1024                                                         LPVOID* object)
1025 {
1026     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1027
1028     FIXME("(%p/%p)->(%p, %s, %p): stub\n", iface, This, unkwn, debugstr_guid(riid), object);
1029
1030     return E_NOTIMPL;
1031 }
1032
1033 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_AddDestroyCallback(IDirect3DRMWinDevice* iface,
1034                                                                      D3DRMOBJECTCALLBACK cb,
1035                                                                      LPVOID argument)
1036 {
1037     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1038
1039     FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
1040
1041     return E_NOTIMPL;
1042 }
1043
1044 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_DeleteDestroyCallback(IDirect3DRMWinDevice* iface,
1045                                                                         D3DRMOBJECTCALLBACK cb,
1046                                                                         LPVOID argument)
1047 {
1048     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1049
1050     FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, cb, argument);
1051
1052     return E_NOTIMPL;
1053 }
1054
1055 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_SetAppData(IDirect3DRMWinDevice* iface,
1056                                                              DWORD data)
1057 {
1058     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1059
1060     FIXME("(%p/%p)->(%u): stub\n", iface, This, data);
1061
1062     return E_NOTIMPL;
1063 }
1064
1065 static DWORD WINAPI IDirect3DRMWinDeviceImpl_GetAppData(IDirect3DRMWinDevice* iface)
1066 {
1067     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1068
1069     FIXME("(%p/%p)->(): stub\n", iface, This);
1070
1071     return 0;
1072 }
1073
1074 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_SetName(IDirect3DRMWinDevice* iface, LPCSTR name)
1075 {
1076     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1077
1078     FIXME("(%p/%p)->(%s): stub\n", iface, This, name);
1079
1080     return E_NOTIMPL;
1081 }
1082
1083 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_GetName(IDirect3DRMWinDevice* iface,
1084                                                           LPDWORD size, LPSTR name)
1085 {
1086     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1087
1088     FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
1089
1090     return E_NOTIMPL;
1091 }
1092
1093 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_GetClassName(IDirect3DRMWinDevice* iface,
1094                                                                LPDWORD size, LPSTR name)
1095 {
1096     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1097
1098     FIXME("(%p/%p)->(%p, %p): stub\n", iface, This, size, name);
1099
1100     return E_NOTIMPL;
1101 }
1102
1103 /*** IDirect3DRMWinDevice methods ***/
1104 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_HandlePaint(IDirect3DRMWinDevice* iface, HDC hdc)
1105 {
1106     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1107
1108     FIXME("(%p/%p)->(%p): stub\n", iface, This, hdc);
1109
1110     return E_NOTIMPL;
1111 }
1112
1113 static HRESULT WINAPI IDirect3DRMWinDeviceImpl_HandleActivate(IDirect3DRMWinDevice* iface, WORD wparam)
1114 {
1115     IDirect3DRMDeviceImpl *This = impl_from_IDirect3DRMWinDevice(iface);
1116
1117     FIXME("(%p/%p)->(%u): stub\n", iface, This, wparam);
1118
1119     return E_NOTIMPL;
1120 }
1121
1122 static const struct IDirect3DRMWinDeviceVtbl Direct3DRMWinDevice_Vtbl =
1123 {
1124     /*** IUnknown methods ***/
1125     IDirect3DRMWinDeviceImpl_QueryInterface,
1126     IDirect3DRMWinDeviceImpl_AddRef,
1127     IDirect3DRMWinDeviceImpl_Release,
1128     /*** IDirect3DRMObject methods ***/
1129     IDirect3DRMWinDeviceImpl_Clone,
1130     IDirect3DRMWinDeviceImpl_AddDestroyCallback,
1131     IDirect3DRMWinDeviceImpl_DeleteDestroyCallback,
1132     IDirect3DRMWinDeviceImpl_SetAppData,
1133     IDirect3DRMWinDeviceImpl_GetAppData,
1134     IDirect3DRMWinDeviceImpl_SetName,
1135     IDirect3DRMWinDeviceImpl_GetName,
1136     IDirect3DRMWinDeviceImpl_GetClassName,
1137     /*** IDirect3DRMWinDevice methods ***/
1138     IDirect3DRMWinDeviceImpl_HandlePaint,
1139     IDirect3DRMWinDeviceImpl_HandleActivate
1140 };
1141
1142 HRESULT Direct3DRMDevice_create(REFIID riid, IUnknown** ppObj)
1143 {
1144     IDirect3DRMDeviceImpl* object;
1145
1146     TRACE("(%p)\n", ppObj);
1147
1148     object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMDeviceImpl));
1149     if (!object)
1150     {
1151         ERR("Out of memory\n");
1152         return E_OUTOFMEMORY;
1153     }
1154
1155     object->IDirect3DRMDevice2_iface.lpVtbl = &Direct3DRMDevice2_Vtbl;
1156     object->IDirect3DRMDevice3_iface.lpVtbl = &Direct3DRMDevice3_Vtbl;
1157     object->IDirect3DRMWinDevice_iface.lpVtbl = &Direct3DRMWinDevice_Vtbl;
1158     object->ref = 1;
1159
1160     if (IsEqualGUID(riid, &IID_IDirect3DRMFrame3))
1161         *ppObj = (IUnknown*)&object->IDirect3DRMDevice3_iface;
1162     else
1163         *ppObj = (IUnknown*)&object->IDirect3DRMDevice2_iface;
1164
1165     return S_OK;
1166 }