Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Vista Newsgroups > Vista file management

Vista - How to resolve symbolic links in code?

Reply
 
Old 12-05-2006   #1 (permalink)
MueMeister


 
 

How to resolve symbolic links in code?

Hi there,

Short question: How can I resolve the real path of a destination
including sympoic links?

Scenario:
1.) I install an application under C:\Prgogramma\myapp where
c:\Programma is not a physical path. The shortcut created on the
desktop also contains this *pseudo* path.

2.) Now if I want to us ::LoadLibrary() with
"C:\Programma\myApp\mylib.dll" the call fails because it really tries
to load the DLL on this path (which does not exist). Same issue for
GetModuleFileName().

Do I have to 'translate' the path into a physical one via another
function first?
Any ideas?
TIA
Mue :-)

My System SpecsSystem Spec
Old 12-05-2006   #2 (permalink)
Jimmy Brush


 
 

RE: How to resolve symbolic links in code?

Hello,

Are you referring to symbolic links or shell shortcuts? If you mean shell
shortcuts, you will need to use the shell API to dereference them:

http://msdn.microsoft.com/library/de...s/shortcut.asp

If you actually mean symbolic links and junctions, they are decoded for you
automatically by the operating system, and you don't have to do anything
special in your program to work with them - they look and feel to your
program as if they were normal folders.

Here is more information on symbolic links / junctions:

http://msdn.microsoft.com/library/de...olic_links.asp

http://msdn.microsoft.com/library/de..._junctions.asp

--

- JB
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Can not create symbolic link to a file - symlink to directory is O Vista General
Junction points and symbolic links Vista General
Symbolic links can only be create in the console? Vista General
Junction, Symbolic Link and a Custom Dir Function PowerShell
Symbolic Links Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46