wpQueryLogicalDrive
Appearance
This instance method returns the logical drive number that is represented by this disk object.
Syntax
_wpQueryLogicalDrive(somSelf)
Parameters
- somSelf (WPDisk *) - input
- Pointer to the object on which the method is being invoked.
- Points to an object of class WPDisk.
Returns
- ulDiskID (ULONG) - returns
- Logical drive identifier.
How to Override
This method should not be overridden.
Usage
This method can be called at any time.
Remarks
Every instance of the WPDisk class that is created in the system must represent a logical drive partition. There should never be more than one disk object per logical drive.
Example Code
#define INCL_WINWORKPLACE
#include <os2.h>
WPDisk *somSelf; /* Pointer to the object on which the method is being invoked. */
ULONG ulDiskID; /* Logical drive identifier. */
ulDiskID = _wpQueryLogicalDrive(somSelf);
/* Example code provided in the source: */
ULONG ulLogicalDriveNum = 0; /* Logical drive number returned */
WPRootFolder *RootFolder; /* Root folder for drive */
/*
* Query logical drive number for the WPDisk object
*/
ulLogicalDriveNum = _wpQueryLogicalDrive( self );
if (ulLogicalDriveNum == 0) {
somPrintf("_wpQueryLogicalDrive failed");
return 1;
} /* endif */
/*
* Query root folder also
*/
RootFolder = _wpQueryRootFolder( self );
if (RootFolder == NULL) {
somPrintf("_wpQueryRootFolder failed");
return 1;
} /* endif */