Video Manager

This chapter describes the functions, called by the Video Manager (VMAN), that are designated by the prefix VMI_CMD_. Refer to Graphics Adapter Device Drivers for descriptions of the Graphics Hardware Interface functions and to Enhanced Direct Interface Video Extension (EnDIVE) Functions for descriptions of the EnDIVE functions.

VMI_CMD_xx Functions and GHI_CMD_xx Functions
There are only a few differences between the VMAN protocol, Video Manager Interface (VMI), and the GRADD protocol, Graphics Hardware Interface (GHI). In fact, the majority of the functions are identical, with only the prefix (VMI or GHI) indicating to which component the function belongs.

The common functions are as follows:

Note: The VMI_CMD_QUERYCHAININFO function has no corresponding GHI function.

VMAN and GRADD Entry Points
The main difference between the two types of functions (VMI_ and GHI_) is that the ulFunction parameter in and  points to the respective VMI_ or GHI_ function name.

Video Helper Functions
The following list identifies the VMI video helper functions:
 * 
 * 
 * 
 * 
 * 
 * 

VHAllocMem
Description:
 * Syntax

VHAllocMem returns a 32-bit pointer to a piece of memory. The caller of this function supplies the byte count required. This function is a helper service for operations that are common across all GRADDs.
 * 1) include 

ULONG   cBytes;  /*  Number of bytes of memory requested. */ PVOID   pMem;    /*  Returned address of allocated memory, or NULL. */

pMem = VHAllocMem(cBytes);

Error Returns NULL pointer.
 * Parameters
 * cBytes(ULONG) - input Number of bytes of memory required.
 * Indicates the number of bytes of memory required for this allocation request.
 * pMem(PVOID) - returns Return value.
 * Success Returns pointer to allocated memory.

Memory is valid across all processes.
 * Remarks

VHFreeMem
Description:
 * Syntax

VHFreeMem frees memory that has been allocated via the VHAllocMem helper. This function is a helper service for operations that are common across all GRADDs.
 * 1) include 

PVOID   pMem;  /*  Pointer to previous memory allocation. */ ULONG   rc;    /*  Return codes. */

rc = VHFreeMem(pMem);


 * Parameters
 * pMem(PVOID) - input Pointer to memory previously allocated using VHAllocMem.
 * rc(ULONG) - returns Return codes.
 * RC_SUCCESS
 * RC_ERROR

VHLockMem
Description:
 * Syntax

VHLockMem makes code or data segments available for ring 0 interrupt-time processing. At interrupt time, code and data segments must be non-swappable and accessible from the ring 0 context.
 * 1) include 

PVOID   pAddress;  /*  Address within the first page of code or data. */ ULONG   ulLength;  /*  Size of code or data segment. */ BOOL    fData;     /*  FALSE indicates code segment; TRUE indicates data segment. */ ULONG   rc;        /*  Return value. */

rc = VHLockMem(pAddress, ulLength, fData);


 * Parameters
 * pAddress(PVOID) - input Address within the first page of code or data.
 * ulLength(ULONG) - input Size of code or data segment.
 * fData(BOOL) - input FALSE indicates code segment; TRUE indicates data segment.
 * rc(ULONG) - returns Return value.

Non-zero lockhandle indicates success; zero indicates error.

VHPhysToVirt
Description:
 * Syntax

VHPhysToVirt converts physical address ranges to linear virtual address ranges for processes using VMI.
 * 1) include 

PMEMINFO pMemInfo; /* Pointer to linked list of MEMINFO structures defining address ranges. */ ULONG    rc;

rc = VHPhysToVirt (pMemInfo);


 * Parameters
 * pMemInfo(PMEMINFO) - input Pointer to linked list of structures defining address ranges.
 * rc(ULONG) - returns Return codes.

Linear virtual address ranges are valid for all processes.
 * Remarks

VHMap
Description:
 * Syntax

VHMap aliases process memory to a global ring 0 context.


 * 1) include 

