Load Bitmap from Memory

01-25-2005, 07:59 AM

I have a software that creates a Bitmap in C++.
Now I want to load the Bitmap from Visual Basic, without storing the Bitmap to harddisk first.

Is there a possibility to load a Bitmap from Memory? Currently I'm only able to load the bitmap from file (harddisk).


01-26-2005, 09:36 AM
i guess those two applications are definetely different two programs. if this is true it will not be that easy, because the memory bitmap will be unreachable for the VB program, even if vb knows the pointer to the struc., it will cause genral protection error if you try this pointer.

i think the easiest way is to use Clipboard object. Send data to clipboard and get it at the visual basic side via clipboard object. this is the easiest way i guess.

01-27-2005, 10:36 PM
Perhaps (I don't know much about C++) but could you roll the C++ code that creates the bitmap in memory into a C++ Dll? Then it might be able to be accessed by VB.

Here's a page which talks about a little about how this is done (including a bit about the structures involved in passing the data):

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum