imaq: not a valid adapter (2)

2 views (last 30 days)
Stephen Fulghum
Stephen Fulghum on 8 Nov 2011
I switched to Visual Studio 2010 Professional from Express and quickly got the stub adaptor built for my 64-bit machine using the Image Acquisition Toolbox Adaptor Kit. When I try and register it I get the "not a valid adaptor... Was the shared library created using the ... Kit?" response. Any thoughts as to why? The User's Guide expects success and offers no help.
  1 Comment
Roland
Roland on 9 Nov 2011
I have compiled the DLL following scrupulously the instructions provided in the adaptorkit pdf document, and I get the same result!
I used Visual Studio 2008 express edition on a regular 32 bit machine.
Did you ever manage to build an acceptable adaptor with 2008?

Sign in to comment.

Accepted Answer

Roland
Roland on 9 Nov 2011
Hi Stephen,
I had Mathworks over the phone and here is the walkthrough that allowed me to get the stub adaptor from p44-45 working correctly. First download dependencywalker available freely from the web. Launch it and open your adaptor DLL. You should see one window detailing the functions included within the DLL. you should have five of them: uninitializeAdaptor initializeAdaptor getDeviceAttributes getAvailHW createInstance
I was missing the latter one, meaning there was somehow something not compiling properly regarding.
I compared the function from the adaptorkit.pdf with the one from the demo project mwdemoimaq. The declaration of the createInstance parameters is different. So I modified my project accordingly and hey presto it worked:
imaqkit::IAdaptor* createInstance(imaqkit::IEngine* engine,const imaqkit::IDeviceInfo* deviceInfo,const char* sourceType){...
I hope this is helpful and good luck with this.
Best regards,
Roland

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!