So i made my first dll as my first real program in C. However I am a bit confused as to what part of my code does. I hadn't seen it anywhere or in any tutorials and used it anyways. My DLL is:
What bothers me is the (bool). I haven't seen it anywhere. Does it simply define GetFocus() as boolean then return the result into "focus"? Or is there more too it? There is nothing wrong with the code, it works just fine, just a bit curious.
Look up "c-style cast". This is simple a cast converting whatever GetFocus returns into a bool. No idea why it is then being assigned to a double though...
Hmm.. seems like I was correct, data conversion and what not. Also that data may imply loss between data types is what I found(which makes sense). Such as you'll lose the .01 of float 4.01 when converting it to an integer.
Anyways the boolean value is being assigned as a double for Game Maker. It seems Game Maker can only pass doubles and strings through DLLs.