Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. COM
  4. To Retrieve Path of a DLL file.

To Retrieve Path of a DLL file.

Scheduled Pinned Locked Moved COM
questioncomhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    georgekjolly
    wrote on last edited by
    #1

    Hi all , How can I get the path of a COM DLL ?? I am using this way.. Inside DLL , I am writing this code. /******************************************************/ HINSTANCE g_hInst; TCHAR szModule[MAX_PATH]; g_hInst = _Module.GetModuleInstance(); GetModuleFileName(g_hInst, szModule, MAX_PATH); /*******************************************************/ I am getting the Path . But am getting in this form.. "D:\THINVI~1\INTEGR~1.DLL" . The tilt sign makes the folder and file names incomplete . My actual path is "D:\THINVISITS_14-2-07\INTEGRALHOTBAR.DLL" So how can I get my dll path in the complete form without Tilt(~).. Please Help Me Thanks George.

    S 1 Reply Last reply
    0
    • G georgekjolly

      Hi all , How can I get the path of a COM DLL ?? I am using this way.. Inside DLL , I am writing this code. /******************************************************/ HINSTANCE g_hInst; TCHAR szModule[MAX_PATH]; g_hInst = _Module.GetModuleInstance(); GetModuleFileName(g_hInst, szModule, MAX_PATH); /*******************************************************/ I am getting the Path . But am getting in this form.. "D:\THINVI~1\INTEGR~1.DLL" . The tilt sign makes the folder and file names incomplete . My actual path is "D:\THINVISITS_14-2-07\INTEGRALHOTBAR.DLL" So how can I get my dll path in the complete form without Tilt(~).. Please Help Me Thanks George.

      S Offline
      S Offline
      Stephen Hewitt
      wrote on last edited by
      #2

      Add an additional call to GetLongPathName.

      Steve

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups