Need help porting eVC Header file to VB.NET (VEO CF Camera)

  • Thread starter Thread starter Jamie
  • Start date Start date
J

Jamie

Greetings,

I am attempting to use the VEO Photo Traveler CF Camera which has a
eVC-based SDK. I am having problems converting the Header file from
eVC to VB.NET and wondered if anyone had any pointers or general rules
to guide me.

Thanks,


Jamie
 
I've extracted this from an existing project that worked with PhotoTraveler CF. I could share the rest but you would have to dig through it - it was a two-night job for a rush demo.

[DllImport("veocamapi.dll")]
static public extern CAM_ERRORS CamOpen(out IntPtr phCam);

[DllImport("veocamapi.dll")]
static public extern CAM_ERRORS CamClose(IntPtr hCam);

[DllImport("veocamapi.dll")]
static public extern CAM_ERRORS CamStartPreview(IntPtr hCam, IntPtr previewhwnd);

[DllImport("veocamapi.dll")]
static public extern CAM_ERRORS CamPreviewDatatoRGB24(IntPtr hCam, CamResolution resolution, byte[] buffprev, int length, byte[] buffrgb24);

[DllImport("veocamapi.dll")]
static public extern CAM_ERRORS CamPreviewData(IntPtr hCam, byte[] buff, out int length);

[DllImport("veocamapi.dll")]
static public extern CAM_ERRORS CamPreviewDatatoJPG(IntPtr hCam, CamResolution resolution, byte[] buffprev, int length, byte[] buffjpg, ref int jpglength);

[DllImport("veocamapi.dll")]
static public extern CAM_ERRORS CamStopPreview(IntPtr hCam);

[DllImport("veocamapi.dll")]
static public extern CAM_ERRORS CamStartSnapshot(IntPtr hCam, string filename, CamResolution resolution);

[DllImport("veocamapi.dll")]
static public extern CAM_ERRORS CamSetPreviewResolution(IntPtr hCam, CamResolution resolution);

}

public enum CAM_ERRORS
{
E_NOERR =0, //No error
E_NOCAM, //No Camera
E_NOMEMORY, //No enough memory
E_ERRPARAMETER, //Input parameter is wrong
E_NOSUPPORTTED, //This function is not supported in current driver
E_DECODE, //Error during decode
E_OTHERERR //Other unknown error
};

public enum WhiteBalance
{
ENV_AWB =1, //Auto white balance
ENV_FLUORESCENT, //Fluorescent light
ENV_INCANDESCENT, //Incandescent light
ENV_OUTDOOR //Outdoor light
};

public enum CamResolution
{
RES_640 =1, //VGA 640x480 Resolution, only supported in snapshot
RES_320, //QVGA 320x240 Resolution, supported in snapshot and preview
RES_160 //QQVGA 160x120 Resolution, supported in snapshot and preview
};
 
Alex,

Thank you for th response, I will try working through what you posted.
If you could, please send me the balance of the sourcecode and I will
work through it and furnish a commented copy back to you.

Thanks,

Jamei
 
Back
Top