02-01-2007 11:55 AM
Do you need the entire installer or just the assembly?
The installer is 141 MB.
Brian
02-01-2007 11:56 AM
Also, I'm not sure if this matters, but I pointed directly to the assembly when using the .NET constructor, I couldn't find it in the GAC.
Brian
02-01-2007 01:33 PM
02-01-2007 02:03 PM
I've uploaded the file. Its the Clear....zip
Thanks!
Brian
02-02-2007 09:36 AM
02-02-2007 05:48 PM
Hi Bilal,
I'm pretty in the dark on how to interact with the COM API. The only example they have given me is actually in matlab, where there is a builtin actvxserver function that creates aan activex server based on an id you give it of the object. (the id being 'ClearVu.ClearShotCamera') I thought that I could use the activex wizard but the create server required files I dont' have, and the create controller didn't work because there is no server.
They also suggested I try a queryinterface method call (available in microsoft compilers i guess?) and then write more code from there.
02-02-2007 05:54 PM
They also gave me this (although in my registry the id i find is different)
Other than that, I was given this (although in my registry the guid is different):
Full Com Interface:
[Guid("6bf38cad-afa6-11da-958c-00e08161165f")]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
public interface _ClearShotCamera
{
[DispId(1)]
bool clearshot_Open();
[DispId(2)]
bool clearshot_Open(string szSerialNumber);
[DispId(3)]
void clearshot_Close();
[DispId(4)]
bool clearshot_TakeImage();
[DispId(5)]
bool clearshot_TakeDarkImage();
[DispId(7)]
bool clearshot_IsCameraOpen();
[DispId(10)]
double clearshot_GetExposureTime();
[DispId(11)]
void clearshot_SetExposureTime(double dExposureTime);
[DispId(18)]
bool clearshot_SupportsOnboardCalibrations();
....
i deleted most of the functions to fit the message
02-02-2007 06:31 PM
You assembly is private (not in the GAC) and so its path must be registered with CVI before calling the initialize function (or any other wrapper function). You can register the path of the assembly as follows by calling the CDotNetRegisterAssemblyPath library function with the full name of the assembly - the full name of the assembly is available in the __assembly constant in the generated source code. Make sure you pass the appropriate path on your machine.
Centice_Spectrometer_Cameras_ClearShotCamera handle;
CDotNetRegisterAssemblyPath("Spectrometer, Version=0.0.58.30567, Culture=neutral, PublicKeyToken=49c4cf89e31b0bb4",
"c:\\Program Files\\Centice\\ClearVu\\Spectrometer.dll");
Initialize_Spectrometer();
Centice_Spectrometer_Cameras_ClearShotCamera__Create(&handle, 0);
02-05-2007 09:47 AM
02-05-2007 12:34 PM
Thanks guys, that was it!
Brian