473,326 Members | 2,110 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

VB .NET webcam example

(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.

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>jIZSEoatWEaq/x4B0WoBIQ==</Id>
Nov 20 '05 #1
1 15399
Hi,

Here is a link to an example. Does not include functions to store
the video.
http://www.vb-helper.com/howto_net_video_capture.html

Varptr.
http://www.planet-source-code.com/vb...=463&lngWId=10

Callback functions
http://msdn.microsoft.com/library/de...kfunctions.asp

And finally all strings are unicode in vb.net no need to convert.

Ken
--------------
"Mauricio Henriquez via .NET 247" <an*******@dotnet247.com> wrote in message
news:e1****************@TK2MSFTNGP12.phx.gbl...
(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.

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>jIZSEoatWEaq/x4B0WoBIQ==</Id>

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Kelowna | last post by:
Yes... Its a server os... i kno! i hav xp yea but tis system is for screwing with.. Im sure theres alot of ppl here tat kno tis stuff inside-out! im doing this for educational purposes so dont give...
4
by: Joakim Rylander | last post by:
Hi all, I need to create a public booth where people can look at themselves in a webcam and snap a picture which will be seen on a webpage. The backend is easy, it's the webcam part that I have...
0
by: Elp | last post by:
Hi, We have developped an client application in C#. Among other things, this application should display in 4 different windows (or 4 different panels in the same window), 4 webcam streams (web...
4
by: Mathieu Chavoutier | last post by:
Hi. Is it possible to do a program that show the "film" that is currently on our webcam ? I do not have a Webcam for the moment, so, if you have advices to chose a Webcam compliant (with what...
0
by: Steve | last post by:
Hi Can anyone please tell me how to use a webcam on a form. I have done an app that uses a webcam, but I have used the drivers for that webcam. Now I need to use a different camera on a...
4
by: RahulM | last post by:
Hi i want to write a application where i should be able to show the webcam output. How do i develop this in VB. THe web cam had a USB interface. Its drivers are installed. Is there a OCX for...
3
by: DillonCzerny | last post by:
Hello Many times I see a lot of people post webcam videos on google video or youtube. I wonder how do they record it from those people’s webcam? I have a fake webcam and I want to record some...
13
by: Berco Beute | last post by:
I've been trying to access my webcam using Python, but I failed miserably. The camera works fine under Ubuntu (using camora and skype), but I am unable to get WebCamSpy or libfg to access my...
5
by: frakie | last post by:
Hi there, I need a simple and stupid few line source code to access my webcam. I found lots of huge projects (c++ c and other) which are so big that they are impossible to be used. Does somebody...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.