C# - OptiTrack.dll ?

Share source code samples for use with the Camera SDK
johnbsys
Posts: 15
Joined: Mon Oct 10, 2011 4:20 pm
Location: Iowa

C# - OptiTrack.dll ?

Post by johnbsys » Mon Oct 10, 2011 6:30 pm

HELP!! I am trying to access my TrackIR 5 in a C# WPF program. I'm a newbee and just downloaded the Camera SDK Version 1.1.1. I could find no OptiTrack.dll that is referenced many times throughout the forums. I found one at Kinearx2DOTNodeSetup but I cannot get a simple class create statement to work.

public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
OptiTrack.NPCameraCollectionClass cc = new OptiTrack.NPCameraCollectionClass();
}
}

I get the error:

"Retrieving the COM class factory for component with CLSID {1CA83C6F-70A6-40EB-836F-D9EEC0BD168F} failed due to the following error: 80040154."

Any guidance would be GREATLY appreciated.

Thanks!

NaturalPoint - Mike
Posts: 1896
Joined: Tue Feb 01, 2011 8:41 am
Location: Corvallis, OR

Re: C# - OptiTrack.dll ?

Post by NaturalPoint - Mike » Wed Oct 12, 2011 3:17 pm

Hello -

First things first, the TrackIR is not intended for use with the SDK. It is a gaming peripheral, and while it is compatible with the SDK, technical support for this application is not guaranteed. The Camera SDK is intended for use with the OptiTrack line.

Having said that, Check out sysinternals for process explorer and listdlls. They may be able to help you trace the issue and find the missing components.

johnbsys
Posts: 15
Joined: Mon Oct 10, 2011 4:20 pm
Location: Iowa

Re: C# - OptiTrack.dll ?

Post by johnbsys » Wed Oct 12, 2011 4:57 pm

Mike thanks for your reply. It looks like my System32/MSCOREE.DLL is missing GPSVC.DLL and IESHIMS.DLL. I am running Vista 64 Professional. Will dig further unless you have any suggestions?

NaturalPoint - Mike
Posts: 1896
Joined: Tue Feb 01, 2011 8:41 am
Location: Corvallis, OR

Re: C# - OptiTrack.dll ?

Post by NaturalPoint - Mike » Wed Oct 12, 2011 5:09 pm

Based on this error, the first thing I would do is re-install your MS Visual Basic Runtimes (both x86 and x64) for 2005, 2008 and 2010.

Edit: Also check your .net framework and ensure you have the proper versions installed, and they are up to date.

johnbsys
Posts: 15
Joined: Mon Oct 10, 2011 4:20 pm
Location: Iowa

Re: C# - OptiTrack.dll ?

Post by johnbsys » Wed Oct 12, 2011 6:52 pm

I'm writing apps with .NET 4.0 and VS 2010 C# and MS Expression Blend with no problems. Everything is current. I did some research and it was able to copy an IESHIMS.dll to Windows/sysWOW64. that took care of half the problem. I copied a different versions of GPSVC.DLL into Windows/SysWOW64 and now Dependencey Walker gets an error saying that the gpsvc.dll in SYSTEM32 is 64 bit. When I delete the one in sysWOW64 it reverts back to gpsvc.dll not found. :-(
Still searching....

johnbsys
Posts: 15
Joined: Mon Oct 10, 2011 4:20 pm
Location: Iowa

Re: C# - OptiTrack.dll ?

Post by johnbsys » Wed Oct 12, 2011 7:22 pm

I found MILLIONS of references to this issue on Google, but no solutions. GPSVC.dll show up as 64-bit thus throwing an error.
Still searching....

LinusA
Posts: 37
Joined: Mon Nov 08, 2010 8:43 am
Location: Aachen, Germany
Contact:

Re: C# - OptiTrack.dll ?

Post by LinusA » Thu Oct 13, 2011 3:52 pm


NaturalPoint - Mike
Posts: 1896
Joined: Tue Feb 01, 2011 8:41 am
Location: Corvallis, OR

Re: C# - OptiTrack.dll ?

Post by NaturalPoint - Mike » Fri Oct 14, 2011 9:34 am

Do you have both a 32 bit version and a 64 bit one? The 32 bit should be in syswow and the 64 bit version should be in system32.

johnbsys
Posts: 15
Joined: Mon Oct 10, 2011 4:20 pm
Location: Iowa

Re: C# - OptiTrack.dll ?

Post by johnbsys » Sun Oct 16, 2011 2:42 pm

Linus, Thanks for the response. I did see that link and I am building it in x86 mode but I still get the same error.

Mike, That is what I though also but everything I have read shows that GPSVC.dll is dynamically loaded so that it works for both 32 or 64 bit apps.

I am wondering if the OptiTrack.dll from Kinearx2DOTNodeSetup is not the most recent version??

Still searching.....

johnbsys
Posts: 15
Joined: Mon Oct 10, 2011 4:20 pm
Location: Iowa

Re: C# - OptiTrack.dll ?

Post by johnbsys » Mon Oct 17, 2011 9:44 am

I started from scratch. Checked out and installed Kinearx2DOTNodeSetup_v1_0.msi

Checked out and built Source code:

svn checkout http://kinearx2dotserver.googlecode.com/svn/trunk/ kinearx2dotserver-read-only

During formLoad it makes it down to the statement:

Program.CameraCollection = new OptiTrack.NPCameraCollectionClass();

Then never comes back to finish the procedure. No errors, nothing in the application error log. It just does not come back from that statement. I placed breakpoints on this statement and the one after it and it does not hit the second breakpoint.

Any thoughts?

Thanks.



private void formLoad(object sender, EventArgs e)
{
TreeNode tn = new TreeNode("Cameras");
Program.CamerasNode = tn;
this.explorer.Nodes.Add(tn);
Program.CameraCollection = new OptiTrack.NPCameraCollectionClass();
Program.CameraCollection.DeviceArrival += new _INPCameraCollectionEvents_DeviceArrivalEventHandler(CameraCollection_DeviceArrival);
Program.CameraCollection.DeviceRemoval += new _INPCameraCollectionEvents_DeviceRemovalEventHandler(CameraCollection_DeviceRemoval);
Program.CameraCollection.Enum();
}

Post Reply