PVOID   pAddress;  /*  Address within the first page of code or data. */ ULONG   ulLength;  /*  Size of code or data segment. */ ULONG   rc;        /*  Return value. */

rc = VHMap(pAddress, ulLength);


 * Parameters
 * pAddress(PVOID) - input Address within the first page of code or data.
 * ulLength(ULONG) - input Size of code or data segment.
 * rc(ULONG) - returns Return value.

Non-zero indicates ring 0 alias address; zero indicates error.

VHMapVRAM
Description:
 * Syntax

VHMapVRAM converts the physical address of VRAM to linear virtual aperture for both process and global ring 0 context.
 * 1) include 

ULONG     ulPhysAddr;  /*  Physical address of the start of the VRAM aperture. */ ULONG     ulLength;    /*  Length of VRAM aperture. */ PBYTE    *pVRAM;       /*  Returned process virtual linear aperture pointer. */ PBYTE    *pVRAMRing0;  /*  Returned ring 0 virtual linear aperture pointer. */ ULONG     rc;          /*  Return value. */

rc = VHMapVRAM(ulPhysAddr, ulLength, pVRAM, pVRAMRing0);


 * Parameters
 * ulPhysAddr(ULONG) - input Physical address of the start of the VRAM aperture.
 * ulLength(ULONG) - input Length of VRAM aperture.
 * pVRAM(PBYTE *) - output Returned process virtual linear aperture pointer.
 * pVRAMRing0(PBYTE *) - output Returned ring 0 virtual linear aperture pointer.
 * rc(ULONG) - returns Return value.
 * RC_SUCCESS or RC_ERROR.

VHMapVRAM must be used instead of VHPhysToVirt and VHMap for the frame buffer so that the ring 0 address is available for SoftDraw. For other physical memory areas needed by GRADD at interrupt time, use VHPhysToVirt and VHMap.
 * Remarks

The ulPhysAddr and ulLength parameters for VHMapVRAM and VHPhysToVirt are usually obtained from the VIDEOPMI function PMIREQUEST_SETMODE.

The Video Manager Interface Functions
The remainder of this chapter contains a detailed description of the Video Manager interface. Proceed to the following alphabetical list for a description of each function. Helper functions and entry points are included for easy reference.

VMIEntry
Description:
 * Syntax

VMIEntry is the single exported function from the Video Manager component. It is part of the Video Manager Interface (VMI) protocol and receives operations from the translation layer components.
 * 1) include 

GID     gid;         /*  ID of the GRADD. */ ULONG   ulFunction;  /*  Set to appropriate VMI_CMD_ function. */ PVOID   pIn;         /*  Pointer to applicable data structure. */ PVOID   pOut;        /*  Pointer to applicable data structure. */ ULONG   rc;          /*  Return codes. */

rc = VMIEntry(gid, ulFunction, pIn, pOut);


 * Parameters
 * gid(GID) - input ID of the GRADD.
 * ulFunction(ULONG) - input Set to appropriate VMI_CMD_ function.
 * This parameter is set to one of the VMI_CMD_ functions shown in the table of common functions shown at the beginning of this section.
 * pIn(PVOID) - input Pointer to applicable data structure.
 * pOut(PVOID) - output Pointer to applicable data structure.
 * rc(ULONG) - returns Return codes.

Valid values are dictated by the applicable VMI_CMD_ function.

VMI_CMD_BANK
Description:
 * Syntax

VMI_CMD_BANK is called to set or get the region or bank number of the video display. VMAN passes this command directly to the GRADD chain identified by the GRADD ID provided by the caller.
 * 1) include 

GID     gid;         /*  ID of the GRADD. */ ULONG   ulFunction;  /*  Set equal to VMI_CMD_BANK. */ PVOID   pIn;         /*  Pointer to a HWBANKIN data structure. */ PVOID   pOut;        /*  Pointer to HWBANKOUT data structure. */ ULONG   rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);


 * Parameters
 * gid(GID) - input ID of the GRADD.
 * ulFunction(ULONG) - input Set equal to VMI_CMD_BANK.
 * pIn(PVOID) - input Pointer to a data structure.
 * pOut(PVOID) - output Pointer to data structure.

