#65276 - 2002-05-08 04:04 AM
Re: Manually set @error value or . . .
|
Shawn
Administrator
   
Registered: 1999-08-13
Posts: 8611
|
Charles,
Background on that readprofilestring() thingy ?
I went searching on the internet looking for documentation on this, and couldn't find anything anywhere. Even at MSDN, it's more what the documentation doesn't say, than what it does say. First, here's a thread that has some comments from the developer of Kixtart:
Topic: Old, minor bug, still there.
Here's a link to the actual API calls for ReadProfileString and WriteProfileString:
GetPrivateProfileString
WritePrivateProfileString
If you look under "return code" for WritePrivateProfileString, you will see that one can use GetLastError() to get extended error info. If you look under "return code" for GetPrivateProfileString, there is no mention of GetLastError() - thats because MS designed this particular API to be pretty much bullet proof.
One of the parms to GetPrivateProfileString is a default value to be returned if an error does occur. If you provide a bad filespec or non-existent key, whatever, you'll get this default returned.
So you can trust me on this one, I've actually tried it, if you code a call to GetPrivateProfileString() in C or VB, and you provide bad data, no error will be returned and GetLastError will return 0.
In terms of the EXIT and UDFs - might try the QUIT statement - like QUIT(1) - that should do the trick.
-Shawn
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 988 anonymous users online.
|
|
|