3.5.4.1.9 RpcQuerySessionData (Opnum 11)
The RpcQuerySessionData method returns information about a particular session running on a terminal server. The caller MUST have WINSTATION_QUERY permission to the session being queried. The method checks whether the caller has WINSTATION_QUERY permission (section 3.1.1) by setting it as the Access Request mask, and fails if the caller does not have the permission.
-
HRESULT RpcQuerySessionData( [in] handle_t hBinding, [in] ULONG SessionId, [in] QUERY_SESSION_DATA_TYPE type, [in, unique, size_is(cbInputData )] byte* pbInputData, [in, range(0, 8192)] DWORD cbInputData, [out, ref, size_is(cbSessionData), length_is(*pcbReturnLength)] byte* pbSessionData, [in, range(0, 8192)] ULONG cbSessionData, [out, ref] ULONG* pcbReturnLength, [out, ref] ULONG* pcbRequireBufferSize );
hBinding: The RPC binding handle. For more information, see [MSDN-RPCBIND].
SessionId: The ID of the session for which data is to be retrieved.
type: The type of data to retrieve about the session. This is of type QUERY_SESSION_DATA_TYPE.
pbInputData: Input data. This is a string specifying the name of the virtual channel and is required only when querying virtual channel information.
cbInputData: The size, in bytes, of input data.
pbSessionData: The output data containing the requested information. The data returned is of type WDCONFIG if the type specified is QUERY_SESSION_DATA_WDCONFIG. It is of type WINSTATIONVALIDATIONINFORMATION if the type specified is QUERY_SESSION_DATA_LICENSE_VALIDATION. For other types, it is protocol-specific.
cbSessionData: The size, in bytes, of pbSessionData.
pcbReturnLength: The length of the returned data, in bytes.
pcbRequireBufferSize: The buffer size, in bytes, required by the returned data.
Return Values: The method MUST return S_OK (0x00000000) on success; otherwise, it MUST return an implementation-specific negative value.
-
Return value/code
Description
0x00000000
S_OK
Successful completion