Use one single DLL library to import other libraries at runtime

Posted by Yifan on Stack Overflow See other posts from Stack Overflow or by Yifan
Published on 2010-04-16T05:23:16Z Indexed on 2010/04/16 6:13 UTC
Read the original article Hit count: 253

Filed under:
|
|
|
|

I am writing a Win32 DLL library that can be redistributed. I am using different versions of the windows API because I want to support Windows 7 functions, but still have support for Windows 2000 (with some function disabled). What I have currently is MyLib2000.dll, MyLibXP.dll, and MyLibVista.dll, and my application chooses which library to load at runtime. I want a way to have a single DLL (MyLib.dll) that stores the other three in itself and when it's being loaded, it extracts the correct DLL out of itself and loads it.

I know this is not the best way to do this, so suggestions on another method of doing this is welcome.

© Stack Overflow or respective owner

Related posts about c++

Related posts about windows-sdk