Page 1 of 1 1
Topic Options
#75338 - 2003-06-10 08:43 AM Bug: ReadProfileString returns string whithout ""
Schuliebug Offline
Hey THIS is FUN
*****

Registered: 2002-01-18
Posts: 379
Loc: Netherlands
Is this a bug or is it by design..

When using ReadProfileString() to read the next ini file (defines a shortcut to create only if requirements are met)..
code:
[%USERPROFILE%\Start Menu\Programs\Route66 Benelux 2003.lnk]
Exe=%ProgramFiles%\Terminal Services Client\Mstsc.exe
StartPath=%programfiles%\Terminal Services Client
Parameter="Route66 Europe"
Comment=Route66 Europe 2003
DialUp=3
Required=MSI 2.0|Terminal Server Client 5.0

..it returns as Parameter the string whithout ""! When putting something in front, say..
code:
[%USERPROFILE%\Start Menu\Programs\Route66 Benelux 2003.lnk]
Exe=%ProgramFiles%\Terminal Services Client\Mstsc.exe
StartPath=%programfiles%\Terminal Services Client
Parameter=test "Route66 Europe"
Comment=Route66 Europe 2003
DialUp=3
Required=MSI 2.0|Terminal Server Client 5.0

it works fine!

Is this a bug or is it by design ?? It doesn't work for 4.21, 4.12..
_________________________
Kind regards,

Top
#75339 - 2003-06-10 10:07 AM Re: Bug: ReadProfileString returns string whithout ""
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
it's by design.
and I think it's more like ini-file design than kixtart-ini-read thing.

the quote mark explicitly marks the value as string...
_________________________
!

download KiXnet

Top
#75340 - 2003-06-10 11:15 AM Re: Bug: ReadProfileString returns string whithout ""
Schuliebug Offline
Hey THIS is FUN
*****

Registered: 2002-01-18
Posts: 379
Loc: Netherlands
Thats correct, but it only does this if the complete string is whithin quote marks (see the second example) [Frown] Does somebody has a workaround for this ??
_________________________
Kind regards,

Top
#75341 - 2003-06-10 11:17 AM Re: Bug: ReadProfileString returns string whithout ""
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
try:
Parameter='"Route66 Europe"'
_________________________
!

download KiXnet

Top
#75342 - 2003-06-10 11:50 AM Re: Bug: ReadProfileString returns string whithout ""
Schuliebug Offline
Hey THIS is FUN
*****

Registered: 2002-01-18
Posts: 379
Loc: Netherlands
I just wanted to post this solution ;-)
_________________________
Kind regards,

Top
#75343 - 2003-06-10 11:52 AM Re: Bug: ReadProfileString returns string whithout ""
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
you should have read it [Wink]
just posted it when you asked [Big Grin]
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1114 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.054 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org