[ Previous | Next | Contents | Glossary | Home | Search ]
The graPHIGS Programming Interface : Subroutine Reference

GPDTR - Detach Resource

GPDTR (type, id)

Purpose

Use GPDTR to detach a resource from your application. The resource becomes unavailable to your application.

The id parameter specifies an identifier that your application assigned to the resource. The type parameter is used to identify the type of resource that is specified by the id parameter. For example, if the type parameter specifies 1=WORKSTATION , then the id parameter is used to specify a workstation identifier (wsid) to be detached.

If the specified resource type is 1=WORKSTATION all events from the specified workstation are removed from the event queue. If the specified workstation is the last open workstation, the workstation state value is set to Workstation Closed (WSCL)

If the specified resource type is 2=STRUCTURE_STORE all events from the specified structure store are removed from the event queue. If the current structure state is Structure Open (STOP) and the specified structure store is currently selected, then the current open structure is closed. As a result, the structure state is set to Structure Closed (STCL) If the current structure state is Structure Closed (STCL) and the specified structure store is the currently selected structure store, it is removed from the currently selected structure store entry of the graPHIGS API state list. As a result, the structure state is set to Structure Store Open (SSOP) If the specified structure store is the last structure store attached to the shell, then the structure state is set to Structure Store Closed (SSCL)

If the specified resource type is 5=ARCHIVE_FILE and if the specified archive file is the last open archive file, then the archive state value is set to Archive Closed (ARCL)

Parameters

type -- specified by user, fullword integer

Resource type (1=WORKSTATION, 2=STRUCTURE_STORE, 3=IMAGE_BOARD, 4=FONT_DIRECTORY, 5=ARCHIVE_FILE )

id -- specified by user, fullword integer

Identifier of the resource to be detached.

Error Codes

25
SPECIFIED WORKSTATION DOES NOT EXIST
147
EVENT QUEUE HAS OVERFLOWED
211
RESOURCE TYPE IS INVALID
220
SPECIFIED ARCHIVE FILE DOES NOT EXIST
222
SPECIFIED STRUCTURE STORE DOES NOT EXIST
232
SPECIFIED IMAGE BOARD DOES NOT EXIST
242
SPECIFIED FONT DIRECTORY DOES NOT EXIST

Related Subroutines

GPATR
Attach Resource
GPCLAR
Close Archive File
GPQATR
Inquire List of Attached Resources

RCP code

201341698 (X'0C003B02')


[ Previous | Next | Contents | Glossary | Home | Search ]