DiskQuotaControl.AddUser method

Assigns a nondefault disk quota to a new user.

Syntax


objRetVal = DiskQuotaControl.AddUser(
  sLogonName
)

Parameters

sLogonName

Type: CHAR

A string value that contains the user's logon name. Use the UserNameResolution property to specify how the name is to be resolved.

Return value

Type: Object

Returns an object expression that evaluates to the user's DIDiskQuotaUser object.

Remarks

The NTFS file system automatically creates a user quota entry when a user first writes to the volume. Entries that are created in this way are assigned the default warning threshold and hard quota limit values for the volume. This method allows you to create a user quota entry before a user writes information to the volume. It returns a DIDiskQuotaUser object that can be used to assign a warning threshold or quota limit value that differs from the default settings for the volume.

If the user already exists, no new entry is created. The method returns the DIDiskQuotaUser object associated with the existing entry.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

DLL

Shell32.dll (version 5.0 or later)

See also

DefaultQuotaLimit
DefaultQuotaThreshold
DiskQuotaControl Object

 

 

Community Additions

ADD
Show:
© 2014 Microsoft