Here is some raw C code using windows.gaming.input.h
API:
HSTRING gamepadClassName;
if (FAILED(WindowsCreateString(RuntimeClass_Windows_Gaming_Input_Gamepad,
HbArrayLength(RuntimeClass_Windows_Gaming_Input_Gamepad) - 1, &gamepadClassName))) {
Error("Failed to create a WinRT string reference for Windows.Gaming.Input.Gamepad class name.");
}
static IID const gamepadStaticsInterfaceID = { 0x8BBCE529, 0xD49C, 0x39E9, { 0x95, 0x60, 0xE4, 0x7D, 0xDE, 0x96, 0xB7, 0xC8 } };
if (FAILED(RoGetActivationFactory(gamepadClassName, &gamepadStaticsInterfaceID, &HbInputi_Windows_Gamepad_Statics))) {
Error("Failed to get the IGamepadStatics activation factory for Windows.Gaming.Input.Gamepad.");
}
WindowsDeleteString(gamepadClassName);
Is there any way to get rid of this gamepadStaticsInterfaceID
GUID definition in code? I tried to use IID___x_ABI_CWindows_CGaming_CInput_CIGamepadStatics
declared in windows.gaming.input.h
header but then then I have error LNK2001: unresolved external symbol IID___x_ABI_CWindows_CGaming_CInput_CIGamepadStatics
.
What lib should I link to properly define IID___x_ABI_CWindows_CGaming_CInput_CIGamepadStatics
?