CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2000
    Location
    Birmingham, England
    Posts
    2,520

    Resolving %CommonProgramFiles%

    Hi

    Been a long time since I coded anything, but revisiting an old project to make it work on Vista has thrown up a problem I cannot remember how to resolve

    I'm fetching a registry key containing "%CommonProgramFiles%\System\wab32.dll"

    LoadLibrary() on this string fails. Is there a library function to resolve %CommonProgramFiles% to its actual location (i.e. c:\program files\common in most cases)

    Thanks
    Jase

    Jase

    www.slideshowdesktop.com
    View your images and photos on your desktop with ease using SlideShow Desktop, the desktop wallpaper manager for Microsoft Windows.
    ...

  2. #2
    Join Date
    Jun 2006
    Location
    M31
    Posts
    885

    Re: Resolving %CommonProgramFiles%

    Quote Originally Posted by jase jennings
    Is there a library function to resolve %CommonProgramFiles% to its actual location (i.e. c:\program files\common in most cases)
    Yeah, ExpandEnvironmentStrings is a handy function.

  3. #3
    Join Date
    Mar 2000
    Location
    Birmingham, England
    Posts
    2,520

    Re: Resolving %CommonProgramFiles%

    Thankyou

    Exactly what I was looking for. All is well now

    Jase

    Jase

    www.slideshowdesktop.com
    View your images and photos on your desktop with ease using SlideShow Desktop, the desktop wallpaper manager for Microsoft Windows.
    ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured