-
Reading Video Ram
I am a newbie and all you guys are quite advanced. This may be a dumb or trivial question. Is it possible to read the video ram using VB?. I need this capability to do some very simple object recognition by image capture using a camera and the video monitor. The picture is always frozen frame or static, and B/W mode is fine. Any thoughts or help out there would be appreciated.
-
Low-level memory access is blocked on any of the NT OS machines.
In the Win9X family, you can use RtlMoveMemory to directly read (like PEEK in ancient BASIC) memory if you know the address.
for example, pretending that you wanted to read address &HFFAA
Code:
Private Declare Sub RtlMoveMemory Lib "kernel32.dll" (Destination As Any, Source As Any,ByRef Length As SIZE_T )
Dim a as Byte
Call RTLMoveMemory(a,&HFFAA,LenB(a) )
' a now has the value at that memory location
-
If you want to get an image from a camera, look around for "Video for Windows", I use those APIs with my webcam (trying to create my own motion detection at the moment). For still frames my cam also supports TWAIN, so you might want to take a look at that too....