如题

解决方案 »

  1.   

    CreateDirectoryThe CreateDirectory function creates a new directory. If the underlying file system supports security on files and directories, the function applies a specified security descriptor to the new directory.To specify a template directory, use the CreateDirectoryEx function.
    BOOL CreateDirectory(
      LPCTSTR lpPathName,
      LPSECURITY_ATTRIBUTES lpSecurityAttributes
    );Parameters
    lpPathName 
    [in] Pointer to a null-terminated string that specifies the path of the directory to be created. 
    There is a default string size limit for paths of 248 characters. This limit is related to how the CreateDirectory function parses paths.To extend this limit to 32,767 wide characters, call the Unicode version of the function and prepend "\\?\" to the path. For more information, see Naming a File.
    Windows Me/98/95:  This string must not exceed MAX_PATH characters. 
    lpSecurityAttributes 
    [in] Pointer to a SECURITY_ATTRIBUTES structure. The lpSecurityDescriptor member of the structure specifies a security descriptor for the new directory. If lpSecurityAttributes is NULL, the directory gets a default security descriptor. The ACLs in the default security descriptor for a directory are inherited from its parent directory. 
    The target file system must support security on files and directories for this parameter to have an effect. (This is indicated when GetVolumeInformation returns FS_PERSISTENT_ACLS.)Return Values
    If the function succeeds, the return value is nonzero.If the function fails, the return value is zero. To get extended error information, call GetLastError.