SDK C# Examples on Vista 64

Post Reply
JaredFleming
Posts: 4
Joined: Tue May 19, 2009 3:00 pm

SDK C# Examples on Vista 64

Post by JaredFleming »

I've attempted to run the OptiTrack c# Multi-camera example on Vista64, but the application generates an error. In addition, I wrote my own C# application that uses the optitrack.dll. That application crashes as well. From my initial testing it appears that Vista 64 throws an exception as soon as my code hits anything to do with the optitrack.dll.

Does anyone have any insight for me?
JaredFleming
Posts: 4
Joined: Tue May 19, 2009 3:00 pm

Re: SDK C# Examples on Vista 64

Post by JaredFleming »

Couple Points of Clarification:

1) The samples and my application work fine on Windows XP.
2) All code is compiled with Visual Studio 2005.
3) The Vista64 error generated is not useful. It just tells me the application had to close.
JaredFleming
Posts: 4
Joined: Tue May 19, 2009 3:00 pm

Re: SDK C# Examples on Vista 64

Post by JaredFleming »

I found the problem. For 64-bit platforms (XP64 and Vista64) when you use 3rd party COM DLLs you sometimes need to set your "Platform Target" to "X86". Visual Studio defaults to "Any CPU". It may be useful for NaturalPoint to update their sample projects to reflect this need.
JaredFleming
Posts: 4
Joined: Tue May 19, 2009 3:00 pm

Re: SDK C# Examples on Vista 64

Post by JaredFleming »

Just another note. The problem seems to still occur on XP64. Vista64 works fine.
ProjectPalitoy
Posts: 54
Joined: Tue Apr 21, 2009 4:13 am

Re: SDK C# Examples on Vista 64

Post by ProjectPalitoy »

[quote=JHF]I found the problem. For 64-bit platforms (XP64 and Vista64) when you use 3rd party COM DLLs you sometimes need to set your "Platform Target" to "X86". Visual Studio defaults to "Any CPU". It may be useful for NaturalPoint to update their sample projects to reflect this need. [/quote]

Thats great but could you go into a little more detail on how you do this please?
ichevarria
Posts: 2
Joined: Tue Feb 23, 2010 4:00 am

Re: SDK C# Examples on Vista 64

Post by ichevarria »

Thanks, JHF, I had the same problem, but with your solution, it works. ProjectPolitoy, you have to click on the "Any CPU" combo in the visual studio interface, then go to configuration manager and add the x86 configuration. Then you compile with that and it works. I am working with a Windows 7 x64, but the sample code only works with the x86 configuration.
Post Reply