title: How to get the filename of a DLL?
body: <p>I have a C++ Windows application myapp.exe which loads several plug-ins.</p>
  
  <p>Plug-ins need to find the path to their DLLs. I can use GetModuleFileName for this, but it need the handle for the plug-in DLL. I don't know where to get this handle. GetModuleHandle(NULL) returns the handle to the executable.</p>
  
  <p>One option is to use GetModuleHandle (GetModuleHandle("myplugin.dll") ) , but this requires the name of the plugin to be hardcoded which I want to avoid.</p>
  
  <p>Any help is appreciated.</p>
  
  <p>Paul</p>