PathBuildRootA function (shlwapi.h)
Creates a root path from a given drive number.
LPSTR PathBuildRootA(
[out] LPSTR pszRoot,
[in] int iDrive
);
[out] pszRoot
Type: LPTSTR
A pointer to the string that receives the constructed root path. This buffer must be at least four characters in size.
[in] iDrive
Type: int
A variable of type int that indicates the desired drive number. It should be between 0 and 25.
Type: LPTSTR
Returns the address of the constructed root path. If the call fails for any reason (for example, an invalid drive number), szRoot is returned unchanged.
Bemærk
The shlwapi.h header defines PathBuildRoot as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional, Windows XP [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | shlwapi.h |
Library | Shlwapi.lib |
DLL | Shlwapi.dll (version 4.71 or later) |