MakeSureDirectoryPathExists

The MakeSureDirectoryPathExists function creates all the directories in the specified DirPath.

BOOL MakeSureDirectoryPathExists(

IN LPSTR DirPath  
);  

Parameters

DirPath

A pointer to an ASCII string that contains a valid path name.

Return Values

If the function succeeds, the return value is TRUE.

If the function fails, then the return value is FALSE. To retrieve extended error information, call GetLastError.

Remarks

The DirPath is parsed and each directory, beginning at the root, is created, if it does not already exist. If only some of the directories are created, the function will return FALSE.