How to check dll version?
Hi,
I have got a vc6.0 project from my coleague. There are many dlls in this
project and export many functions. So in the main application, there are
bunch of "GetProcAddrss". I don't this kind of style.
I have a little knowledge of COM but do not have many experience, so I don't
want to use COM.
I want to export a class for every dll. The code like below:
//public interface file
class IHardwareInterface{
public:
virtual DWORD GetHost()=0;
virtual DWORD AddHost()=0;
...
};
extern "C" __declsepc(dllexport) IHardwareInterface* CreateInstance();
//implement file
class CHarewareImpl : public IHardwareInterface
{
...
};
Now, if in main application, I only need to create an interface for every
dll. I don't have to write bunch of "GetProcAddess". If I want to add more
export functions, I should update the interface class. What I worried about
is if I use the old dll, main application will not report any errors when
call "CreateInstance". It will report an error when I call the new function.
Is there any method to check whether the dll is consistent with the
interface file?
Any advice is appreciated. Thanks in advanced.