2.2.2.8 Name Types
The following values specify types of names that are used with the NetprNameValidate, NetprNameCanonicalize, and NetprNameCompare methods.
Constant/value |
Description |
---|---|
NAMETYPE_USER 1 |
User name |
NAMETYPE_PASSWORD 2 |
User password |
NAMETYPE_GROUP 3 |
Group name |
NAMETYPE_COMPUTER 4 |
Computer name |
NAMETYPE_EVENT 5 |
Event name |
NAMETYPE_DOMAIN 6 |
NetBIOS name of a domain |
NAMETYPE_SERVICE 7 |
Service name |
NAMETYPE_NET 8 |
Net name |
NAMETYPE_SHARE 9 |
Share name |
NAMETYPE_MESSAGE 10 |
Message name |
NAMETYPE_MESSAGEDEST 11 |
Message destination |
NAMETYPE_SHAREPASSWORD 12 |
Share password |
NAMETYPE_WORKGROUP 13 |
Workgroup name |
More information for each NameType is listed following.
The set of default invalid characters includes "/\[]:|<>+=;,? as well as the control characters in the range from 0x01 through 0x1F, inclusive.
Constant |
Min/max length |
Invalid characters |
Restricted to dots and spaces? |
Other requirements |
---|---|---|---|---|
NAMETYPE_USER |
1/256 |
Default |
No |
|
NAMETYPE_PASSWORD |
0/256 |
0x00 |
Yes |
|
NAMETYPE_GROUP |
1/256 |
|
Default |
No |
NAMETYPE_COMPUTER |
1/260 |
Default and * |
no |
No leading or trailing blanks. |
NAMETYPE_EVENT |
1/16 |
Default |
No |
|
NAMETYPE_DOMAIN |
1/15 |
Default, *, 0x20 |
No |
|
NAMETYPE_SERVICE |
1/80 |
Default |
No |
|
NAMETYPE_NET |
1/260 |
Default |
No |
|
NAMETYPE_SHARE |
1/80 |
Default |
No |
|
NAMETYPE_MESSAGE |
1/15 |
Default |
No |
|
NAMETYPE_MESSAGEDEST |
1/260 |
Default |
No |
"*" is allowed only as the last character, and names of the maximum length must contain a trailing "*". |
NAMETYPE_SHAREPASSWORD |
0/8 |
0x00 |
Yes |
|
NAMETYPE_WORKGROUP |
1/15 |
Default |
No |
|