i'm not that experienced with dll's... so please bear with me on this one... basically i have a design question for you...
the scenario is this: i have a library that i want to distribute to someone as a dll, so they can use part of the functionality of the library... but only a very small part of it... so what i planned to do is have a wrapper around one class in the library that would allow limited access to a single class in the library...
this is a basic example of how i thought i could do it:
//the original library class
int openSpecialImage(char* filename);
int getSpecialImageColour(int x, int y);
//the exported dll 'wrapper' class
class class __declspec(dllexport) ExportedSpecialImage
int openExportedSpecialImage(char* filename);
int getExportedSpecialImageColour(int x, int y);
///and in the ExportedSpecialImage.cpp
special_image = NULL;
int ExportedSpecialImage::openExportedSpecialImage(char* filename)
int ExportedSpecialImage::getExportedSpecialImageColour(int x, int y)
return special_image->getSpecialImageColour(x, y);
the problem is that in my ExportedSpecialImage.h file, i need to import the 'SpecialImage.h" and i also have a member variable of type 'SpecialImage'... which would mean i could not just send the .dll and 'ExportedSpecialImage.h'.... i would also have to send 'SpecialImage.h'.... and whatever header files it depends on.... wouldn't I?? so basically i want to limit the exposure of 'SimpleImage' somehow....
so that's my dilemma... how to do this 'wrapper' class... without exposing anymore of the library than necessary...? does that make any sense?
it may be that i am just being stupid... but i can't figure out how to do this one.... any help/thoughts greatly appreciated!! thanks.