Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Intermediate
Jul 30, 1997

App.Path Might Return UNC Path Specifications

Unlike VB4, VB5''''''''s App.Path property might return a UNC path, such as "\\server\programs\..."), under certain circumstances, depending on how the program started and if it''''''''s interpreted in the VB IDE or compiled as a standalone EXE. This change likely affects all applications that use App.Path to set the current directory when the program starts:
 ChDrive App.Path
ChDir App.Path
In fact, because ChDrive cannot handle UNC paths, the code might raise a fatal runtime error, and should be protected using an On Error Resume Next statement. This fix, however, doesn''''''''t protect you under every possible condition. The best approach is to give the end user the capability to set the application directory at run time, then save the entered value in the registry or in an INI file. For more information on this problem and its possible solutions, see article Q167167 in the Microsoft Knowledge Base.
Francesco Balena
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date