LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DESPERATE: DirectX\DirectInput with LV 6.01

I am trying to read 4 USB joysticks via the MS DirectInput8 COM in Win98. DirectX 8.0a is installed and I am able to monitor joystick input via the properties control panel, but I am unable to establish any connection with DirectInput via LabView.

There is no ActiveX control available for the container. There is a vbSubClass._SubClasser control (vb_subclass.ocx) that has a DirectX icon.

The only seemingly related class available to Automation Open is the 'DirectX 8 for Visual Basic Type Library Version 1.0' which fails the Automation Open with an error code -2147467262 and no ActiveX methods or properties are exposed.

Attempts to call the DirectInput API DirectInput8Create in dinput8.dll via the Cal
l Library function fail with the error code -2147467261. I am unsure whether I am correctly reconciling the data types necessary for the call.

I have successfully used both the Call Library function and the ActiveX Server Automation in examples, but now that I have the 4 joysticks and a USB capable OS I am stuck.
0 Kudos
Message 1 of 3
(3,073 Views)
The dll you are referring to may need to be registered. The following webpage shows how to do this:

http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/4f811a9b23f1d46e862566f700615b7a?OpenDocument

When trying to locate the ActiveX controls that I want to use in LabView one thing I do is open up the registry and search the HKEY_ClASSES_ROOT\TypeLib folder for a key word -- in your case a good key word would be input8. If the search finds a subfolder that contains the search word then look through its sub-sub folders and you should find an entry referencing a path and a filename -- it's usually a dll, ocx, olb, or tlb file. Then, in LabView, drop an automation refnum on the front panel, right mouse click on it, select 'Select ActiveX Class' >> Brows
e... Click the Browse button and navigate to the ActiveX file. Click Okay. You should now have access to the ActiveX object's properties and methods.

Chris_Mitchell
Product Development Engineer
Certified LabVIEW Architect

0 Kudos
Message 2 of 3
(3,073 Views)
Than you for responding to my question, unfortunately I have already tried your suggestions. The class appears registered yet my original conditions persist.
0 Kudos
Message 3 of 3
(3,073 Views)