Unregistered
July 26, 2002, 07:41:33
I want to use the MemoryGetDib method so I can transfer an image to a dll for furher processing. The way I see it is that the MemoryGetDIB method gives us a handle, and using GlobalLock I get a pointer to the bitmapinfoheader of a DIB. Since it doesn't work for me I tried the following in Visual Basic.
(only the relevant code is shown...)
dim Dest as BITMAPINFOHEADER
dim PicMemHandle as long
dim PicMemPointer as long
ICImagingControl1.MemorySnapImage
PicMemHandle = ICImagingControl1.MemoryGetDib
PicMemPointer = GlobalLock(PicMemHandle)
CopyMemory Dest, PicMemPointer, Len(Dest)
MsgBox Str$(dest.biSize)
-------
So I thought that the messagebox would show '40' which is the size of the bitmapinfoheader but it displays some big number. Am I missing something?
Thanks for the help
This message was originally posted by Thierry Vanmarcke in the old IC Imaging Control Support Forum.
(only the relevant code is shown...)
dim Dest as BITMAPINFOHEADER
dim PicMemHandle as long
dim PicMemPointer as long
ICImagingControl1.MemorySnapImage
PicMemHandle = ICImagingControl1.MemoryGetDib
PicMemPointer = GlobalLock(PicMemHandle)
CopyMemory Dest, PicMemPointer, Len(Dest)
MsgBox Str$(dest.biSize)
-------
So I thought that the messagebox would show '40' which is the size of the bitmapinfoheader but it displays some big number. Am I missing something?
Thanks for the help
This message was originally posted by Thierry Vanmarcke in the old IC Imaging Control Support Forum.