MM_ReserveIOObject

Used to reserve an IO object prior to performing IO.

Local Servers:Blocking
NetWare Server: 5.x
Platform:NLM
Service:Media Manager

Syntax

  LONG MM_ReserveIOObject ( 
      HNDL  *reservationHandle, 
      OBID   objectID, 
      LONG   reservationMode, 
      LONG   alertToken, 
      LONG (*alertRoutine)(  
                OBID   reservationHandle, 
                LONG   alertToken, 
                LONG   alertType, 
                LONG   alertReason ), 
      HNDL   applicationHandle ); 
  
  

Parameters

reservationHandle
This HNDL pointer will contain a reservation handle after a successful reservation.
objectID
The OBID of the IO object to be reserved.
reservationMode
This defines the mode of the reservation. The value of this parameter if either defined mode possibly OR’d with a modifier.

MM_IO_MODE

MM_SHARED_READ_RESERVE

MM_CONTROL_MODE

MM_SHARED_WRITE_RESERVE

 

MM_SHARED_PRIMARY_RESERVE

 

MM_RERESERVE

alertToken
An application-defined token given back to the application by calling alertRoutine.
alertRoutine
A routine for delivering reservation alerts to the application. The application is notified by alertRoutine should some event take place relative to the reserved IO object.

The parameters to the alert routine are as follows:

reservationHandle
The same handle given when the IO object was reserved.
alertToken
The application-specific token given when the reservation was granted.
alertType
This defines the type of alert.
alertReason
This defines the reason for the alert.
applicationHandle
The handle of the application that is reserving the object, obtained by registering an application object with the Media Manager.

Return Values

The following table lists return values and descriptions.

0x00000000

MM_OK

The reservation was granted.

0x00000001

MM_INVALID_OBJECT

objectID is invalid.

0x00000005

MM_INVALID_MODE

reservationMode is invalid.

0x00000006

MM_RESERVATION_CONFLICT

objectID is already reserved and a reservation was not granted.

See Also