3.7.4.1.9 RpcLogonIdFromWinStationName (Opnum 8)
The RpcLogonIdFromWinStationName method returns a session's session ID given its session name. The caller MUST have WINSTATION_QUERY permission. 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.<176>
-
BOOLEAN RpcLogonIdFromWinStationName( [in] SERVER_HANDLE hServer, [out] DWORD* pResult, [in, size_is(NameSize)] PWCHAR pWinStationName, [in, range(0, 256 )] DWORD NameSize, [out] DWORD* pLogonId );
hServer: The Handle to the server object. This is of type SERVER_HANDLE. hServer MUST be obtained from a previous call to RpcWinStationOpenServer.
pResult: The failure error code if the call to RpcLogonIdFromWinStationName fails. If the call is successful, this parameter MUST be STATUS_SUCCESS (0x00000000).
-
Value
Meaning
STATUS_SUCCESS
0x00000000
The call is successful.
STATUS_ACCESS_DENIED
0xC0000022
The caller does not have permission for the operation.
pWinStationName: The pointer to a buffer holding the session name.
NameSize: The length of the string in characters pointed to by pWinStationName including the terminating NULL character. MUST be less than or equal to WINSTATIONNAME_LENGTH.
pLogonId: The matching session ID for the session specified by pWinStationName.
Return Values: Returns TRUE if the call succeeded, or FALSE if the method failed. On failure, pResult indicates the failure status code.
-
Return value/code
Description
0x01
TRUE
Successful completion.
0x00
FALSE
Method call failed.