Howdy, Stranger!

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

Sign In with Facebook Sign In with Google Sign In with OpenID


We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

How to get DLL Path

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

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