Advertisement

Accessing a DLL's function from another DLL

Started by April 11, 2001 08:26 PM
2 comments, last by Remnex 23 years, 10 months ago
I am either stupid, or not doing something correctly, but here it goes I have my game split into three different parts: Engine, Rendering DLL, and Game DLL. I have correctly setup all the functions for the Rendering DLL that the engine will need to do all the graphics. But, the GameDLL contains some functions that require access to the rendering DLL''s functions. I can''t seem to get it to work. I do not however, want to link the LIB from the rendering DLL, as I plan on releasing the SDK (source for GameDLL) after the game is done. I have tried including the header from the rendering DLL using DirectDraw that I made, but that didn''t work. Any ideas? Thanks ------------------------------ "I''m a decorated astronaut, I don''t make those kind of mistakes." "Oh now wait a minute. Look I''ll show ya. I''ll enter the same calculations using what we like to call ''The Right Way''." -Rem
------------------------------"I'm a decorated astronaut, I don't make those kind of mistakes.""Oh now wait a minute. Look I'll show ya. I'll enter the same calculations using what we like to call 'The Right Way'."-RemZirem Software
When you load a dll, you can pass parameters to the export fonction.

Simply pass a pointer to your renderer object or whatever you need.

Advertisement
basically you can do it on of two other ways:
1. you copy and paste the functions that you need from the Rendering DLL and compile it like that or
2. you can use LoadLibrary and GetProcAddress to access the functions (works pretty fast actually)
Gorg, how would I got about doing that?



------------------------------
"I''m a decorated astronaut, I don''t make those kind of mistakes."
"Oh now wait a minute. Look I''ll show ya. I''ll enter the same calculations using what we like to call ''The Right Way''."

-Rem
------------------------------"I'm a decorated astronaut, I don't make those kind of mistakes.""Oh now wait a minute. Look I'll show ya. I'll enter the same calculations using what we like to call 'The Right Way'."-RemZirem Software

This topic is closed to new replies.

Advertisement