Re: [GD-Windows] GetProcAddress()
Brought to you by:
vexxed72
From: Erwin de V. <er...@vo...> - 2001-10-17 10:37:25
|
> A perhaps better way of using DLLs is to have each DLL export one factory > function for the kind of services it implements, and return an interface > implementing all the services. All function calls into the DLL will then be > routed through this one interface. The interface could consist of a simple > aggregation of a procedural API, or factory functions for the kinds of > classes the DLL exports, or something fancier (such as something you can > query for other interfaces by name). In effect, you'd be hand-rolling > something COM-like, without the additional management/installation overhead > of COM. Yes! Thanks for the idea. I just tested it, and it is exactly what i wanted, except for the factory create function, but i can obviously live with that. =) I knew there must be some way to use DLL's in a normal manner. > Another approach, if you don't need the run-time loading, is to just let > your app link against the .LIB link library at link time, and reference all > the functions directly. This is still a win compared to statically linking > everything if you expect some parts of the system to rev much more often > than others. Thats not what i want, because i want to dynamically link to our renderer. Erwin |