How to get DLL Path

How do I get the Full Path for a DLL (e.g. C:mydll.dll).

With applications you can use ParamStr(0), but if I use the ParamStr(0) function I get the Path of the application that calls the DLL.


  • Hi,

    I found the answer. Sorry if I was too rushed in putting out the question but here is the answer anyway. Maybe someone else will find it useful :)

    [b]library[/b] MyDLL;


    [b]procedure[/b] ShowLibraryPath;
    Buffer: Array[0..260] [b]of[/b] Char;
    GetModuleFileName(hInstance, Buffer, Length(Buffer));
  • Awesome thanks, helped me!!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!