Page 4 of 5

Re: .net wrappers for c++ SDK

Posted: Tue Oct 25, 2011 4:44 am
by jjreilly
I figured out the problem. If you don't set the CAMERALIBRARY_IMPORTS macro, you get bizarre behavior, as previously described. It seems to run most of the time under the debugger, but not at all sans debugger. Once setting that, it works w/ VS 2010 Express debug & release builds outside of the IDE.

-reilly.

Re: .net wrappers for c++ SDK

Posted: Wed Oct 26, 2011 4:10 am
by johnbsys
Reilly,

Can you show me an example of how you are referencing the cameralibrary.dll in .net? I cannot seem to get it to work.

Thanks.

Re: .net wrappers for c++ SDK

Posted: Thu Oct 27, 2011 2:20 am
by Robbie86
[quote=johnbsys]Reilly,

Can you show me an example of how you are referencing the cameralibrary.dll in .net? I cannot seem to get it to work.

Thanks. [/quote]

You must not reference the cameralibrary.dll this is only possible if its enabled for COM.

You need to create an Managed C++/CLI DLL arround the native DLL. Then you can reference the Managed DLL in your .NET project.

Re: .net wrappers for c++ SDK

Posted: Mon Nov 28, 2011 8:50 am
by jjreilly
@johnbsys,

I don't really understand your question. The .NET wrapper (NPCameraSDKDotNet) is a C++/CLI-coded .NET assembly, but it is a C++ project mostly. So that project links to cameralibrary.lib to resolve symbols. That means the resulting .NET assembly will try to dynamically load the cameralibrary.dll. Therefore the DLL must be in the application's path, as is usual for any ole DLL.

A .NET project will need a .NET "reference" to NPCameraSDKDotNet.dll (assembly). How you do that is mechanical based upon the language / IDE of your choice. What is your question: how to use Microsoft Visual Studio to use the assembly? Or how to build the wrapper assembly?

-reilly.

Re: .net wrappers for c++ SDK

Posted: Thu Dec 01, 2011 12:54 pm
by nbviper
Looking at this example code (not the wrapper itself)
http://code.google.com/p/kinearx2dotserver/

This appears to be using the older OptiTrack DLL, am i missing something? I'm attempting to expand the Wrapper for my needs but would like to make sure I have some baseline code that I know works.

Thanks!

Re: .net wrappers for c++ SDK

Posted: Mon Dec 05, 2011 1:48 pm
by NaturalPoint - Mike
This does appear to be based off of the OptiTrack SDK, not the current Camera SDK.

Re: .net wrappers for c++ SDK

Posted: Tue Jan 31, 2012 3:32 pm
by leith
Sorry. Been busy for a while.

I have not published an updated version of kinearx that uses the new wrappers. Though I do have a hacked version of it somewhere that does.

But yea, its using the older code. So it will not help you.

My newer apps that I was using this wrapper for, were using unity3d on a mac as a application framework. and I can confirm, its totally possible to use the wrapper to get your tracking data streaming across the network and into a client application on a mac. such as a game engine.

-brad

Re: .net wrappers for c++ SDK

Posted: Mon Mar 19, 2012 4:08 am
by AlanSL
Hi, Everyone!

I'm a newcomer in working with this Camera SDK.

Could you please, advice,
where can I find some code samples, based on this wrapper, which work with frames.

It woould be very helpfull! Thank you!

Re: .net wrappers for c++ SDK

Posted: Tue Mar 20, 2012 9:21 pm
by leith
Just a note: I'm putting thought into how best to update the wrappers and keep them up to date more easily. One thing has caught my eye as a possibility:

http://tirania.org/blog/archive/2011/Dec-19.html

Going to keep an eye on it. It's unclear if it has relevance on windows. But it might.

If anyone has thoughts, I'm all ears.

Re: .net wrappers for c++ SDK

Posted: Sat Mar 24, 2012 3:22 am
by AlanSL
Brad,

Thank you for this link.
But, how to use this tool? I couldn't find any "how to" instruction ?
Thanks for advance!