rc(ULONG) - returns Return codes.
 * RC_ERROR
 * RC_SUCCESS
 * RC_UNSUPPORTED

VMI_CMD_BITBLT
Description:
 * Syntax

VMI_CMD_BITBLT is called to blit a rectangle or series of rectangles to or from the video display. VMAN passes this command directly to the GRADD chain identified by the GRADD ID provided by the caller.


 * 1) include 

GID     gid;         /*  ID of the GRADD. */ ULONG   ulFunction;  /*  Set equal to VMI_CMD_BITBLT. */ PVOID   pIn;         /*  Pointer to a BITBLTINFO data structure. */ PVOID   pOut;        /*  Null; no output structure needed. */ ULONG   rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);


 * Parameters
 * gid(GID) - input ID of the GRADD.
 * ulFunction(ULONG) - input Set equal to VMI_CMD_BITBLT.
 * pIn(PVOID) - input Pointer to a data structure.
 * pOut(PVOID) - output Null; no output structure needed.
 * rc(ULONG) - returns Return codes.
 * RC_SUCCESS
 * RC_ERROR

VMI_CMD_EVENT
Description:
 * Syntax

VMI_CMD_EVENTis called to notify a GRADD of specific events. VMAN sends this command directly to the GRADD chain identified by the GRADD ID.


 * 1) include 

GID     gid;         /*  ID of the GRADD. */ ULONG   ulFunction;  /*  Set equal to VMI_CMD_EVENT. */ PVOID   pIn;         /*  Pointer to an HWEVENTIN data structure. */ PVOID   pOut;        /*  NULL; no output structure needed. */ ULONG   rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);


 * Parameters
 * gid(GID) - input ID of the GRADD.
 * ulFunction(ULONG) - input Set equal to VMI_CMD_EVENT.
 * pIn(PVOID) - input Pointer to an data structure.
 * pOut(PVOID) - output NULL; no output structure needed.
 * rc(ULONG) - returns Return codes.
 * RC_UNSUPPORTED
 * RC_SUCCESS

VMI_CMD_EXTENSION
Description:
 * Syntax

VMI_CMD_EXTENSION is called to send an extension command to a GRADD. VMAN sends this command directly to the GRADD chain identified by the GRADD ID provided by the caller.
 * 1) include 

GID     gid;         /*  ID of the GRADD. */ ULONG   ulFunction;  /*  Set equal to VMI_CMD_EXTENSION. */ PVOID   pIn;         /*  Pointer to an HWEXTENSION data structure. */ PVOID   pOut;        /*  Pointer to an extension-specific output structure. */ ULONG   rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);


 * Parameters
 * gid(GID) - input ID of the GRADD.
 * ulFunction(ULONG) - input Set equal to VMI_CMD_EXTENSION.
 * pIn(PVOID) - input Pointer to an data structure.
 * pOut(PVOID) - output Pointer to an extension-specific output structure.
 * rc(ULONG) - returns Return codes.

RC_UNSUPPORTED RC_SUCCESS RC_ERROR

VMI_CMD_INIT

 * Syntax

Description:

VMI_CMD_INITinforms the Video Manager (VMAN) that a translation layer has been loaded and that VMAN may need to be initialized. VMAN initializes itself once only; subsequent VMI_CMD_INIT calls are ignored.

During the first initialization, VMAN loads SOFTDRAW and all of the GRADDs specified by the environment variables.


 * 1) include 

GID     gid;         /*  NULL. */ ULONG   ulFunction;  /*  Set equal to VMI_CMD_INIT. */ PVOID   pIn;         /*  NULL. */ PVOID   pOut;        /*  NULL. */ ULONG   rc;          /*  Return codes. */

