dos12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
DosMkDir (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_DOSFILEMGR
 
USHORT DosMkDir(pszDirName, ulReserved)
PSZ pszDirName;      /* new directory name */
ULONG ulReserved;    /* must be zero       */
 
The DosMkDir function creates the specified directory. If the directory
already exists or the specified directory name is invalid, the function
returns an error value.
 
The DosMkDir function is a family API function.
 
Parameter   Description
────────────────────────────────────────────────────────────────────────────
 
pszDirName  Points to a null-terminated string specifying the directory to
            create. This string must be a valid MS OS/2 directory name, and
            cannot contain any wildcard characters.
 
ulReserved  Specifies a reserved value; must be zero.
 
Return Value
 
The return value is zero if the function is successful. Otherwise, it is an
error value, which may be one of the following:
 
     ERROR_ACCESS_DENIED
     ERROR_DRIVE_LOCKED
     ERROR_NOT_DOS_DISK
     ERROR_PATH_NOT_FOUND
 
Example
 
This example calls the DosMkDir function to create the subdirectory abc and
report an error if it fails:
 
USHORT usError;
usError = DosMkDir("abc", 0L);
if (usError)
    VioWrtTTY("Can't open directory\r\n", 22, 0);
else {
 
See Also
 
DosRmDir