Passing Bitmap from C to Neko using CFF

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Passing Bitmap from C to Neko using CFF

Ramu p
Hi List,

I am trying to use CFF in Neko.
One of my methods, named recieveBitmap, is succesfully being called by C but I am confused how to pass my bitmap data (of type HBITMAP) which is in C to Neko.

Below is my C code: (function_storage is the pointer holding my Neko method, recieveBitmap reference)

BOOL SaveBitmap(HDC hDC,HBITMAP hBitmap,char* szPath)
{
    val_callN(*function_storage, alloc_object(hBitmap), 1 );
}

Below is my Hx code:

static function receiveBitmap(bitmapData:Dynamic){
    trace("BITMAP recieved is : "+bitmapData);
}

When I compile the above, I was told below warnings:
 warning: passing arg 1 of `neko_alloc_array' makes integer from pointer without a cast
 warning: passing arg 2 of `neko_val_callN' from incompatible pointer type

I am suspecting my allocation process is wrong i.e, alloc_object(hBitmap)!!

Any ideas on how to pass that HBITMAP to Neko?

Thanks in advance.

Regards,
Ram

--
haXe - an open source web programming language
http://haxe.org