rc = VMIEntry(gid, ulFunction, pIn, pOut);


 * Parameters
 * gid(GID) - input NULL.
 * ulFunction(ULONG) - input Set equal to VMI_CMD_INIT.
 * pIn(PVOID) - input NULL.
 * pOut(PVOID) - output NULL.
 * rc(ULONG) - returns Return codes.

RC_SUCCESS RC_ERROR

VMI_CMD_INITPROC
Description:
 * Syntax

VMI_CMD_INITPROC informs VMAN that a new process is being initialized. It indicates that this new process intends to be a client of the VMAN component.

VMAN ensures that all data and code is valid under this new process.
 * 1) include 

GID     gid;         /*  NULL. */ ULONG   ulFunction;  /*  Set equal to VMI_CMD_INITPROC. */ PVOID   pIn;         /*  NULL. */ PVOID   pOut;        /*  Pointer to an INITPROCOUT data structure. */ ULONG   rc;          /*  Return codes. */

rc = VMIEntry(gid, ulFunction, pIn, pOut);

RC_ERROR
 * Parameters
 * gid(GID) - input NULL.
 * ulFunction(ULONG) - input Set equal to VMI_CMD_INITPROC.
 * pIn(PVOID) - input NULL.
 * pOut(PVOID) - output Pointer to an data structure.
 * rc(ULONG) - returns Return codes.
 * RC_SUCCESS

VMI_CMD_LINE
Description:
 * Syntax

VMI_CMD_LINE is called to draw a line to the video display. VMAN sends this command directly to the GRADD chain identified by the GRADD ID provided by the caller.


 * 1) include 

GID     gid;         /*  ID of the GRADD. */ ULONG   ulFunction;  /*  Set equal to VMI_CMD_LINE. */ PVOID   pIn;         /*  Pointer to a LINEINFO or LINEINFO2 data structure. */ PVOID   pOut;        /*  NULL; no output structure is needed. */ ULONG   rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);


 * Parameters
 * gid(GID) - input ID of the GRADD.
 * ulFunction(ULONG) - input Set equal to VMI_CMD_LINE.
 * pIn(PVOID) - input Pointer to a or  data structure.
 * pOut(PVOID) - output NULL; no output structure is needed.
 * rc(ULONG) - returns Return codes.

RC_SUCCESS RC_ERROR

The structure can describe a sequence of line segments where each line segment may be clipped. The structure describes a sequence of line segments where only the start of the first segment and the end of the last segment may be clipped. For many cases, the simpler LINEINFO2 data can be generated more efficiently than for the more general LINEINFO data.
 * Remarks

The LINEINFO and LINEINFO2 structures can be differentiated using the ulLength field at the start of each structure.

Since the LINEINFO2 mechanism was defined after several GRADDs were already released, a LINEINFO2 structure will not be passed to a GRADD unless the GRADD sets the DS_SIMPLE_LINES flag in the ulFCFlags member of the structure returned for the  function. Note that if a GRADD indicates it can handle the LINEINFO2 structure, it may still be passed a LINEINFO structure when that generality is needed.

VMI_CMD_MOVEPTR
Description:
 * Syntax

VMI_CMD_MOVEPTR is called to change the position of the pointer hot spot. VMAN sends this command directly to the GRADD chain identified by the GRADD ID provided by the caller.
 * 1) include ;

GID     gid;         /*  ID of the GRADD. */ ULONG   ulFunction;  /*  Set equal to VMI_CMD_MOVEPTR. */ PVOID   pIn;         /*  Pointer to an HWMOVEPTRIN data structure. */ PVOID   pOut;        /*  NULL; no output structure is needed. */ ULONG   rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);


 * Parameters
 * gid(GID) - input ID of the GRADD.
 * ulFunction(ULONG) - input Set equal to VMI_CMD_MOVEPTR.
 * pIn(PVOID) - input Pointer to an data structure.
 * pOut(PVOID) - output NULL; no output structure is needed.
 * rc(ULONG) - returns Return codes.

