DLL hinstance with in the same dll

267 Views Asked by At

I have an MFC dll with is used in an application.This Dll doesn't have DLLMain function.Now how do i retrieve hinstance of the said dll with in the dll?I am using VS 2010.

1

There are 1 best solutions below

0
On

GetModuleHandle function will return the HINSTANCE of the dll or the exe. Pass the name of your dll as the first argument.

https://msdn.microsoft.com/en-us/library/windows/desktop/ms683199(v=vs.85).aspx