M
Mauricio Henriquez via .NET 247
(Type your message here)
--------------------------------
From: Mauricio Henriquez
Hi:
I try to convert some VB 6 Webcam (only API calls not special OCXs, DLLs or
anything like that)example to VB .NET, but the VB .NET version have some
error with the traslation of some function, these are some example errors:
'UPGRADE_ISSUE: StrPtr.
lStrCpy(StrPtr(sStatusText), ipstrStatusText) '// Copy message into String
'UPGRADE_ISSUE: VarPtr.
RtlMoveMemory(VarPtr(VideoHeader), lpVHdr, Len(VideoHeader))
How can I do something like the Vb6-VarPtr/StrPtr in VB .NET??
'UPGRADE_ISSUE: vbUnicode.
usStatusText = StrConv(sStatusText, vbUnicode) '// Convert Unicode
Something like Vb-6-vbUnicode for VB .NET??
And finally the VB6 code have some calls like this:
capSetCallbackOnStatus lwndC, AddressOf MyStatusCallback
Where "MyStatusCallback" is defines like this:
Function MyStatusCallback(ByVal lwnd As Long, ByVal iID As Long, ByVal
ipstrStatusText As Long) As Long 'VB6 code
But the VB .NET code give a error:
'UPGRADE_WARNING: Add a delegate for AddressOf MyStatusCallback
capSetCallbackOnStatus(lwndC, AddressOf MyStatusCallback)
Any idea how to fix this for VB .NET??
The VB6 code works greate and work with all VFW capture cards or webcams,
the program show a live image from any video spurce and can copy the image
to the clipboard or compress the video to any system codec installed!!!, If
there are anyone interest in this we can make a VB .NET version for this
code to have live-video in VB .NET!!
Thanks.
--------------------------------
From: Mauricio Henriquez
Hi:
I try to convert some VB 6 Webcam (only API calls not special OCXs, DLLs or
anything like that)example to VB .NET, but the VB .NET version have some
error with the traslation of some function, these are some example errors:
'UPGRADE_ISSUE: StrPtr.
lStrCpy(StrPtr(sStatusText), ipstrStatusText) '// Copy message into String
'UPGRADE_ISSUE: VarPtr.
RtlMoveMemory(VarPtr(VideoHeader), lpVHdr, Len(VideoHeader))
How can I do something like the Vb6-VarPtr/StrPtr in VB .NET??
'UPGRADE_ISSUE: vbUnicode.
usStatusText = StrConv(sStatusText, vbUnicode) '// Convert Unicode
Something like Vb-6-vbUnicode for VB .NET??
And finally the VB6 code have some calls like this:
capSetCallbackOnStatus lwndC, AddressOf MyStatusCallback
Where "MyStatusCallback" is defines like this:
Function MyStatusCallback(ByVal lwnd As Long, ByVal iID As Long, ByVal
ipstrStatusText As Long) As Long 'VB6 code
But the VB .NET code give a error:
'UPGRADE_WARNING: Add a delegate for AddressOf MyStatusCallback
capSetCallbackOnStatus(lwndC, AddressOf MyStatusCallback)
Any idea how to fix this for VB .NET??
The VB6 code works greate and work with all VFW capture cards or webcams,
the program show a live image from any video spurce and can copy the image
to the clipboard or compress the video to any system codec installed!!!, If
there are anyone interest in this we can make a VB .NET version for this
code to have live-video in VB .NET!!
Thanks.