RC_SUCCESS RC_ERROR

VMI_CMD_PALETTE
Description:
 * Syntax

This function is called to query or set the hardware color palette. VMAN sends this command directly to the GRADD chain identified by the GRADD ID provided by the caller.

The GRADD is expected to respond by describing the palette in a given array or by using the palette given in the array. The GRADD is always given an structure with either the PALETTE_GET or PALETTE_SET flag to specifiy the operation to perform.


 * 1) include 

GID     gid;         /*  ID of the GRADD. */ ULONG   ulFunction;  /*  Set equal to VMI_CMD_PALETTE. */ PVOID   pIn;         /*  Pointer to an HWPALETTEINFO data structure. */ PVOID   pOut;        /*  NULL; no output structure is needed. */ ULONG   rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);


 * Parameters
 * gid(GID) - input ID of the GRADD.
 * ulFunction(ULONG) - input Set equal to VMI_CMD_PALETTE.
 * pIn(PVOID) - input Pointer to an data structure.
 * pOut(PVOID) - output NULL; no output structure is needed.
 * If '_SET' is specified by pIn, pOutIf '_GET' is specified by pIn, pOutis a pointer to an data structure.

rc(ULONG) - returns Return codes.

RC_SUCCESS RC_ERROR

VMI_CMD_QUERYCAPS
Description:
 * Syntax

VMI_CMD_QUERYCAPS returns the capabilities of a particular GRADD. VMAN sends this command directly to the GRADD chain identified by the GRADD ID provided by the caller.

VMI_CMD_QUERYCAPS is not typically used by translation layers because the function returns the capabilities of all GRADDs, as opposed to just one. VMI_CMD_QUERYCHAININFO is the recommended way of querying the capabilities of all GRADDs in the system.


 * 1) include <GRADD.h>

GID     gid;         /*  ID of the GRADD. */ ULONG   ulFunction;  /*  Set equal to VMI_CMD_QUERYCAPS. */ PVOID   pIn;         /*  NULL. */ PVOID   pOut;        /*  Pointer to a CAPSINFO data structure. */ ULONG   rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);


 * Parameters
 * gid(GID) - input ID of the GRADD.
 * ulFunction(ULONG) - input Set equal to VMI_CMD_QUERYCAPS.
 * pIn(PVOID) - input NULL.
 * pOut(PVOID) - output Pointer to a data structure.
 * rc(ULONG) - returns Return codes.

RC_SUCCESS RC_ERROR

VMI_CMD_QUERYCHAININFO
Description:
 * Syntax

VMI_CMD_QUERYCHAININFO is unique to VMAN (there is no corresponding function in the Graphics Hardware Interface). This function is called to obtain a pointer to the video chain information, which contains information about every GRADD currently loaded.

Each GRADDINFO structure contains information, such as capabilities and mode information, for a single GRADD. The structure contains a pointer to a linked list of GRADDINFO structures. If multiple GRADD chains are in use, the head CHAININFO structure contains a pointer to the next CHAININFO structure.


 * 1) include <GRADD.h>

GID     gid;         /*  NULL. */ ULONG   ulFunction;  /*  Set equal to VMI_CMD_QUERYCHAININFO. */ PVOID   pIn;         /*  NULL. */ PVOID   pOut;        /*  Pointer to a VMIQCI data structure. */ ULONG   rc;          /*  Return codes. */

rc = VMIEntry(gid, ulFunction, pIn, pOut);


 * Parameters
 * gid(GID) - input NULL.
 * ulFunction(ULONG) - input Set equal to VMI_CMD_QUERYCHAININFO.
 * pIn(PVOID) - input NULL.
 * pOut(PVOID) - output Pointer to a data structure.

rc(ULONG) - returns Return codes.

RC_SUCCESS RC_ERROR

VMI_CMD_QUERYMODES
Description:
 * Syntax

