Re: Info

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Alejandro Lapeyre (AlejandroLapeyre_at_spamhotmail.com)
Date: 03/17/05


Date: Thu, 17 Mar 2005 03:50:13 -0300


> BYTE *pImage;
> pImage = (BYTE *) (calloc(1, 2555*256));

Translates to:

Dim imageBuffer((2555*256)-1) as byte

> ItfCaptureFrame (0, pImage, 0)
>
> I Invoke ItfCaptureFrame using:
> Declare Function ItfCaptureFrame Lib "ItF32.DLL" (ByVal wChannel, ByVal
> lpImage, ByVal wOptions) As Integer

You have to change this declaration to:

Declare Function ItfCaptureFrame Lib "ItF32.DLL" ( _
    ByVal wChannel as integer, _
    ByRef lpImage as Byte(), _
    ByVal wOptions as integer) As Integer

then:

    ItfCaptureFrame(0, imageBuffer, 0)

Best Regards,
Alejandro Lapeyre

"Carlos Salazar via .NET 247" <anonymous@dotnet247.com> escribió en el
mensaje news:u9yF7v0IFHA.3916@TK2MSFTNGP14.phx.gbl...
> Hi,
>
> I am a new user of VB .NE and I have to migrate an app written in cpp to
> VB .NET and I don't know how to write that (I tried...but I couldn't):
>
> BYTE *pImage;
> pImage = (BYTE *) (calloc(1, 2555*256));
> ItfCaptureFrame (0, pImage, 0)
>
> I Invoke ItfCaptureFrame using:
> Declare Function ItfCaptureFrame Lib "ItF32.DLL" (ByVal wChannel, ByVal
> lpImage, ByVal wOptions) As Integer
>
> And the def of ItfCaptureFrame is:
> ITSTATUS ITAPI ItfCaptureFrame(WORD wChannel, LPBYTE lpImage, WORD
> wOptions);
>
> Thanks a lot
>
> --------------------------------
> From: Carlos Salazar
>
> -----------------------
> Posted by a user from .NET 247 (http://www.dotnet247.com/)
>
> <Id>uRp/Mkaoz0OGBhN+RluRSg==</Id>