Announcement

Collapse
No announcement yet.

GetDllFileName() ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • GetDllFileName() ?

    Is there a way to get the file (and Path) of a Dll from inside that Dll?

    In an EXE I would use: GetModuleFileName(), but this returns the .EXE name and path even in a Dll with that Dlls hInst.

    I have searched the Win API but cant find anything with Dll filename in it.

    ------------------
    Kind Regards
    Mike

  • #2
    see http://www.powerbasic.com/support/pb...ead.php?t=3731



    ------------------
    lance
    powerbasic support
    mailto:[email protected][email protected]</a>
    Lance
    mailto:[email protected]

    Comment


    • #3
      Thx Lance,

      Actually I am trying to write a function that I can compile with any of my Dlls. Its a registration funtion.

      As future Dlls will have different names I was hoping I would not have to remember to go into this function and change the name of the Dll each time.

      Is there a way to get the Dlls Filename and Path without specifying the name explicitly?

      ------------------
      Kind Regards
      Mike

      Comment


      • #4
        mike --
        see my (first) reply in http://www.powerbasic.com/support/pb...ead.php?t=3408

        [this message has been edited by semen matusovski (edited may 16, 2001).]

        Comment


        • #5
          You are THE man Semen. On the money as allways.

          I thought I had tried that (hInst) and it gave me the EXEs filename still, but I guess I was tired and did not notice.

          Anyways Mucho thx

          ------------------
          Kind Regards
          Mike

          Comment

          Working...
          X