Dear Dochelp,

In MS-RPRN, section : 3.1.4.1.2 Dynamically Typed Query Parameters.

the text reads:

------------------------------------------------------------
3.1.4.1.2     Dynamically Typed Query Parameters

Unless notified otherwise, methods returning one or more dynamically-typed 
values use a common
API pattern, in which the caller passes in the following parameters:

BUFFER: A buffer into which the server copies the requested dynamically-typed 
values. The term
"BUFFER" is used here as a placeholder. Each method section defines which of 
its parameters is
the pointer to the buffer.

pType: An optional pointer to a variable that receives a code that indicates 
the type of data that
is stored in the specified value. For a list of possible type values, see 
section 2.2.3.9.

nSize or cbData: The size, in bytes, of the buffer. This value can be larger 
than the required size
for the requested dynamically-typed values.

pcbNeeded or pcbData: A pointer to a variable into which the server copies the 
number of bytes
between the start of BUFFER and the last byte written by the server into 
BUFFER, both inclusive;
or the required size of the buffer, in bytes, if the value of cbBuf is smaller 
than the size of the
data to return to the caller. For methods capable of returning more than one 
dynamically-typed
value, the caller also passes in:

pcReturned: A pointer to a variable into which the server copies the number of 
dynamically-typed
values that were written to the buffer, if the buffer was large enough to hold 
them.

The individual method sections include the following parameter validation steps 
by reference:
The server MUST verify that the value of cbBuf is not smaller than the number 
of bytes required
to hold the dynamically-typed values to be written to the buffer.

If that verification fails, the server MUST write the number of bytes required 
into the variable
that is pointed to by pcbNeeded and return ERROR_MORE_DATA.

If the value of cbBuf is not zero, the server MUST verify that a non-NULL 
pointer to the buffer
was passed in. If that verification fails, the server MUST return 
ERROR_INVALID_USER_BUFFER.
------------------------------------------------------------

I believe the references to the variable name "cbBuf" in the above are
incorrect, and should be replaced with "nSize" or with "cbData".

There is no variable name cbBuf defined in this section. It appears to
be a cut-and-paste error from "3.1.4.1.7 String Query Parameters", which
does define the "cbBuf" variable name.

Please let me know if this is correct.

Thanks,

Jeremy.
_______________________________________________
cifs-protocol mailing list
[email protected]
https://lists.samba.org/mailman/listinfo/cifs-protocol

Reply via email to