OK, I've gotten the dirty work done, and I can load the DLL I want to with no problem, but when I try to call a function I get errors. I can find the functions address, but I can't figure out how to call it AND pass arguments to it. Here is the source I am trying to get working.
videoproc = GetProcAddress(videolib, "CreateMainWindow");
MessageBox(NULL, "Could not create a main window!", "Startup Error", MB_OK | MB_ICONSTOP);
SystemLog("Startup Error: Can't create a primary window.
The 'CreateMainWindow(WINDOW_DATA)' function does just that, creates the main window for my program. When the APP starts it reads a config file and then loads an OpenGL or D3D rendering DLL for the game to use. After that the functions are named identically. So if you have say, a Rage 128 (boo ATI!) and can't run OpenGL worth a darn, the D3D DLL could be used to attain better frames. Anyways, how would I properly call a function with up to four arguments from a DLL I loaded after the APP started?