8WAYRUN.com

Slayer_X64
Slayer_X64
Alright, im still a novice myself, but i'll do my best to help you. here's what you do:

you would write what you want in the DLL and compile it as a DLL(remember to write the code so that the DLL exports the functions so that they can be used by other applications through use of the _declspec(dllexport) keyword). next you can either link the DLL implicitly or explicitly.
Slayer_X64
Slayer_X64
to link it implicitly, you'll have to provide a header containing the declarations of the exported functions/classes. then you would link the import library(.lib or .a, probably .lib since its windows)(created when you compiled the dll) into your compiler. and finally of course, you'd need your actual DLL in the directory of the executable.
Slayer_X64
Slayer_X64
to link explicitly, when writing your executable, load the dll into memory using "LoadLibrary". then use "GetProcAddress" to obtain a function pointer to each of the exported functions within the dll so that you can actually use whats inside. And when you're done with the dll, use "FreeLibrary" to free it from the programs memory.
Zane
Zane
holy shit, got it. Thanks man! and you sure as hell don't sound like a novice :p
Slayer_X64
Slayer_X64
haha well i try my best. Until im able to produce something meaningful(in my case, some kind of game or the like), i havent accomplished anything notable enough to say i know how to program. im just a guy who can write a few lines of C++ code(and really thats the truth of it XD)
Slayer_X64
Slayer_X64
plus ive been pretty lazy when it comes to learning programming - i tend to put things off and forget about them over other things. right now im dabbling in assembly, but soon enough i'll be back on c++ or whatever else catches my attention at the time. what i really need is a focus - thats what uni will be for.
Zane
Zane
Slayer_X64
Slayer_X64
sure you could give it a try if you like. i've always been one to do book study, and to read things on the web. but everybody works differently right?
Zane
Zane
Yeah totally. I'm also gonna take those courses once I start college. Are you going to major in anything/?
Back