Atik Cameras

Author Topic: Atik 490ex Custom Adaptor - SDK Help  (Read 5345 times)

rcalderon

  • Newbie
  • *
  • Posts: 2
Atik 490ex Custom Adaptor - SDK Help
« on: June 12, 2014, 11:05:46 pm »
Hello all,

So, I'm building a custom dll to control the Atik 490ex using Visual Studio C++ 2010 for a target x64 machine. To do this, I'm using (include in Atik SDK)
ArtemisHSC.cpp
ArtemisHSC.h
at compile time and then linking ArtemisHSC.dll at run-time.

To start, I was able to link and compile my dll. I then store ArtemisHSC.dll in the same folder as my dll. The problem is when I try to use (ArtemisLoadDll(char * FileName)) which calls LoadLibrary. The function call cannot find Atik dll and thus nothing works.

I've tried:

- Using LoadLibrary(_T('fileName')) macro
- Using the full path to file "C:\\Users\\Folder\\ArtemisHSC.dll"

My Visual Studio properties are set to run Multi-Byte encoding (not UNICODE), but I have tried UNICODE with the same problem.

Any help would be greatly appreciated.

mjpurcell79

  • Newbie
  • *
  • Posts: 1
Re: Atik 490ex Custom Adaptor - SDK Help
« Reply #1 on: April 21, 2016, 05:32:25 pm »
Well, it looks like it's been quite a while since you posted and no responses... Not a good sign! I am having the same problem right now. I'm new to C/C++ and I'm trying to write a program to control this camera in coordination with some other equipment. LoadLibrary just doesn't seem to return anything but NULL, no matter how I pass the file name / path for ArtemisHsc.dll.

Did you every figure out the issue?

ChrisGolden

  • Atik Staff
  • Full Member
  • *****
  • Posts: 161
Re: Atik 490ex Custom Adaptor - SDK Help
« Reply #2 on: April 22, 2016, 11:46:44 am »
Hi There,

Here's a quick guide to using the dll:

First, you need to download and install the core installer (it doesn't matter if it's the BETA or not). Make sure you tick the 'Software Development Kit' box in the components list. After that, if you open the SDK folder in the ArtemisCCD directory (It will probably be C:\Program Files (x86)\ArtemisCCD\SDK) you should find two files: ArtemisHscAPI.h and ArtemisHscAPI.cpp. You need to add these files to your project. These files contain all the functions you can use with the dll and adding these files allows the compiler to know these methods exists. Before you can actually use them, you will need to make the following call:

ArtemisLoadDLL("ArtemisHsc.dll");

You should do that at the beginning of your application, before trying to use any other Artemis function. "ArtemisHsc.dll" will be located in your system files (C:\Windows\SysWOW64 or System32 depending on operating system) and windows will look there when calling this function.

At the end you can use

ArtemisUnLoadDLL();

To free the resources.

I hope that helps.

Chris