VMI_CMD_QUERYMODES returns video mode information for a particular GRADD. VMAN passes this command directly to the GRADD chain identified by the GRADD ID provided by the caller.

VMI_CMD_QUERYMODES is not typically used by translation layers because the function returns the supported modes of all GRADDs, as opposed to just one. VMI_CMD_QUERYCHAININFO is the recommended way of querying the available modes of all GRADDs in the system.


 * 1) include <GRADD.h>

GID     gid;         /*  ID of the GRADD. */ ULONG   ulFunction;  /*  Set equal to VMI_CMD_QUERYMODES. */ PVOID   pIn;         /*  Pointer that identifies a QUERYMODE operation. */ PVOID   pOut;        /*  Pointer to the pIn operation. */ ULONG   rc;          /*  Return codes. */

rc = VMIEntry(gid, ulFunction, pIn, pOut);


 * VMI_CMD_QUERYMODES - Parameters
 * gid(GID) - input ID of the GRADD.
 * ulFunction(ULONG) - input Set equal to VMI_CMD_QUERYMODES.
 * pIn(PVOID) - input Pointer that identifies a QUERYMODE operation.
 * This pointer identifies one of the following operations:
 * QUERYMODE_NUM_MODES
 * QUERYMODE_MODE_DATA
 * pOut(PVOID) - output Pointer to the pInoperation.
 * This pointer indicates one of the following, depending on the value of pIn:
 * QUERYMODE_NUM_MODES Indicates a pointer to a ULONG containing the number of supported modes.
 * QUERYMODE_MODE_DATA Indicates a pointer to an array of structures large enough for the number of supported modes.

rc(ULONG) - returns Return codes.
 * RC_SUCCESS
 * RC_ERROR

VMI_CMD_REQUESTHW
Description:
 * Syntax

VMI_CMD_REQUESTHW is called to request access to the video hardware. VMAN processes this command and sends a GHI_CMD_REQUESTHW call to the GRADD chain identified by the GRADD ID provided by the caller.


 * 1) include <GRADD.h>

GID     gid;         /*  ID of the GRADD. */ ULONG   ulFunction;  /*  Set equal to VMI_CMD_REQUESTHW. */ PVOID   pIn;         /*  Pointer to an HWREQIN data structure. */ PVOID   pOut;        /*  NULL; no output structure is needed. */ ULONG   rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);


 * Parameters
 * gid(GID) - input ID of the GRADD.
 * ulFunction(ULONG) - input Set equal to VMI_CMD_REQUESTHW.
 * pIn(PVOID) - input Pointer to an data structure.
 * pOut(PVOID) - output NULL; no output structure is needed.

rc(ULONG) - returns Return codes.

RC_SUCCESS RC_ERROR

VMI_CMD_SETMODE
Description:
 * Syntax

VMI_CMD_SETMODE sets the video display adapter to a given mode. VMAN passes this command directly to the GRADD chain identified by the GRADD ID provided by the caller. The GRADD is expected to set the video mode, given an ID of the chosen mode.
 * 1) include <GRADD.h>

GID     gid;         /*  ID of the GRADD. */ ULONG   ulFunction;  /*  Set equal to VMI_CMD_SETMODE. */ PVOID   pIn;         /*  Pointer to PULONG containing the ID of the requested mode. */ PVOID   pOut;        /*  NULL. */ ULONG   rc;          /*  Return codes. */

rc = HWENTRY(gid, ulFunction, pIn, pOut);


 * Parameters
 * gid(GID) - input ID of the GRADD.
 * ulFunction(ULONG) - input Set equal to VMI_CMD_SETMODE.
 * pIn(PVOID) - input Pointer to PULONG containing the ID of the requested mode.
 * pOut(PVOID) - output NULL.

rc(ULONG) - returns Return codes.

RC_SUCCESS RC_ERROR

VMI_CMD_SETPTR
Description:
 * Syntax

