Scalabium Software

SMExport/SMImport suites
Knowledge for your independence'.
Home Delphi and C++Builder tips


#98: How can I retrieve a full path of module in DLL?

If you develops the dll, in some tasks you must know the full path of this\par dll but not the path of application from which was ran this library.
For this task you must use the GetModuleFileName function. View a sample:

var
   DLLFileName: PChar;
begin
  GetMem(DLLFileName, MAX_PATH+1);
  if (DLLFileName <> nil) then
    GetModuleFileName(hInstance, DLLFileName, MAX_PATH);
...
end;

So in pDLLFileName variable you'll have the full path value.


Published: September 22, 2000

See also
 
ABA Database Convert
Clarion to Text converter/a>
DBExport tools
SMMsg suite
SMExport suite
Metafile Convert
Excel Reader (dll)
Paradox to Text converter
Viewer for TNEF-files (winmail.dat)
MAPIMail
 
 


Contact to webmaster

 

Borland Software Code Gear Scalabium Delphi tips

Copyright© 1998-2017, Scalabium Software. All rights reserved.
webmaster@scalabium.com

SMExport advertising