Introduction

Language Structure

IB Statements

File System

Comet 32 Runtime

Index

Winsock Gateway

 

Control:          GETERROR

 

Syntax:           result-string = CONTROL(lun,"GETERROR")

 

Description:    The GETERROR control returns the last Winsock error. When a Comet exception is taken on a given command, the Winsock error may be evaluated programmatically by using this function.

 

Return values:          

 

GETERROR returns the Windows Sockets error (a 5-byte value) in the result-string. See the list of Winsock Error Codes for more information.

 

Exceptions:     EXCP 45   A syntax error was detected parsing the GETERROR command string.

 

Example:        LENGTH 5.0 & LOCAL ErrorNum

            LENGTH 1.0 & LOCAL Err

            LENGTH 80 & LOCAL A$

            .

            .

            .

            A$ = CONTROL(1,"GETERROR")

            ErrorNum = NUM(SUB(A$,1,5),Err)

            IF ErrorNum EQ 10061 THEN

              PRINT "The connection was refused by host."

            ENDIF