3.7.4.1.5 RpcWinStationRename (Opnum 4)
The RpcWinStationRename method enables the caller to change the name of the session. The caller MUST have DELETE permission, as specified in [MS-DTYP] section 2.4.3, on the session that is identified by the old name.<160>
-
BOOLEAN RpcWinStationRename( [in] SERVER_HANDLE hServer, [out] DWORD* pResult, [in, size_is(NameOldSize)] PWCHAR pWinStationNameOld, [in, range(0, 256)] DWORD NameOldSize, [in, size_is(NameNewSize)] PWCHAR pWinStationNameNew, [in, range(0, 256)] DWORD NameNewSize );
hServer: Handle to the server object. This is of type SERVER_HANDLE. The hServer MUST be obtained from a previous call to RpcWinStationOpenServer.
pResult: The failure error code if the call to RpcWinStationRename fails. If the call is successful, this parameter MUST be STATUS_SUCCESS (0x00000000), as specified in [MS-ERREF].
-
Value
Meaning
STATUS_SUCCESS
0x00000000
The call is successful.
STATUS_ACCESS_DENIED
0xC0000022
The caller does not have DELETE permission.
STATUS_CTX_WINSTATION_NAME_INVALID
0xC00A0001
The sizes are 0, one or the other of the pointers is NULL, or a pointer is invalid.
STATUS_CTX_WINSTATION_NOT_FOUND
0xC00A0015
No session exists with the name given in pWinStationNameOld.
STATUS_CTX_WINSTATION_NAME_COLLISION
0xC00A0016
A session already exists with the name given in pWinStationNameNew.
pWinStationNameOld: The pointer to a string that is the old name of the session being renamed.
NameOldSize: The length of the string in characters pointed to by pWinStationNameOld including the terminating NULL character.
pWinStationNameNew: The pointer to a string that is the new name of the session being renamed.
NameNewSize: The length of the string in characters pointed to by pWinStationNameNew including the terminating NULL character. Name MUST be shorter than or equal to WINSTATIONNAME_LENGTH.
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.