Results 1 to 5 of 5

Thread: Retrieve an internet shortcut target ?[Resolved]

  1. #1

    Thread Starter
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

    Resolved Retrieve an internet shortcut target ?[Resolved]

    Is there a working code that does this ? I found few examples but they don't seem to work . I'd prefer not to use any COM Interop .

    Thanks
    Last edited by Pirate; May 6th, 2005 at 03:01 AM.

  2. #2

    Thread Starter
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

    Re: Retrieve an internet shortcut target ?[Resolved]

    Got it !

  3. #3
    Hyperactive Member Sgt-Peppa's Avatar
    Join Date
    Mar 2003
    Location
    Munich - Germany
    Posts
    476

    Re: Retrieve an internet shortcut target ?[Resolved]

    It would be nice if you could post the code, for future searchers!
    Keep Smiling - even if its hard
    Frankie Says Relax, wossname Says Yeah!
    wossname:--Currently I'm wearing a gimp suit and a parachute.
    C# - Base64 Blog

  4. #4
    Frenzied Member DeadEyes's Avatar
    Join Date
    Jul 2002
    Posts
    1,196

    Re: Retrieve an internet shortcut target ?[Resolved]

    For future reference a .url file is just an ini file
    Code:
    [InternetShortcut]
    URL=http://www.vbforums.com

  5. #5

    Thread Starter
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Sure , it's easy like this :

    Code:
    		private string ParseURL (string URLFile)
    		{
    			string url="";
    			if (File.Exists(URLFile))
    			{
    				StreamReader sr=new StreamReader(URLFile);
    				while (sr.Peek() != -1)
    				{
    					if (sr.ReadLine().StartsWith("[InternetShortcut]"))
    						url=sr.ReadLine();
    				}				
    				sr.Close();
    			}
    			return url;
    		}

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