-1

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 Answers1

1

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

EylM
  • 5,967
  • 2
  • 16
  • 28