2.4 String Field Length Limits

Many of the string elements specified in the Remote Administration Protocol have maximum length constraints associated with them. A client MUST NOT transmit strings that exceed the maximum length, as specified in the following tables. A server MUST fail a request if it receives a string that exceeds the maximum length by returning the associated Remote Administration Protocol response message with the Win32 error code set to ERROR_INVALID_PARAMETER (0x0057).

All text strings are encoded in ASCII and are received and transmitted as sequences of octets. The following tables specify the maximum character length, in bytes, for the string elements (not including a null-terminator) in various Remote Administration Protocol commands and structures, if any lengths are required for a particular string.

The following table lists the length limits for RAP commands.

RAP Command

Field Name

Maximum Characters

NetServerEnum2Request, NetServerEnum3Request

Domain

15

NetServerEnum3Request

FirstNameToReturn

15

NetPrintQGetInfoRequest

PrintQueueName

12

NetUserPasswordSet2Request

UserName

20

NetUserPasswordSet2Request

OldPassword

15

NetUserPasswordSet2Request

NewPassword

15

The following table lists the length limits for RAP structures.

RAP Structure

Field Name

Maximum Characters

PrintQueue1, PrintQueue3

PrintQName

12

PrintQueue1, PrintQueue3

SeparatorPageFilename

48

PrintQueue1, PrintQueue3

PrintProcessorDllName

48

PrintQueue1, PrintQueue3

CommentString

48

PrintQueue1

PrinterDestinationsName

48

 PrintJobInfo3

UserName

20

 PrintJobInfo3

NotifyName

15

 PrintJobInfo3

DataType

9

 PrintJobInfo3

ParametersString

48

 PrintJobInfo3

JobStatusString

48

 PrintJobInfo1

JobComment

48

NetServerInfo0, NetServerInfo1

ServerName

16

NetServerInfo1

ServerComment

48

NetShareInfo0, NetShareInfo1

NetworkName

13

NetUserInfo11

Name

21

NetWkstaUserLogonRequestData

UserName

21

NetWkstaUserLogonRequestData

Password

15

NetWkstaUserLogonRequestData

WorkstationName

16

NetWkstaUserLogonResponseData

EffName

21

NetWkstaUserLogoffRequestData

Name

21

NetWkstaUserLogoffRequestData

Workstation

16