DaXiiD
12-25-2007, 07:35 PM
Hi!
I am trying to get data from an external device (logitech MOMO wheel in this case) by using dotNET and DirectX DirectInput. Well I am stuck at the beginning... almost.
The biggest problem is that I can't get a "productGuID" or a "InstanceGuID" from my device.(or from a keyboard, mouse).
The code:
dotnet.loadAssembly "Microsoft.DirectX.DirectInput"
Manager = dotNetclass "Microsoft.DirectX.DirectInput.Manager"
DeviceClass = dotNetclass "Microsoft.DirectX.DirectInput.DeviceClass"
EnumDevicesFlags = dotNetclass "Microsoft.DirectX.DirectInput.EnumDevicesFlags"
Devicedataformat = dotnetclass "Microsoft.DirectX.DirectInput.Devicedataformat"
gameControllerList=Manager.GetDevices DeviceClass.gamecontrol EnumDevicesFlags.AttachedOnly
gameControllerList.MoveNext()
test=gameControllerList.current
test.productname
test.productGUID
rool=dotNetobject "Microsoft.DirectX.DirectInput.Device" test.productguid
rool.Acquire()
And maxscript response:
dotNetObject:System.Reflection.Assembly
dotNetClass:Microsoft.DirectX.DirectInput.Manager
dotNetClass:Microsoft.DirectX.DirectInput.DeviceClass
dotNetClass:Microsoft.DirectX.DirectInput.EnumDevicesFlags
dotNetClass:Microsoft.DirectX.DirectInput.DeviceDataFormat
dotNetObject:Microsoft.DirectX.DirectInput.DeviceList
true
dotNetObject:Microsoft.DirectX.DirectInput.DeviceInstance
"Logitech MOMO Racing USB"
dotNetObject:System.Guid
dotNetObject:Microsoft.DirectX.DirectInput.Device
undefined
Messy code, sorry about that.
What am I doing wrong. I can't wrap my head around it. Any input on this is much much appreciated.
I am trying to get data from an external device (logitech MOMO wheel in this case) by using dotNET and DirectX DirectInput. Well I am stuck at the beginning... almost.
The biggest problem is that I can't get a "productGuID" or a "InstanceGuID" from my device.(or from a keyboard, mouse).
The code:
dotnet.loadAssembly "Microsoft.DirectX.DirectInput"
Manager = dotNetclass "Microsoft.DirectX.DirectInput.Manager"
DeviceClass = dotNetclass "Microsoft.DirectX.DirectInput.DeviceClass"
EnumDevicesFlags = dotNetclass "Microsoft.DirectX.DirectInput.EnumDevicesFlags"
Devicedataformat = dotnetclass "Microsoft.DirectX.DirectInput.Devicedataformat"
gameControllerList=Manager.GetDevices DeviceClass.gamecontrol EnumDevicesFlags.AttachedOnly
gameControllerList.MoveNext()
test=gameControllerList.current
test.productname
test.productGUID
rool=dotNetobject "Microsoft.DirectX.DirectInput.Device" test.productguid
rool.Acquire()
And maxscript response:
dotNetObject:System.Reflection.Assembly
dotNetClass:Microsoft.DirectX.DirectInput.Manager
dotNetClass:Microsoft.DirectX.DirectInput.DeviceClass
dotNetClass:Microsoft.DirectX.DirectInput.EnumDevicesFlags
dotNetClass:Microsoft.DirectX.DirectInput.DeviceDataFormat
dotNetObject:Microsoft.DirectX.DirectInput.DeviceList
true
dotNetObject:Microsoft.DirectX.DirectInput.DeviceInstance
"Logitech MOMO Racing USB"
dotNetObject:System.Guid
dotNetObject:Microsoft.DirectX.DirectInput.Device
undefined
Messy code, sorry about that.
What am I doing wrong. I can't wrap my head around it. Any input on this is much much appreciated.
