riched20: Merge the richole object with the text services object.
[wine.git] / dlls / windows.gaming.input / main.c
blobbf6b990a62313725daed3d8510c3ded2235055a1
1 /* WinRT Windows.Gaming.Input implementation
3 * Copyright 2021 RĂ©mi Bernon for CodeWeavers
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #include <stdarg.h>
22 #define COBJMACROS
23 #include "windef.h"
24 #include "winbase.h"
25 #include "winstring.h"
26 #include "wine/debug.h"
27 #include "objbase.h"
29 #include "initguid.h"
30 #include "activation.h"
32 #define WIDL_using_Windows_Foundation
33 #define WIDL_using_Windows_Foundation_Collections
34 #include "windows.foundation.h"
35 #define WIDL_using_Windows_Gaming_Input
36 #include "windows.gaming.input.h"
38 WINE_DEFAULT_DEBUG_CHANNEL(input);
40 static const char *debugstr_hstring(HSTRING hstr)
42 const WCHAR *str;
43 UINT32 len;
44 if (hstr && !((ULONG_PTR)hstr >> 16)) return "(invalid)";
45 str = WindowsGetStringRawBuffer(hstr, &len);
46 return wine_dbgstr_wn(str, len);
49 struct gamepad_vector
51 IVectorView_Gamepad IVectorView_Gamepad_iface;
52 LONG ref;
55 static inline struct gamepad_vector *impl_from_IVectorView_Gamepad(IVectorView_Gamepad *iface)
57 return CONTAINING_RECORD(iface, struct gamepad_vector, IVectorView_Gamepad_iface);
60 static HRESULT STDMETHODCALLTYPE vector_view_gamepad_QueryInterface(
61 IVectorView_Gamepad *iface, REFIID iid, void **out)
63 TRACE("iface %p, iid %s, out %p stub!\n", iface, debugstr_guid(iid), out);
65 if (IsEqualGUID(iid, &IID_IUnknown) ||
66 IsEqualGUID(iid, &IID_IInspectable) ||
67 IsEqualGUID(iid, &IID_IAgileObject) ||
68 IsEqualGUID(iid, &IID_IVectorView_Gamepad))
70 IUnknown_AddRef(iface);
71 *out = iface;
72 return S_OK;
75 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
76 *out = NULL;
77 return E_NOINTERFACE;
80 static ULONG STDMETHODCALLTYPE vector_view_gamepad_AddRef(
81 IVectorView_Gamepad *iface)
83 struct gamepad_vector *impl = impl_from_IVectorView_Gamepad(iface);
84 ULONG ref = InterlockedIncrement(&impl->ref);
85 TRACE("iface %p, ref %u.\n", iface, ref);
86 return ref;
89 static ULONG STDMETHODCALLTYPE vector_view_gamepad_Release(
90 IVectorView_Gamepad *iface)
92 struct gamepad_vector *impl = impl_from_IVectorView_Gamepad(iface);
93 ULONG ref = InterlockedDecrement(&impl->ref);
94 TRACE("iface %p, ref %u.\n", iface, ref);
95 return ref;
98 static HRESULT STDMETHODCALLTYPE vector_view_gamepad_GetIids(
99 IVectorView_Gamepad *iface, ULONG *iid_count, IID **iids)
101 FIXME("iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids);
102 return E_NOTIMPL;
105 static HRESULT STDMETHODCALLTYPE vector_view_gamepad_GetRuntimeClassName(
106 IVectorView_Gamepad *iface, HSTRING *class_name)
108 FIXME("iface %p, class_name %p stub!\n", iface, class_name);
109 return E_NOTIMPL;
112 static HRESULT STDMETHODCALLTYPE vector_view_gamepad_GetTrustLevel(
113 IVectorView_Gamepad *iface, TrustLevel *trust_level)
115 FIXME("iface %p, trust_level %p stub!\n", iface, trust_level);
116 return E_NOTIMPL;
119 static HRESULT STDMETHODCALLTYPE vector_view_gamepad_GetAt(
120 IVectorView_Gamepad *iface, UINT32 index, IGamepad **value)
122 FIXME("iface %p, index %#x, value %p stub!\n", iface, index, value);
123 *value = NULL;
124 return E_BOUNDS;
127 static HRESULT STDMETHODCALLTYPE vector_view_gamepad_get_Size(
128 IVectorView_Gamepad *iface, UINT32 *value)
130 FIXME("iface %p, value %p stub!\n", iface, value);
131 *value = 0;
132 return S_OK;
135 static HRESULT STDMETHODCALLTYPE vector_view_gamepad_IndexOf(
136 IVectorView_Gamepad *iface, IGamepad *element, UINT32 *index, BOOLEAN *found)
138 FIXME("iface %p, element %p, index %p, found %p stub!\n", iface, element, index, found);
139 *index = 0;
140 *found = FALSE;
141 return S_OK;
144 static HRESULT STDMETHODCALLTYPE vector_view_gamepad_GetMany(
145 IVectorView_Gamepad *iface, UINT32 start_index,
146 UINT32 items_size, IGamepad **items, UINT *value)
148 FIXME("iface %p, start_index %#x, items %p, value %p stub!\n", iface, start_index, items, value);
149 *value = 0;
150 return E_BOUNDS;
153 static const struct IVectorView_GamepadVtbl vector_view_gamepad_vtbl =
155 vector_view_gamepad_QueryInterface,
156 vector_view_gamepad_AddRef,
157 vector_view_gamepad_Release,
158 /* IInspectable methods */
159 vector_view_gamepad_GetIids,
160 vector_view_gamepad_GetRuntimeClassName,
161 vector_view_gamepad_GetTrustLevel,
162 /* IVectorView<VoiceInformation> methods */
163 vector_view_gamepad_GetAt,
164 vector_view_gamepad_get_Size,
165 vector_view_gamepad_IndexOf,
166 vector_view_gamepad_GetMany,
169 static struct gamepad_vector gamepads =
171 {&vector_view_gamepad_vtbl},
175 struct raw_game_controller_vector
177 IVectorView_RawGameController IVectorView_RawGameController_iface;
178 LONG ref;
181 static inline struct raw_game_controller_vector *impl_from_IVectorView_RawGameController(IVectorView_RawGameController *iface)
183 return CONTAINING_RECORD(iface, struct raw_game_controller_vector, IVectorView_RawGameController_iface);
186 static HRESULT STDMETHODCALLTYPE vector_view_raw_game_controller_QueryInterface(
187 IVectorView_RawGameController *iface, REFIID iid, void **out)
189 TRACE("iface %p, iid %s, out %p stub!\n", iface, debugstr_guid(iid), out);
191 if (IsEqualGUID(iid, &IID_IUnknown) ||
192 IsEqualGUID(iid, &IID_IInspectable) ||
193 IsEqualGUID(iid, &IID_IAgileObject) ||
194 IsEqualGUID(iid, &IID_IVectorView_RawGameController))
196 IUnknown_AddRef(iface);
197 *out = iface;
198 return S_OK;
201 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
202 *out = NULL;
203 return E_NOINTERFACE;
206 static ULONG STDMETHODCALLTYPE vector_view_raw_game_controller_AddRef(
207 IVectorView_RawGameController *iface)
209 struct raw_game_controller_vector *impl = impl_from_IVectorView_RawGameController(iface);
210 ULONG ref = InterlockedIncrement(&impl->ref);
211 TRACE("iface %p, ref %u.\n", iface, ref);
212 return ref;
215 static ULONG STDMETHODCALLTYPE vector_view_raw_game_controller_Release(
216 IVectorView_RawGameController *iface)
218 struct raw_game_controller_vector *impl = impl_from_IVectorView_RawGameController(iface);
219 ULONG ref = InterlockedDecrement(&impl->ref);
220 TRACE("iface %p, ref %u.\n", iface, ref);
221 return ref;
224 static HRESULT STDMETHODCALLTYPE vector_view_raw_game_controller_GetIids(
225 IVectorView_RawGameController *iface, ULONG *iid_count, IID **iids)
227 FIXME("iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids);
228 return E_NOTIMPL;
231 static HRESULT STDMETHODCALLTYPE vector_view_raw_game_controller_GetRuntimeClassName(
232 IVectorView_RawGameController *iface, HSTRING *class_name)
234 FIXME("iface %p, class_name %p stub!\n", iface, class_name);
235 return E_NOTIMPL;
238 static HRESULT STDMETHODCALLTYPE vector_view_raw_game_controller_GetTrustLevel(
239 IVectorView_RawGameController *iface, TrustLevel *trust_level)
241 FIXME("iface %p, trust_level %p stub!\n", iface, trust_level);
242 return E_NOTIMPL;
245 static HRESULT STDMETHODCALLTYPE vector_view_raw_game_controller_GetAt(
246 IVectorView_RawGameController *iface, UINT32 index, IRawGameController **value)
248 FIXME("iface %p, index %#x, value %p stub!\n", iface, index, value);
249 *value = NULL;
250 return E_BOUNDS;
253 static HRESULT STDMETHODCALLTYPE vector_view_raw_game_controller_get_Size(
254 IVectorView_RawGameController *iface, UINT32 *value)
256 FIXME("iface %p, value %p stub!\n", iface, value);
257 *value = 0;
258 return S_OK;
261 static HRESULT STDMETHODCALLTYPE vector_view_raw_game_controller_IndexOf(
262 IVectorView_RawGameController *iface, IRawGameController *element, UINT32 *index, BOOLEAN *found)
264 FIXME("iface %p, element %p, index %p, found %p stub!\n", iface, element, index, found);
265 *index = 0;
266 *found = FALSE;
267 return S_OK;
270 static HRESULT STDMETHODCALLTYPE vector_view_raw_game_controller_GetMany(
271 IVectorView_RawGameController *iface, UINT32 start_index,
272 UINT32 items_size, IRawGameController **items, UINT *value)
274 FIXME("iface %p, start_index %#x, items %p, value %p stub!\n", iface, start_index, items, value);
275 *value = 0;
276 return E_BOUNDS;
279 static const struct IVectorView_RawGameControllerVtbl vector_view_raw_game_controller_vtbl =
281 vector_view_raw_game_controller_QueryInterface,
282 vector_view_raw_game_controller_AddRef,
283 vector_view_raw_game_controller_Release,
284 /* IInspectable methods */
285 vector_view_raw_game_controller_GetIids,
286 vector_view_raw_game_controller_GetRuntimeClassName,
287 vector_view_raw_game_controller_GetTrustLevel,
288 /* IVectorView<RawGameController> methods */
289 vector_view_raw_game_controller_GetAt,
290 vector_view_raw_game_controller_get_Size,
291 vector_view_raw_game_controller_IndexOf,
292 vector_view_raw_game_controller_GetMany,
295 static struct raw_game_controller_vector raw_game_controllers =
297 {&vector_view_raw_game_controller_vtbl},
301 struct windows_gaming_input
303 IActivationFactory IActivationFactory_iface;
304 IGamepadStatics IGamepadStatics_iface;
305 IRawGameControllerStatics IRawGameControllerStatics_iface;
306 LONG ref;
309 static inline struct windows_gaming_input *impl_from_IActivationFactory(IActivationFactory *iface)
311 return CONTAINING_RECORD(iface, struct windows_gaming_input, IActivationFactory_iface);
314 static inline struct windows_gaming_input *impl_from_IGamepadStatics(IGamepadStatics *iface)
316 return CONTAINING_RECORD(iface, struct windows_gaming_input, IGamepadStatics_iface);
319 static inline struct windows_gaming_input *impl_from_IRawGameControllerStatics(IRawGameControllerStatics *iface)
321 return CONTAINING_RECORD(iface, struct windows_gaming_input, IRawGameControllerStatics_iface);
324 static HRESULT STDMETHODCALLTYPE windows_gaming_input_QueryInterface(
325 IActivationFactory *iface, REFIID iid, void **out)
327 struct windows_gaming_input *impl = impl_from_IActivationFactory(iface);
329 TRACE("iface %p, iid %s, out %p stub!\n", iface, debugstr_guid(iid), out);
331 if (IsEqualGUID(iid, &IID_IUnknown) ||
332 IsEqualGUID(iid, &IID_IInspectable) ||
333 IsEqualGUID(iid, &IID_IAgileObject) ||
334 IsEqualGUID(iid, &IID_IActivationFactory))
336 IUnknown_AddRef(iface);
337 *out = iface;
338 return S_OK;
341 if (IsEqualGUID(iid, &IID_IGamepadStatics))
343 IUnknown_AddRef(iface);
344 *out = &impl->IGamepadStatics_iface;
345 return S_OK;
348 if (IsEqualGUID(iid, &IID_IRawGameControllerStatics))
350 IUnknown_AddRef(iface);
351 *out = &impl->IRawGameControllerStatics_iface;
352 return S_OK;
355 FIXME("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
356 *out = NULL;
357 return E_NOINTERFACE;
360 static ULONG STDMETHODCALLTYPE windows_gaming_input_AddRef(
361 IActivationFactory *iface)
363 struct windows_gaming_input *impl = impl_from_IActivationFactory(iface);
364 ULONG ref = InterlockedIncrement(&impl->ref);
365 TRACE("iface %p, ref %u.\n", iface, ref);
366 return ref;
369 static ULONG STDMETHODCALLTYPE windows_gaming_input_Release(
370 IActivationFactory *iface)
372 struct windows_gaming_input *impl = impl_from_IActivationFactory(iface);
373 ULONG ref = InterlockedDecrement(&impl->ref);
374 TRACE("iface %p, ref %u.\n", iface, ref);
375 return ref;
378 static HRESULT STDMETHODCALLTYPE windows_gaming_input_GetIids(
379 IActivationFactory *iface, ULONG *iid_count, IID **iids)
381 FIXME("iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids);
382 return E_NOTIMPL;
385 static HRESULT STDMETHODCALLTYPE windows_gaming_input_GetRuntimeClassName(
386 IActivationFactory *iface, HSTRING *class_name)
388 FIXME("iface %p, class_name %p stub!\n", iface, class_name);
389 return E_NOTIMPL;
392 static HRESULT STDMETHODCALLTYPE windows_gaming_input_GetTrustLevel(
393 IActivationFactory *iface, TrustLevel *trust_level)
395 FIXME("iface %p, trust_level %p stub!\n", iface, trust_level);
396 return E_NOTIMPL;
399 static HRESULT STDMETHODCALLTYPE windows_gaming_input_ActivateInstance(
400 IActivationFactory *iface, IInspectable **instance)
402 FIXME("iface %p, instance %p stub!\n", iface, instance);
403 return E_NOTIMPL;
406 static const struct IActivationFactoryVtbl activation_factory_vtbl =
408 windows_gaming_input_QueryInterface,
409 windows_gaming_input_AddRef,
410 windows_gaming_input_Release,
411 /* IInspectable methods */
412 windows_gaming_input_GetIids,
413 windows_gaming_input_GetRuntimeClassName,
414 windows_gaming_input_GetTrustLevel,
415 /* IActivationFactory methods */
416 windows_gaming_input_ActivateInstance,
419 static HRESULT STDMETHODCALLTYPE gamepad_statics_QueryInterface(
420 IGamepadStatics *iface, REFIID iid, void **out)
422 struct windows_gaming_input *impl = impl_from_IGamepadStatics(iface);
423 return windows_gaming_input_QueryInterface(&impl->IActivationFactory_iface, iid, out);
426 static ULONG STDMETHODCALLTYPE gamepad_statics_AddRef(
427 IGamepadStatics *iface)
429 struct windows_gaming_input *impl = impl_from_IGamepadStatics(iface);
430 return windows_gaming_input_AddRef(&impl->IActivationFactory_iface);
433 static ULONG STDMETHODCALLTYPE gamepad_statics_Release(
434 IGamepadStatics *iface)
436 struct windows_gaming_input *impl = impl_from_IGamepadStatics(iface);
437 return windows_gaming_input_Release(&impl->IActivationFactory_iface);
440 static HRESULT STDMETHODCALLTYPE gamepad_statics_GetIids(
441 IGamepadStatics *iface, ULONG *iid_count, IID **iids)
443 FIXME("iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids);
444 return E_NOTIMPL;
447 static HRESULT STDMETHODCALLTYPE gamepad_statics_GetRuntimeClassName(
448 IGamepadStatics *iface, HSTRING *class_name)
450 FIXME("iface %p, class_name %p stub!\n", iface, class_name);
451 return E_NOTIMPL;
454 static HRESULT STDMETHODCALLTYPE gamepad_statics_GetTrustLevel(
455 IGamepadStatics *iface, TrustLevel *trust_level)
457 FIXME("iface %p, trust_level %p stub!\n", iface, trust_level);
458 return E_NOTIMPL;
461 static HRESULT STDMETHODCALLTYPE gamepad_statics_add_GamepadAdded(
462 IGamepadStatics *iface, IEventHandler_Gamepad *value, EventRegistrationToken* token)
464 FIXME("iface %p, value %p, token %p stub!\n", iface, value, token);
465 if (!value) return E_INVALIDARG;
466 token->value = 0;
467 return S_OK;
470 static HRESULT STDMETHODCALLTYPE gamepad_statics_remove_GamepadAdded(
471 IGamepadStatics *iface, EventRegistrationToken token)
473 FIXME("iface %p, token %#I64x stub!\n", iface, token.value);
474 return S_OK;
477 static HRESULT STDMETHODCALLTYPE gamepad_statics_add_GamepadRemoved(
478 IGamepadStatics *iface, IEventHandler_Gamepad *value, EventRegistrationToken* token)
480 FIXME("iface %p, value %p, token %p stub!\n", iface, value, token);
481 if (!value) return E_INVALIDARG;
482 token->value = 0;
483 return S_OK;
486 static HRESULT STDMETHODCALLTYPE gamepad_statics_remove_GamepadRemoved(
487 IGamepadStatics *iface, EventRegistrationToken token)
489 FIXME("iface %p, token %#I64x stub!\n", iface, token.value);
490 return S_OK;
493 static HRESULT STDMETHODCALLTYPE gamepad_statics_get_Gamepads(
494 IGamepadStatics *iface, IVectorView_Gamepad **value)
496 TRACE("iface %p, value %p.\n", iface, value);
497 *value = &gamepads.IVectorView_Gamepad_iface;
498 IVectorView_Gamepad_AddRef(*value);
499 return S_OK;
502 static const struct IGamepadStaticsVtbl gamepad_statics_vtbl =
504 gamepad_statics_QueryInterface,
505 gamepad_statics_AddRef,
506 gamepad_statics_Release,
507 /* IInspectable methods */
508 gamepad_statics_GetIids,
509 gamepad_statics_GetRuntimeClassName,
510 gamepad_statics_GetTrustLevel,
511 /* IGamepadStatics methods */
512 gamepad_statics_add_GamepadAdded,
513 gamepad_statics_remove_GamepadAdded,
514 gamepad_statics_add_GamepadRemoved,
515 gamepad_statics_remove_GamepadRemoved,
516 gamepad_statics_get_Gamepads,
519 static HRESULT STDMETHODCALLTYPE raw_game_controller_statics_QueryInterface(
520 IRawGameControllerStatics *iface, REFIID iid, void **out)
522 struct windows_gaming_input *impl = impl_from_IRawGameControllerStatics(iface);
523 return windows_gaming_input_QueryInterface(&impl->IActivationFactory_iface, iid, out);
526 static ULONG STDMETHODCALLTYPE raw_game_controller_statics_AddRef(
527 IRawGameControllerStatics *iface)
529 struct windows_gaming_input *impl = impl_from_IRawGameControllerStatics(iface);
530 return windows_gaming_input_AddRef(&impl->IActivationFactory_iface);
533 static ULONG STDMETHODCALLTYPE raw_game_controller_statics_Release(
534 IRawGameControllerStatics *iface)
536 struct windows_gaming_input *impl = impl_from_IRawGameControllerStatics(iface);
537 return windows_gaming_input_Release(&impl->IActivationFactory_iface);
540 static HRESULT STDMETHODCALLTYPE raw_game_controller_statics_GetIids(
541 IRawGameControllerStatics *iface, ULONG *iid_count, IID **iids)
543 FIXME("iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids);
544 return E_NOTIMPL;
547 static HRESULT STDMETHODCALLTYPE raw_game_controller_statics_GetRuntimeClassName(
548 IRawGameControllerStatics *iface, HSTRING *class_name)
550 FIXME("iface %p, class_name %p stub!\n", iface, class_name);
551 return E_NOTIMPL;
554 static HRESULT STDMETHODCALLTYPE raw_game_controller_statics_GetTrustLevel(
555 IRawGameControllerStatics *iface, TrustLevel *trust_level)
557 FIXME("iface %p, trust_level %p stub!\n", iface, trust_level);
558 return E_NOTIMPL;
561 static HRESULT STDMETHODCALLTYPE raw_game_controller_statics_add_RawGameControllerAdded(
562 IRawGameControllerStatics *iface, IEventHandler_RawGameController *value, EventRegistrationToken* token)
564 FIXME("iface %p, value %p, token %p stub!\n", iface, value, token);
565 if (!value) return E_INVALIDARG;
566 token->value = 0;
567 return S_OK;
570 static HRESULT STDMETHODCALLTYPE raw_game_controller_statics_remove_RawGameControllerAdded(
571 IRawGameControllerStatics *iface, EventRegistrationToken token)
573 FIXME("iface %p, token %#I64x stub!\n", iface, token.value);
574 return S_OK;
577 static HRESULT STDMETHODCALLTYPE raw_game_controller_statics_add_RawGameControllerRemoved(
578 IRawGameControllerStatics *iface, IEventHandler_RawGameController *value, EventRegistrationToken* token)
580 FIXME("iface %p, value %p, token %p stub!\n", iface, value, token);
581 if (!value) return E_INVALIDARG;
582 token->value = 0;
583 return S_OK;
586 static HRESULT STDMETHODCALLTYPE raw_game_controller_statics_remove_RawGameControllerRemoved(
587 IRawGameControllerStatics *iface, EventRegistrationToken token)
589 FIXME("iface %p, token %#I64x stub!\n", iface, token.value);
590 return S_OK;
593 static HRESULT STDMETHODCALLTYPE raw_game_controller_statics_get_RawGameControllers(
594 IRawGameControllerStatics *iface, IVectorView_RawGameController **value)
596 TRACE("iface %p, value %p.\n", iface, value);
597 *value = &raw_game_controllers.IVectorView_RawGameController_iface;
598 IVectorView_RawGameController_AddRef(*value);
599 return S_OK;
602 static HRESULT STDMETHODCALLTYPE raw_game_controller_statics_FromGameController(
603 IRawGameControllerStatics *iface, IGameController *game_controller, IRawGameController **value)
605 FIXME("iface %p, game_controller %p, value %p stub!\n", iface, game_controller, value);
606 return E_NOTIMPL;
609 static const struct IRawGameControllerStaticsVtbl raw_game_controller_statics_vtbl =
611 raw_game_controller_statics_QueryInterface,
612 raw_game_controller_statics_AddRef,
613 raw_game_controller_statics_Release,
614 /* IInspectable methods */
615 raw_game_controller_statics_GetIids,
616 raw_game_controller_statics_GetRuntimeClassName,
617 raw_game_controller_statics_GetTrustLevel,
618 /* IRawGameControllerStatics methods */
619 raw_game_controller_statics_add_RawGameControllerAdded,
620 raw_game_controller_statics_remove_RawGameControllerAdded,
621 raw_game_controller_statics_add_RawGameControllerRemoved,
622 raw_game_controller_statics_remove_RawGameControllerRemoved,
623 raw_game_controller_statics_get_RawGameControllers,
624 raw_game_controller_statics_FromGameController,
627 static struct windows_gaming_input windows_gaming_input =
629 {&activation_factory_vtbl},
630 {&gamepad_statics_vtbl},
631 {&raw_game_controller_statics_vtbl},
635 HRESULT WINAPI DllCanUnloadNow(void)
637 return S_FALSE;
640 HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID riid, void **out)
642 FIXME("clsid %s, riid %s, out %p stub!\n", debugstr_guid(clsid), debugstr_guid(riid), out);
643 return CLASS_E_CLASSNOTAVAILABLE;
646 HRESULT WINAPI DllGetActivationFactory(HSTRING classid, IActivationFactory **factory)
648 TRACE("classid %s, factory %p.\n", debugstr_hstring(classid), factory);
649 *factory = &windows_gaming_input.IActivationFactory_iface;
650 IUnknown_AddRef(*factory);
651 return S_OK;