Howdy, Stranger!

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


How to get DLL Path

arash82arash82 Member Posts: 106
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.


  • arash82arash82 Member Posts: 106

    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));
  • heinduplessisheinduplessis Member Posts: 3
    Awesome thanks, helped me!!
Sign In or Register to comment.