Jean-Pierre Drolet wrote:
> How do you build the ini path exactly? Is the VI located in the executable
> or elsewhere?
>
> Can you put an indicator somewhere to see exactly what path is generated in
> the application?
>
> The Open Config Data.vi should work for network path but a quick test
> indicates
> that the Read Key (Path).vi does not work for network path.
> The path \\netpath\c is written in a ini file as //netpath/c and reads back
> as the path
> C:\:netpath\c
>
The culprit here is a pair of functions that are buried in the "Read Key
(Path) and Write Key (Path)"
The functions are "Specific to Common Path" and "Common to Specific Path".
These are not setup to deal with MS networking paths (ie the \\ before the
machine).
The Specifi
c to common simply changes the backslash ( \ ) to a forward slash (
/ ) and stores
this in the ini file.
The Common to Specific path goes a bit further. It takes the string converts
the slashes again,
It looks for forward slash as the first character, if it is the VI strips it
out the first 2 chars,
strips the first of these then builds a string in the form of
:.
That said here is the fix, which involves modifying the VI, so use at your own
risk.
Find the case for the Win95/NT. In the True Case, surround the conversion
with another case. Make the conversion of the inner case false. In the outer
case
use another string subset and examine the 2nd char (just like the original one
only with
an offset of 1). Wite this to the selector of the inner case.
The flow should be like this.
First char slash ?
Yes - Second char slash?
Yes - pass sting unaltered
No - use the original conversions
No - pass string unaltered.
This should solve the probl
em (I hope).
If any of this is unclear let me know and I will mail and or post the modified
version
Kevin Kent