Do I need to add some special code or something in order to make DLLs, or do normal functions such as int func() work?
well from remembering when i was trying to make dlls in ASM (before my head started to hurt from trying to learn asm) i think you need to make like your own function with a bunch of code and then call that from another program. but if your making windows dlls you need to know about the windows api which i dont because im not that far yet. but im sure they have books about the windows api.
Xception from the GM forum has some great, well-commented examples on his site.
You have to export your functions to be able to import them:
I use this macro:
| CODE |
| #define export extern "C" __declspec( dllexport ) |
it exports as "C" function(without mangled name) and with cdecl calling convention, use it this way:
| CODE |
| export double myfunc() { return 0;} |
Now I know how to do it now. I self-taught myself, whoohoo! (with some help from Xception). :)