windows-nt/Source/XPSP1/NT/termsrv/winsta/tsrpc.idl
2020-09-26 16:20:57 +08:00

773 lines
24 KiB
Plaintext

/*************************************************************************
*
* icaapi.idl
*
* DCE RPC IDL file for ICA API's (WinStations)
*
* Copyright Microsoft Corporation. 1998
*
*
*
*
*************************************************************************/
//
//
// NOTE: All WINSTATION API data structures are declared as variable sized
// character buffers to RPC with the "size_is()" modifier. We do not
// break out each structure in IDL since we do not need to handle
// big and little endian conversion issues. IE: Clients will be
// Windows NT, and servers will be WinFrame based on Windows NT.
//
// If we need to support big endian clients for the client side of the
// API's, then the proper IDL break out must be done for each structure,
// with its discriminant, which is the information type ENUM.
// (could use user marshall for tricky ones)
//
//
// An RPC context_handle maintains state on the server for an open
// connection from a given client. This allows the server to store
// state information about the client.
// IE: authentication information, etc.
//
// The RPC runtime implements a keep alive mechanism, and calls
// a server run down routine when the connection goes away.
//
typedef [context_handle] void *SERVER_HANDLE;
//
// The number uuid was generated by UUIDGEN, and
// is unique across time and space. This number should
// never change for this service.
//
[
uuid(5ca4a760-ebb1-11cf-8611-00a0245420ed),
version(1.0),
pointer_default(unique)
]
//
// This is our service "program"
//
interface IcaApi
{
//
// Note: Because of header file include problems, the NT headers
// can not be brought in since the auto generate RPC header
// includes windows headers first. So we avoid any definitions
// in winsta.h and use generic, sized types. Our winsta.dll
// client stub handles the actual winstation typing.
//
import "import.idl";
//
// Return the RPC context handle for the open server
//
BOOLEAN
RpcWinStationOpenServer(
[in] handle_t hBinding,
[out] DWORD *pResult,
[out] SERVER_HANDLE *phServer
);
//
// Close the context handle
//
BOOLEAN
RpcWinStationCloseServer(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult
);
//
// Ping the server for testing. Could be used for
// keep alive in WinFrame clusters.
//
BOOLEAN
RpcIcaServerPing(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult
);
//
// WinStationEnumerate
//
// Note use of size_is() for variable length buffer handling
//
BOOLEAN
RpcWinStationEnumerate(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in,out] PULONG pEntries,
[in,out,unique,size_is(*pByteCount)] PCHAR pLogonId,
[in,out] PULONG pByteCount,
[in,out] PULONG pIndex
);
//
// The RPC function differs from the prototype in winsta.h
// since it handles a changing size for WINSTATIONNAMEW
//
BOOLEAN
RpcWinStationRename(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in,size_is(NameOldSize)] PWCHAR pWinStationNameOld,
[in] DWORD NameOldSize,
[in,size_is(NameNewSize)] PWCHAR pWinStationNameNew,
[in] DWORD NameNewSize
);
BOOLEAN
RpcWinStationQueryInformation(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD LogonId,
[in] DWORD WinStationInformationClass,
[in,out,unique,size_is(WinStationInformationLength)] PCHAR pWinStationInformation,
[in] DWORD WinStationInformationLength,
[out] DWORD *pReturnLength
);
BOOLEAN
RpcWinStationSetInformation(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD LogonId,
[in] DWORD WinStationInformationClass,
[in,out,unique,size_is(WinStationInformationLength)] PCHAR pWinStationInformation,
[in] DWORD WinStationInformationLength
);
BOOLEAN
RpcWinStationSendMessage(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD LogonId,
[in,size_is(TitleLength)] PWCHAR pTitle,
[in] DWORD TitleLength,
[in,size_is(MessageLength)] PWCHAR pMessage,
[in] DWORD MessageLength,
[in] DWORD Style,
[in] DWORD Timeout,
[out] DWORD *pRespsonse,
[in] BOOLEAN DoNotWait
);
BOOLEAN
RpcLogonIdFromWinStationName(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in,size_is(NameSize)] PWCHAR pWinStationName,
[in] DWORD NameSize,
[out] DWORD *pLogonId
);
BOOLEAN
RpcWinStationNameFromLogonId(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD LoginId,
[in,out,size_is(NameSize)] PWCHAR pWinStationName,
[in] DWORD NameSize
);
BOOLEAN
RpcWinStationConnect(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD ClientLogonId,
[in] DWORD ConnectLogonId,
[in] DWORD TargetLogonId,
[in,size_is(PasswordSize)] PWCHAR pPassword,
[in] DWORD PasswordSize,
[in] BOOLEAN Wait
);
BOOLEAN
RpcWinStationVirtualOpen(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD LogonId,
[in] DWORD Pid,
[in,size_is(NameSize)] PCHAR pVirtualName,
[in] DWORD NameSize,
[out] DWORD *pHandle
);
BOOLEAN
RpcWinStationBeepOpen(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD LogonId,
[in] DWORD Pid,
[out] DWORD *pHandle
);
BOOLEAN
RpcWinStationDisconnect(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD LogonId,
[in] BOOLEAN bWait
);
BOOLEAN
RpcWinStationReset(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD LogonId,
[in] BOOLEAN bWait
);
BOOLEAN
RpcWinStationShutdownSystem(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD ClientLogonId,
[in] DWORD ShutdownFlags
);
BOOLEAN
RpcWinStationWaitSystemEvent(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD EventMask,
[out] DWORD *pEventFlags
);
BOOLEAN
RpcWinStationShadow(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD LogonId,
[in,unique,size_is(NameSize)] PWCHAR pTargetServerName,
[in] DWORD NameSize,
[in] DWORD TargetLogonId,
[in] BYTE HotKeyVk,
[in] USHORT HotkeyModifiers
);
BOOLEAN
RpcWinStationShadowTargetSetup(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD LogonId
);
BOOLEAN
RpcWinStationShadowTarget(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD LogonId,
[in,size_is(ConfigSize)] PBYTE pConfig,
[in] DWORD ConfigSize,
[in,size_is(AddressSize)] PBYTE pAddress,
[in] DWORD AddressSize,
[in,size_is(ModuleDataSize)] PBYTE pModuleData,
[in] DWORD ModuleDataSize,
[in,size_is(ThinwireDataSize)] PBYTE pThinwireData,
[in] DWORD ThinwireDataSize,
[in,size_is(ClientNameSize)] PBYTE pClientName,
[in] DWORD ClientNameSize
);
BOOLEAN
RpcWinStationGenerateLicense(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in,size_is(StringSize)] PWCHAR pSerialNumberString,
[in] DWORD StringSize,
[out,size_is(LicenseSize)] PCHAR pLicense,
[in] DWORD LicenseSize
);
BOOLEAN
RpcWinStationInstallLicense(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in,out,size_is(LicenseSize)] PCHAR pLicense,
[in] DWORD LicenseSize
);
BOOLEAN
RpcWinStationEnumerateLicenses(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in,out] DWORD *pIndex,
[in,out] DWORD *pEntries,
[out,size_is(LicenseSize)] PCHAR pLicense,
[in] DWORD LicenseSize,
[in,out] DWORD *pByteCount
);
BOOLEAN
RpcWinStationActivateLicense(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in,out,size_is(LicenseSize)] PCHAR pLicense,
[in] DWORD LicenseSize,
[in,size_is(StringSize)] PWCHAR pActivationCode,
[in] DWORD StringSize
);
BOOLEAN
RpcWinStationRemoveLicense(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in,size_is(LicenseSize)] PCHAR pLicense,
[in] DWORD LicenseSize
);
BOOLEAN
RpcWinStationQueryLicense(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[out,size_is(ByteCount)] PCHAR pLicenseCounts,
[in] DWORD ByteCount
);
BOOLEAN
RpcWinStationSetPoolCount(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in,out,size_is(LicenseSize)] PCHAR pLicense,
[in] DWORD LicenseSize
);
BOOLEAN
RpcWinStationQueryUpdateRequired(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[out] DWORD *pUpdateFlag
);
BOOLEAN
RpcWinStationCallback(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD LogonId,
[in,size_is(PhoneNumberSize)] PWCHAR pPhoneNumber,
[in] DWORD PhoneNumberSize
);
BOOLEAN
RpcWinStationBreakPoint(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD LogonId,
[in] BOOLEAN KernelFlag
);
BOOLEAN
RpcWinStationReadRegistry(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult
);
BOOLEAN
RpcWinStationWaitForConnect(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD ClientLogonId,
[in] DWORD ClientProcessId
);
BOOLEAN
RpcWinStationNotifyLogon(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD ClientLogonId,
[in] DWORD ClientProcessId,
[in] BOOLEAN fUserIsAdmin,
[in] DWORD UserToken,
[in,size_is(DomainSize)] PWCHAR pDomain,
[in] DWORD DomainSize,
[in,size_is(UserNameSize)] PWCHAR pUserName,
[in] DWORD UserNameSize,
[in,size_is(PasswordSize)] PWCHAR pPassword,
[in] DWORD PasswordSize,
[in] UCHAR Seed,
[in,size_is(ConfigSize)] PCHAR pUserConfig,
[in] DWORD ConfigSize
);
BOOLEAN
RpcWinStationNotifyLogoff(
[in] SERVER_HANDLE hServer,
[in] DWORD ClientLogonId,
[in] DWORD ClientProcessId,
[out] DWORD *pResult
);
BOOLEAN
OldRpcWinStationEnumerateProcesses(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[out,size_is(ByteCount)] PBYTE pProcessBuffer,
[in] DWORD ByteCount
);
BOOLEAN
RpcWinStationAnnoyancePopup(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD LogonIdld
);
BOOLEAN
RpcWinStationEnumerateProcesses(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[out,size_is(ByteCount)] PBYTE pProcessBuffer,
[in] DWORD ByteCount
);
BOOLEAN
RpcWinStationTerminateProcess(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD ProcessId,
[in] DWORD ExitCode
);
BOOLEAN
RpcServerNWLogonSetAdmin(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in,size_is(ServerNameSize)] PWCHAR pServerName,
[in] DWORD ServerNameSize,
[in,out,unique,size_is(ByteCount)] PCHAR pNWLogon,
[in] DWORD ByteCount
);
BOOLEAN
RpcServerNWLogonQueryAdmin(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in,size_is(ServerNameSize)] PWCHAR pServerName,
[in] DWORD ServerNameSize,
[in,out,unique,size_is(ByteCount)] PCHAR pNWLogon,
[in] DWORD ByteCount
);
BOOLEAN
RpcWinStationCheckForApplicationName(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD LogonId,
[in,out,size_is(UserNameSize)] PWCHAR pUserName,
[in] DWORD UserNameSize,
[in,out,size_is(DomainSize)] PWCHAR pDomain,
[in] DWORD DomainSize,
[in,out,size_is(*pPasswordSize)] PWCHAR pPassword,
[in,out] DWORD *pPasswordSize,
[in] DWORD MaxPasswordSize,
[in,out] PCHAR pSeed,
[out] PBOOLEAN pfPublished,
[out] PBOOLEAN pfAnonymous
);
BOOLEAN
RpcWinStationGetApplicationInfo(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD LogonId,
[out] PBOOLEAN pfPublished,
[out] PBOOLEAN pfAnonymous
);
BOOLEAN
RpcWinStationNtsdDebug(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD LogonId,
[in] LONG ProcessId,
[in] ULONG DbgProcessId,
[in] ULONG DbgThreadId,
[in] DWORD_PTR AttachCompletionRoutine
);
BOOLEAN
RpcWinStationGetAllProcesses(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] ULONG Level,
[in, out] ULONG *pNumberOfProcesses,
[out, size_is(,*pNumberOfProcesses)]
PTS_ALL_PROCESSES_INFO *ppTsAllProcessesInfo
);
BOOLEAN
RpcWinStationGetProcessSid(
[in] SERVER_HANDLE hServer,
[in] DWORD dwUniqueProcessId,
[in] LARGE_INTEGER ProcessStartTime,
[out] LONG *pResult,
[in,out,unique,size_is(dwSidSize)]
PBYTE pProcessUserSid,
[in] DWORD dwSidSize,
[in,out] DWORD *pdwSizeNeeded
);
BOOLEAN
RpcWinStationGetTermSrvCountersValue(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD dwEntries,
[in,out, size_is(dwEntries)] PTS_COUNTER pCounter
);
BOOLEAN
RpcWinStationReInitializeSecurity(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult
);
LONG
RpcWinStationBroadcastSystemMessage(
[in ] SERVER_HANDLE hServer,
[in] ULONG sessionID,
[in] ULONG timeOut,
[in] DWORD dwFlags,
[in,out,ptr] DWORD *lpdwRecipients,
[in] ULONG uiMessage,
[in] UINT_PTR wParam,
[in] LONG_PTR lParam,
[in,size_is(bufferSize)] PBYTE pBuffer,
[in] ULONG bufferSize,
[in] BOOLEAN fBufferHasValidData,
[out] LONG *pResponse
);
LONG
RpcWinStationSendWindowMessage(
[in] SERVER_HANDLE hServer,
[in] ULONG sessionID,
[in] ULONG timeOut,
[in] ULONG hWnd,
[in] ULONG Msg,
[in] UINT_PTR wParam,
[in] LONG_PTR lParam,
[in,size_is(bufferSize)] PBYTE pBuffer,
[in] ULONG bufferSize,
[in] BOOLEAN fBufferHasValidData,
[out] LONG *pResponse
);
BOOLEAN
RpcWinStationNotifyNewSession(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD ClientLogonId
);
BOOLEAN
RpcServerGetInternetConnectorStatus(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[out] PBOOLEAN pfEnabled
);
BOOLEAN
RpcServerSetInternetConnectorStatus(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] BOOLEAN fEnabled
);
BOOLEAN
RpcServerQueryInetConnectorInformation(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in,out,unique,size_is(WinStationInformationLength)] PCHAR pWinStationInformation,
[in] DWORD WinStationInformationLength,
[out] DWORD *pReturnLength
);
BOOLEAN
RpcWinStationGetLanAdapterName(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD PdNameSize,
[in,size_is(PdNameSize)] PWCHAR pPdName,
[in] ULONG LanAdapter,
[out] ULONG *pLength,
[out, size_is(,*pLength)] PWCHAR *ppLanAdapter
);
BOOLEAN
RpcWinStationUpdateUserConfig(
[in] SERVER_HANDLE hServer,
[in] DWORD ClientLogonId,
[in] DWORD ClientProcessId,
[in] DWORD UserToken,
[out] DWORD *pResult
);
BOOLEAN
RpcWinStationQueryLogonCredentials(
[in] SERVER_HANDLE hServer,
[in] ULONG LogonId,
[out,size_is(,*pcbCredentials)] PCHAR *ppCredentials,
[in,out] ULONG *pcbCredentials
);
BOOLEAN
RpcWinStationRegisterConsoleNotification(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] ULONG SessionId,
[in] ULONG hWnd,
[in] DWORD dwFlags
);
BOOLEAN
RpcWinStationUnRegisterConsoleNotification(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] ULONG SessionId,
[in] ULONG hWnd
);
BOOLEAN
RpcWinStationUpdateSettings(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD SettingsClass,
[in] DWORD SettingsParameters
);
BOOLEAN
RpcWinStationShadowStop(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD LogonId,
[in] BOOLEAN bWait
);
BOOLEAN
RpcWinStationCloseServerEx(
[in, out] SERVER_HANDLE *phServer,
[out] DWORD *pResult
);
BOOLEAN
RpcWinStationIsHelpAssistantSession(
[in] SERVER_HANDLE hServer,
[out] DWORD* pResult,
[in] ULONG SessionId
);
BOOLEAN
RpcWinStationGetMachinePolicy(
[in] SERVER_HANDLE hServer,
[in,out,size_is(bufferSize)] PBYTE pPolicy,
[in] ULONG bufferSize
);
BOOLEAN
RpcWinStationUpdateClientCachedCredentials(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD ClientLogonId,
[in] ULONG_PTR ClientProcessId,
[in,size_is(DomainSize)] PWCHAR pDomain,
[in] DWORD DomainSize,
[in,size_is(UserNameSize)] PWCHAR pUserName,
[in] DWORD UserNameSize
);
BOOLEAN
RpcWinStationFUSCanRemoteUserDisconnect(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD TargetLogonId,
[in] DWORD ClientLogonId,
[in] ULONG_PTR ClientProcessId,
[in,size_is(DomainSize)] PWCHAR pDomain,
[in] DWORD DomainSize,
[in,size_is(UserNameSize)] PWCHAR pUserName,
[in] DWORD UserNameSize
);
BOOLEAN
RpcWinStationCheckLoopBack(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD ClientLogonId,
[in] DWORD TargetLogonId,
[in,size_is(NameSize)] PWCHAR pTargetServerName,
[in] DWORD NameSize
);
BOOLEAN
RpcConnectCallback(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD TimeOut,
[in] ULONG AddressType,
[in,size_is(AddressSize)] PBYTE pAddress,
[in] ULONG AddressSize
);
BOOLEAN
RpcWinStationNotifyDisconnectPipe(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD ClientLogonId,
[in] ULONG_PTR ClientProcessId
);
BOOLEAN
RpcWinStationSessionInitialized(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD ClientLogonId,
[in] ULONG_PTR ClientProcessId
);
BOOLEAN
RpcRemoteAssistancePrepareSystemRestore(
[in] SERVER_HANDLE hServer,
[out] DWORD* pResult
);
BOOLEAN
RpcWinStationGetAllProcesses_NT6(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] ULONG Level,
[in, out] ULONG *pNumberOfProcesses,
[out, size_is(,*pNumberOfProcesses)]
PTS_ALL_PROCESSES_INFO_NT6 *ppTsAllProcessesInfo
);
//
// Do autoreconnection policy in an atomic operation.
// Return status indicates if an autoreconnection took
// place.
//
BOOLEAN
RpcWinStationAutoReconnect(
[in] SERVER_HANDLE hServer,
[out] DWORD *pResult,
[in] DWORD LogonId,
[in] DWORD flags
);
}