VMI_CMD_SETPTR sets the pointer AND,XOR masks. VMAN sends this command to the GRADD chain identified by the GRADD ID provided by the caller.


 * 1) include <GRADD.h>

GID     gid;         /*  ID of the GRADD. */ ULONG   ulFunction;  /*  Set equal to VMI_CMD_SETPTR. */ PVOID   pIn;         /*  Pointer to an HWSETPTRIN data structure. */ PVOID   pOut;        /*  Pointer to an HWSETPTROUT data structure. */ ULONG   rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);


 * Parameters ===
 * gid(GID) - input ID of the GRADD.
 * ulFunction(ULONG) - input Set equal to VMI_CMD_SETPTR.
 * pIn(PVOID) - input Pointer to an data structure.
 * pOut(PVOID) - output Pointer to an data structure.
 * rc(ULONG) - returns Return codes.

RC_SUCCESS RC_ERROR

VMI_CMD_SHOWPTR
Description:
 * Syntax

VMI_CMD_SHOWPTR sets the visibility state of the pointer. VMAN sends this command to the GRADD chain identified by the GRADD ID provided by the caller.


 * 1) include <GRADD.h>

GID     gid;         /*  ID of the GRADD. */ ULONG   ulFunction;  /*  Set equal to VMI_CMD_SHOWPTR. */ PVOID   pIn;         /*  Pointer to an HWSHOWPTRIN data structure. */ PVOID   pOut;        /*  NULL; no output structure needed. */ ULONG   rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);


 * Parameters
 * gid(GID) - input ID of the GRADD.
 * ulFunction(ULONG) - input Set equal to VMI_CMD_SHOWPTR.
 * pIn(PVOID) - input Pointer to an data structure.
 * pOut(PVOID) - output NULL; no output structure needed.

rc(ULONG) - returns Return codes.

RC_SUCCESS RC_ERROR

VMI_CMD_TERM
Description:
 * Syntax

VMI_CMD_TERM is called by a translation layer when it no longer requires the services of VMAN.


 * 1) include <GRADD.h>

GID     gid;         /*  NULL; parameter ignored by VMAN. */ ULONG   ulFunction;  /*  Set equal to VMI_CMD_TERM. */ PVOID   pIn;         /*  NULL. */ PVOID   pOut;        /*  NULL. */ ULONG   rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);


 * Parameters
 * gid(GID) - input NULL; parameter ignored by VMAN.
 * ulFunction(ULONG) - input Set equal to VMI_CMD_TERM.
 * pIn(PVOID) - input NULL.
 * pOut(PVOID) - output NULL.

rc(ULONG) - returns Return codes.

RC_SUCCESS RC_ERROR

VMI_CMD_TERMPROC
Description:
 * Syntax

VMI_CMD_TERMPROC informs VMAN that an existing client process is being terminated. VMAN cleans up all resources owned by this process. VMAN passes this command directly to the GRADD chain identified by the GRADD ID provided by the caller.
 * 1) include <GRADD.h>

GID     gid;         /*  ID of the GRADD. */ ULONG   ulFunction;  /*  Set equal to VMI_CMD_TERMPROC. */ PVOID   pIn;         /*  NULL. */ PVOID   pOut;        /*  NULL. */ ULONG   rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);


 * Parameters
 * gid(GID) - input ID of the GRADD.
 * ulFunction(ULONG) - input Set equal to VMI_CMD_TERMPROC.
 * pIn(PVOID) - input NULL.
 * pOut(PVOID) - output NULL.

rc(ULONG) - returns Return codes.
 * RC_SUCCESS
 * RC_ERROR

VMI_CMD_TEXT
Description:
 * Syntax

VMI_CMD_TEXT is called to draw text to the video display. VMAN passes this command directly to the GRADD chain identified by the GRADD ID provided by the caller.
 * 1) include <GRADD.h>

