GetLastOSError
- get text of last operating system (Windows) error

Miscellaneous functions
(AFL 4.30)


SYNTAX GetLastOSError()
RETURNS STRING
FUNCTION The function retrieves text of last OS (Windows) error message. It is useful for providing meaningful error reporting in case when you interact with OS (for example opening files or remote Internet sites). See examples.
EXAMPLE // Example 1:

fh = fopen("non_existing_file.txt", "r" );

if( ! fh )
{
   printf("File can not be open because: %s", GetLastOSError() );
}

// Example 2:

ih = InternetOpenUrl("http://non_existing_host.com" );

if( ! ih )
{
   printf("Internet connection can not be open because: %s", GetLastOSError() );
}
SEE ALSO fopen() function , fmkdir() function , frmdir() function , fdelete() function , InternetOpenURL() function

References:

The GetLastOSError function is used in the following formulas in AFL on-line library:

More information:

Updated on-line reference