Getting memory address out of c into bmax

BlitzMax Forums/BlitzMax Programming/Getting memory address out of c into bmax

Like this :-

In BMaxgl.c
int texture=90;

//test function
long ptrGetTexture()
{
	return &texture;
}


In my gl.mod folder use:-
Import "BMaxGL.c"

Extern
	Function ptrGetTexture:Int()
EndExtern

Function glGetTexturePTR:Int()
	Return ptrGetTexture()
End Function


Then I create program file to get the address of the texture I use :-
Import nrg.gl

Print glGetTexturePTR()


This seems to give me the address. Is this what you mean??

Thanks