GID     gid;         /*  ID of the GRADD. */ ULONG   ulFunction;  /*  Set equal to VMI_CMD_TEXT. */ PVOID   pIn;         /*  Pointer to a TEXTBLTINFO data structure. */ PVOID   pOut;        /*  Null; no output structure needed. */ ULONG   rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);


 * Parameters
 * gid(GID) - input ID of the GRADD.
 * ulFunction(ULONG) - input Set equal to VMI_CMD_TEXT.
 * pIn(PVOID) - input Pointer to a data structure.
 * pOut(PVOID) - output Null; no output structure needed.

rc(ULONG) - returns Return codes.
 * RC_ERROR
 * RC_SIMULATE
 * RC_SUCCESS
 * RC_UNSUPPORTED

VMI_CMD_USERCAPS
Description:
 * Syntax

VMI_CMD_USERCAPS enables and supports the CAPABILITIES button on the OS/2 System Object.

When the Video Configuration Manager presents the interface to the user, each capability is presented in a separate window page of the capabilities notebook in System Object. The window layout depends on the capability type :
 * Boolean type is represented by a check box.
 * Aggregate type is represented by a list box.

The capability description appears as the title for that control.

VMAN accumulates capabilities for all GRADDs, and routes capability settings to the specific GRADD that supports certain capabilities.
 * 1) include <GRADD.h>

GID           gid;     /*  ID of the GRADD. */ ULONG         ulFunc;  /*  Set equal to VMI_CMD_USERCAPS. */ PUSERCAPSIN   pIn;     /*  Pointer to a USERCAPSIN data structure. */ PVOID         pOut;    /*  Pointer to a buffer area. */ ULONG         rc;      /*  Return codes. */

rc = VMIENTRY(gid, ulFunc, pIn, pOut);


 * Parameters
 * gid(GID) - input ID of the GRADD.
 * ulFunc(ULONG) - input Set equal to VMI_CMD_USERCAPS.
 * pIn - input Pointer to a data structure.
 * pOut(PVOID) - output Pointer to a buffer area.

Pointer to a buffer area whose format depends on the value of the ulFunction field of the structure pointed to by pIn.

If pIn->ulFunction is QUERYCAPS, pOut points to a ULONG count followed by an array of structures. If pIn->ulFunction is QUERYCAPSLIST or SETCAP, pOut points to a structure.

The length of the buffer area provided is specified by the ulSize field of the structure pointed to by pIn.

rc(ULONG) - returns Return codes.
 * RC_UNSUPPORTED
 * RC_SUCCESS
 * RC_ERROR

VMI_CMD_VRAM
Description:
 * Syntax

VMI_CMD_VRAM is called to allocate off-screen video memory. VMAN sends this command to the GRADD chain identified by the GRADD ID provided by the caller.
 * 1) include <GRADD.h>

GID     gid;         /*  ID of the GRADD. */ ULONG   ulFunction;  /*  Set equal to VMI_CMD_VRAM. */ PVOID   pIn;         /*  Pointer to a VRAMIN data structure. */ PVOID   pOut;        /*  Pointer to a function-specific output data structure. */ ULONG   rc;          /*  Return codes. */

rc = VMIENTRY(gid, ulFunction, pIn, pOut);


 * Parameters
 * gid(GID) - input ID of the GRADD.
 * ulFunction(ULONG) - input Set equal to VMI_CMD_VRAM.
 * pIn(PVOID) - input Pointer to a data structure.
 * pOut(PVOID) - output Pointer to a function-specific output data structure.

If the ulFunction field of the VRAMIN structure pointed to by pIn is set to VRAM_ALLOCATE, VRAM_DEALLOCATE, or VRAM_QUERY, then pOut points to a data structure.

If the ulFunction field of the VRAMIN structure pointed to by pIn is set to VRAM_REGISTER or VRAM_DEREGISTER, then pOut points to a data structure.

rc(ULONG) - returns Return codes.
 * RC_UNSUPPORTED
 * RC_SUCCESS
 * RC_ERROR