//#include "Code_Log.hpp"
//#include "Code_Pointer.hpp"
//#include "Code_Script.hpp"
#include "Code_Dll.hpp"
#include <iostream>
using namespace std;
int main() {
Code::DllLibrary Lib;
Lib.LoadLibrary("SDL.dll");
if (!Lib) {
cout << "Couldn't load SDL.dll...";
return 1;
}
void (*pSDL_Delay)(unsigned milliseconds) = NULL;
pSDL_Delay = Lib.LoadFunction<void (*)(unsigned)> (
"SDL_Delay"
);
if (!pSDL_Delay) {
cout << "Couldn't load SDL_Delay...";
return 1;
}
for (bool Done = false; !Done;) {
cout << "How many milliseconds do you want to delay: ";
unsigned milli = 0;
cin >> milli;
cout << "\n";
pSDL_Delay(milli);
}
}
No .lib only .dll?
Yup, you can use it all like that. Thats why DLL's are so powerfull, and why COM works. structs, yeah, unfortunately, you will have to redefine them by hand. Sorry...
Quote:Original post by KaptainKomunist
Yup, you can use it all like that. Thats why DLL's are so powerfull, and why COM works. structs, yeah, unfortunately, you will have to redefine them by hand. Sorry...
Cool stuff! This is sooo interesting!
Thank you. I was more on the side of "will it work" rather than "i will do it" anyways.. It's just that I'm wondering.
To teh opengl gurus, isn't this basically the way to use opengl greater than v.1.1?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement