Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Done Error message texts

Apr
318
7
I would like access to (an array of) messages the _SYSERR variable corresponds to, preferably in the local language.
 
TCC doesn't have a built-in list (array). There are thousands of them. For any particular error, it queries the OS for the text. And I doubt TCC even knows all the possible values of _SYSERR. You could build your own list with something like this (crude, and may take a while). A few error messages will cause the SET, IFF, or ECHO to produce errors themselves.

Code:
do i=0 to 0xFFFFFFFF
    set text=%@errtext[%i]
    iff "%text" NE "" then
        echo %i  %text >> winerrors.txt
    endiff
enddo

I'm running it right now, and have this, so far.

Code:
v:\> head winerrors.txt
0  The operation completed successfully.
1  Incorrect function.
2  The system cannot find the file specified.
3  The system cannot find the path specified.
4  The system cannot open the file.
5  Access is denied.
6  The handle is invalid.
7  The storage control blocks were destroyed.
8  Not enough storage is available to process this command.
9  The storage control block address is invalid.

v:\> tail winerrors.txt
590612  The function completed successfully, but both CompleteToken and this function must be called to complete the context
590613  The logon was completed, but no network authority was available. The logon was made using locally known information
590615  The context has expired and can no longer be used.
590624  The credentials supplied were not complete, and could not be verified. Additional information can be returned from the context.
590625  The context data must be renegotiated with the peer.
590627  There is no LSA mode context associated with this context.
590684  A signature operation must be performed before the user can authenticate.
590688  The recipient rejected the renegotiation request.
590692  The returned buffer is only a fragment of the message.  More fragments need to be returned.
593938  The protected data needs to be re-protected.
 
Speaking of @ERRTEXT: It does not return strings for values 12000 - 12199. These are provided by WinINet.dll.
 
Speaking of @ERRTEXT: It does not return strings for values 12000 - 12199. These are provided by WinINet.dll.
There are wininet APIs to get them but I don't think TCC uses wininet at all.
I believe WINSOCK also has its own collection of error messages (and TCC handles them nicely).
Code:
v:\> echo %@errtext[10060]
A connection attempt failed because the connected party did not properly respond after a period of time,
 or established connection failed because connected host has failed to respond.
 
Back
Top