Can anyone suggest a way to do MAKEINTRESOURCE ?

BlitzMax Forums/BlitzMax Programming/Can anyone suggest a way to do MAKEINTRESOURCE ?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Wow I did better than I expected. I don't really use C much so it was like walkin around in the dark.

filename "makeintresource.c"
#ifdef __cplusplus
extern "C"{
#endif

//macros
#define MAKEINTRESOURCE(i) (char*)((long)((short)(i)))

//functions
void *bbMAKEINTRESOURCE( short resource ){
    return MAKEINTRESOURCE(resource);
}


Tell me if that is correct or not (It works perfectly just dunno if its doing any harm)

The bmax code to use it is:
Import "makeintresource.c"

Extern
	Function MAKEINTRESOURCE$z(resource:short) = "bbMAKEINTRESOURCE"
End Extern