VB code example WIP
Posted: 25 March 2010 06:33 AM   [ Ignore ]
New Member
Rank
Total Posts:  23
Joined  2010-01-18

Hi!

I have just started to create an application for the CLEyeCam on VB.
My first step was just to import one function from the dll and see if it works.

This is my class

Public Class CLEyeCameraDevice

    
Public Declare Function CLEyeGetCameraCount Lib "CLEyeMulticam.dll" () As Integer

End 
Class 

And this is the code for testing the function

MsgBox("Num of Cameras found: " CLEyeCameraDevice.CLEyeGetCameraCount()) 

now i get a runtime error saying

A first chance exception of type 'System.BadImageFormatException' occurred in EyeCam.exe 

what am I doing wrong? do i have to initialize anything first?

Thanx for any help.

@admins, I would be willing to provide my source code, if my app will be finished, as an example for VB in the future

Profile
 
 
Posted: 25 March 2010 06:58 AM   [ Ignore ]   [ # 1 ]
New Member
Rank
Total Posts:  23
Joined  2010-01-18

OK, found the problem..on my win 7 x64 System, VB defaults to x64 when i use “Any CPU” build configuration.
You have to set it manually to x86, now it works! Woohoo..

I will update this thread with information and my progress regarding VB + EyeCam.

Profile
 
 
Posted: 27 March 2010 02:30 PM   [ Ignore ]   [ # 2 ]
New Member
Rank
Total Posts:  5
Joined  2010-03-24

Hey Chuck, I’m trying to follow your steps to port the API to Python.

I already achieve to Get Camera Count, this is my code:

from ctypes import cdll,c_int
lib = “/Program Files/Code Laboratories/CL-Eye Platform SDK/Bin/CLEyeMulticam.dll”
dll=cdll.LoadLibrary(lib)
dll.CLEyeGetCameraCount()

it returns “2” as I was expecting.

Your example help me for do that, but now… i want to know what do you do then… for example… declaring CL-Eye Multicam Variables and using the CLEyeCameraInstance CLEyeCreateCamera(CamUIID as GUID, CLEyeCameraColorMode, CLEyeCameraResolution, Framerate as int) function.

Maybe you can post all the process you made to get the cameras working on VB

Thanks in advance

Profile
 
 
 
 


RSS 2.0     Atom Feed