Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 1 KB

File metadata and controls

41 lines (28 loc) · 1 KB

Home

Function name : PathGetDriveNumber

Group: Shell Lightweight Utility APIs -- Path Functions - Library: shlwapi


Searches a path for a drive letter within the range of "A" to "Z" and returns the corresponding drive number.


Code examples:

Using Path functions from Shell Lightweight Utility APIs (shlapi.dll)

Declaration:

int PathGetDriveNumber(
    LPCTSTR lpsz
);  

FoxPro declaration:

DECLARE INTEGER PathGetDriveNumber IN shlwapi;
	STRING lpsz  

Parameters:

lpsz [in] Pointer to a null-terminated string of maximum length MAX_PATH that contains the path to be searched.


Return value:

Returns 0 through 25 (corresponding to "A" through "Z") if the path has a drive letter, or -1 otherwise.