Skip to content

Latest commit

 

History

History
137 lines (81 loc) · 3.45 KB

itabletcontextp-usesharedmemorycommunications.md

File metadata and controls

137 lines (81 loc) · 3.45 KB
description ms.assetid title ms.topic ms.date topic_type api_name api_type api_location
Provides access to memory shared between tablet threads.
047ff598-7d20-49d7-bdd3-498fe5c778c6
ITabletContextP::UseSharedMemoryCommunications method
reference
05/31/2018
APIRef
kbSyntax
ITabletContextP.UseSharedMemoryCommunications
COM
Wisptis.exe
Wisptis.exe.dll

ITabletContextP::UseSharedMemoryCommunications method

Provides access to memory shared between tablet threads.

Syntax

HRESULT UseSharedMemoryCommunications(
  [in]  DWORD pid,
  [out] DWORD *phEventMoreData,
  [out] DWORD *phEventClientReady,
  [out] DWORD *phMutexAccess,
  [out] DWORD *phFileMapping
);

Parameters

pid [in]

Process id.

phEventMoreData [out]

Event handle that signals when new data is available to be processed.

phEventClientReady [out]

Returned event handle used to signal that the client is ready to receive data. Signaled after processing new data.

phMutexAccess [out]

The mutex granting access to shared memory.

phFileMapping [out]

Pointer to the shared memory block.

Return value

This method can return one of these values.

Return code Description
S_OK
Success.
E_FAIL
An unspecified error occurred.

Remarks

The UseSharedMemoryCommunications method is used as part of the Tablet PC shared memory protocol. Since the Wisptis service has a high integrity level (IL), it can store and access data stored in shared memory without needing to elevate its privileges.

The SHAREDMEMORY_HEADER structure is cast from the data referenced by the file mapping and the raw packet data follows the SHAREDMEMORY_HEADER. Raw packet data can be read off of the shared memory when the event referenced by pdwEventClientReady is raised.

The following list describes the sequence of events for accessing and using shared memory.

  • The client sets the clientReady event.
  • The client waits for the moreData event.
  • The client acquires the mutex.
  • The client reads packet data from the section of shared memory after the header and serial numbers after the packets.
  • The client handles data depending on the value of dwEvent.
  • The client writes -1 (0xFFFFFFFF) into dwEvent.
  • The client releases the mutex.
  • The client sets the clientReady event.

Requirements

Requirement Value
Minimum supported client
Windows XP Tablet PC Edition [desktop apps only]
Minimum supported server
None supported
Library
Wisptis.exe

See also

ITabletContextP Interface

UseNamedSharedMemoryCommunications