MM_ObjectIO

Used to submit an asynchronous IO request to the IO object defined by the reservation handle passed to this function. This function returns after submitting the IO request.

Local Servers:Non-blocking
NetWare Server: 5.x
Platform:NLM
Service:Media Manager

Syntax

  LONG MM_ObjectIO ( 
     HNDL  *messageHandle, 
     HNDL   reservationHandle, 
     LONG   function, 
     LONG   parameter1, 
     LONG   parameter2, 
     LONG   parameter3, 
     LONG   bufferLength, 
     void   buffer, 
     LONG   requestToken, 
     void ( *callbackRoutine )( 
        LONG   requestHandle, 
        LONG   applicationRequestToken, 
        LONG   returnParameter, 
        LONG  completionCode ) ); 
  
  

Parameters

*messageHandle
Points to a HNDL where the Media Manager will copy the messageHandle associated with this request.
reservationHandle
Identifies the reserved IO object. It is obtained by calling MM_ReserveIOObject.
function
Indicates which IO function is to be performed. For a list of applicable functions, see IO Function Operations.
Parameter1
Defined by the IO function.
Parameter2
Defined by the IO function.
Parameter3
Defined by the IO function.
BufferLength
Defined by the IO function.
buffer
Defined by the IO function.
requestToken
The value of this parameter is defined by the application making this function call. It is returned to the application by the callbackRoutine.
callbackRoutine
Points to a non-blocking callback routine that the Media Manager calls during the completion of the I/O request. Its parameters are as follows:
MessageHandle
The same message handle as given by the output parameter messageHandle for MM_ObjectIO.
requestToken
The same request token passed to MM_ObjectIO.
returnParameter
An IO function-specific return parameter. This is valid only if the request was successful, i.e., completionCode equals MM_OK. Note that many of the IO functions do not return a value in returnParameter.
completionCode
The value indicates the results of the IO request. MM_OK indicates a successful completion. All other values indicate a failure.

Return Values

The following table lists return values and descriptions.

0x00000000

MM_OK

The IO request was submitted successfully.

0x00000004

MM_MEMEORY_ALLOCATION_ERROR

This return value indicates that the IO request could not be accepted due to a memory allocation failure. The application should relinquish the running thread and try the request again.

0x00000005

MM_INVALID_MODE

The function is not valid for the IO object’s reservation mode.

0x00000202

MM_INVALID_RESERVATION_HANDLE

reservationHandle is not a valid reservation handle.

Remarks

It is possible for the callbackRoutine to be called prior to returning from MM_ObjectIO. The application submitting an IO request through MM_ObjectIO can abort the request by passing the value in messageHandle to MM_AbortRequest. IO requests can be aborted only prior to callbackRoutine being called.

See Also