Welcome! Log In Create A New Profile

Advanced

Type casting memory block into structure.

Posted by Jimboss 
Jimboss
Type casting memory block into structure.
November 11, 2008 01:53PM
Is it possible to type cast a memory block into a variable(Structure) ?

I use an API call which gives me back a memory block, which is a structure.

In C++ it looks like this:

vBitMap = (BMSTRUCTURE *) DIBPtr ;

Or C#

vBitMap = new BMSTRUCTURE ;
Marshal.PtrToStructure( DIBPtr, VBitMap) ;

So, I am looking for the equivalence of this code in WinDev.

Thanks.
Jimboss
Re: Type casting memory block into structure.
November 11, 2008 03:34PM
I think

Transfer( &VBitMap, DIBPtr, Dimension(VBitmap))

will work. I'll let you know....
Piet van Zanten
Re: Type casting memory block into structure.
November 11, 2008 05:56PM
Hi,

Look at WDAPI in the tools, WDtool control centre.

Regards,
Piet
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: