Look at the last three parameters:
TokenInformation [out, optional]
A pointer to a buffer the function fills with the requested information.
The structure put into this buffer
depends upon the type of information
specified by the TokenInformationClass
parameter.
TokenInformationLength [in]
Specifies the size, in bytes, of the buffer pointed to by the
TokenInformation parameter. If
TokenInformation is NULL, this
parameter must be zero.
ReturnLength [out]
A pointer to a variable that receives the number of bytes needed
for the buffer pointed to by the
TokenInformation parameter. If this
value is larger than the value
specified in the
TokenInformationLength parameter, the
function fails and stores no data in
the buffer.
If the value of the TokenInformationClass parameter is
TokenDefaultDacl and the token has no
default DACL, the function sets the
variable pointed to by ReturnLength to
sizeof(TOKEN_DEFAULT_DACL) and sets
the DefaultDacl member of the
TOKEN_DEFAULT_DACL structure to NULL.
Since you don't know how big a buffer you need to pass for parameter #2, you need to query the API for the exact size. And then you pass-in a sufficiently large buffer and get back the information you want.
You could always guess the buffer size and it may work.
Note that this is a typical of Win32 APIs. It helps to get this idiom right once and for all.