## Virtual Device Driver Reference for OS/2

[prev][next][parent][TOC]

### VDHPhysicalDisk - Parameters

Function (ULONG) Type of partitionable disks' information to obtain.

Possible values are:

VDHPHYD_GET_DISKS Obtain the total number of partitionable disks
VDHPHYD_GET_HANDLE Obtain a handle to use with the Category 9 IOCtls
VDHPHYD_RELEASE_HANDLE Release a handle for a partitionable disk

DataPtr (PULONG) Pointer to the return buffer.

DataLen (ULONG) Length of the return buffer.

The returned data for each function is described as follows (all lengths are in bytes):

VDHPHYD_GET_DISKS Data Length=2. Total number of partitionable disks in the system. 1-based.

VDHPHYD_GET_HANDLE Data Length=2. Handle for the specified partitionable disk for Category 9 IOCtls.

VDHPHYD_RELEASE_HANDLE Data Length=0. None; pointer must be 0 (zero).

ParmPtr (PULONG) Pointer to the user-supplied information.

ParmLen (ULONG) Length of the user-supplied information (all lengths are in bytes):

VDHPHYD_GET_DISKS Parm Length=0. None; must be set to 0 (zero). 1-based.

VDHPHYD_GET_HANDLE Parm Length=string length. ASCIIZ string that specifies the partitionable disk.

VDHPHYD_RELEASE_HANDLE Parm Length=2. Handle obtained from VDHPHYD_GET_ HANDLE.

rc (BOOL) - returns

Success If the function is successful, it returns a nonzero value.

Failure If the function fails, it returns 0 (zero). VDHGetError should be called to determine the nature of the problem. VDHGetError can return the following error codes:

ERROR_ACCESS_DENIED
ERROR_INVALID_FUNCTION
ERROR_INVALID_HANDLE
ERROR_INVALID_PARAMETER
ERROR_LOCK_VIOLATION

If VDHPhysicalDisk is called in any context except DOS session task time, a system halt occurs.