GUI ScreenIO for Windows

 ScreenIO.com


GetWindowsDirectory

This API returns the Windows directory (example:  C:\WINDOWS).

Client/Server issues

This API will return the Windows directory of the client.

To obtain the Windows directory of the server:

     SET WIN32API-EXECUTE-API-ON-SERVER TO TRUE

Files

Files available to copy to your system:

Usage

     COPY WIN32API.
     COPY GWINDIR.


     
* ------------------------: Call the API.
*
     SET API-GETWINDOWSDIRECTORY TO TRUE.

     CALL 'GSWINAPI' USING WIN32API-PARMS
                           GWD-DIRECTORY
                           GWD-BUFFER-LENGTH
                           GWD-BYTES-RETURNED
                           WIN32API-D
                           WIN32API-E
                           WIN32API-F.

Parameters specific to this function

GWD-DIRECTORY

Buffer that will receive the pathspec of the Windows directory; may be any length.

GWD-BUFFER-LENGTH

Size of GWD-DIRECTORY.  Example of use:

     MOVE LENGTH OF GWD-DIRECTORY TO GWD-BUFFER-LENGTH.

GWD-BYTES-RETURNED

Length of filespec returned in GWD-DIRECTORY.  If GWD-BUFFER-LENGTH was not large enough, this will be the number of bytes required.

WIN32API-PARMS - Used in all GSWINAPI calls

This argument is standard for all CALLs to GSWINAPI. It is used to select the desired API or function, and to return the status of the operation.

WIN32API-RC

Used to return the status of a call to GSWINAPI.  A value of zero is a failure, any other value indicates success.

Recommended usage is to test the 88-level value WIN32API to see if it worked, then to use the text error message to see why it failed.

* ------------------------: If function failed,
*                         :   display the error in a message box.
*
     IF WIN32API-FAILED
       MOVE WIN32API-ERROR-TEXT TO panel-MESSAGE-TEXT
       SET panel-MESSAGE-IN-MESSAGEBOX TO TRUE.

WIN32API-ERROR-CODE

Error code that was returned by Windows.  This is not generally useful unless you have the Windows Platform SDK documentation available to you.

WIN32API-ERROR-TEXT

Plain-text error message that describes why the operation failed.

WIN32API-A through WIN32API-F

The number of these present varies depending on how many arguments are used by the desired function.  These are not used, but must be present because this CALL requires seven arguments.


© 2000-2019 Norcom, all rights reserved 

TOC

Send feedback to Norcom