Page 1 of 1 1
Topic Options
#68750 - 2002-07-30 06:56 PM READPROFILESTRING Error Codes
Anonymous
Unregistered


Hello KiX-Users,

just to make sure if this is correct:

$var=readprofilestring($file,"Section","key")

returns allways @error=0 although file does not exist. Has anyone encountered the same problem?
I am using KiX 4.10 RC2, KiX 4.10 final on Win2k SP2 and Win XP Pro.

Thank you,

Fabian Koehlmann

Top
#68751 - 2002-07-30 07:04 PM Re: READPROFILESTRING Error Codes
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
yes.
that's correct. it was discussed pretty deeply some months ago.
only way to check for success is to see if it returns something.
so, outputting 0 as output is no goodie [Big Grin]
_________________________
!

download KiXnet

Top
#68752 - 2002-07-30 07:06 PM Re: READPROFILESTRING Error Codes
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Hi Fabian ... yes, apparently this is a known documented problem to do with the underlying API that Ruud uses (GetPrivateProfileString) ... it doesn't return errorcodes like most other API's do - it returns the number of bytes read - I guess Ruud just discards it into the bit-bucket.

Have to do a couple of things ... insure that the file exists with the EXIST() function, and make sure to provide the fully qualified filepath to READPROFILESTRING() ...

[ 30 July 2002, 19:30: Message edited by: Shawn ]

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 1636 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.032 seconds in which 0.016 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