Trouble when using extern on winapi

BlitzMax Forums/BlitzMax Programming/Trouble when using extern on winapi


i.e. the pvParam value is a pointer for most uses of the function, but an Int when using something like SPI_SETMOUSESPEED.



This is not a bug - Max doesn't do function overloading.

You'll have to either cast the parameter to the appropriate type (as you'd have to do in C/C++) or, as you've done, introduce a new function.

My advice would be to declare it the same way it's declared in windows.h, and cast parameters when necessary.