Re: How do MAKEINTRESOURCE in Euphoria?
- Posted by mattlewis (admin) May 16, 2013
- 2122 views
ArthurCrump said...
I am trying to wrap an API which wants me to use MAKEINTRESOURCE.
I thought I knew enough C to know what the C code for this meant, but I seem to have forgotten it all.
Can somebody tell me the Euphoria equivalent of the MAKEINTRESOURCE macro? It seems to be defined as:
#define MAKEINTRESOURCEW (x) ((LPWSTR) (U_LONG_PTR) (WORD) (x))
This appears to be casting to a WORD (16-bit unsigned) and then up into a pointer, so you should be able to do:
function MAKEINTRESOURCE( atom x ) return and_bits( 0xffff, x ) end function
Matt