Skip to content

Latest commit

 

History

History
71 lines (50 loc) · 1.96 KB

sh-process.md

File metadata and controls

71 lines (50 loc) · 1.96 KB
title description keywords topic_type api_name api_type ms.topic ms.date
sh_process keyword
The \ sh\_process\ keyword specifies the system object is a handle to a process.
sh_process keyword MIDL
apiref
sh_process
NA
reference
02/05/2021

sh_process keyword

The sh_process keyword specifies that a system_handle holds a handle to a process.

[system_handle(sh_process)]

[system_handle(sh_process, access-rights)]

Parameters

This keyword is a parameter for system_handle.

The system_handle documentation also contains details on optional use of the access-rights parameter. The default behavior is DUPLICATE_SAME_ACCESS per DuplicateHandle function specifications.

Remarks

In order to use this keyword with the system_handle attribute, the -target flag must be set to NT100 (or higher) when running midl.exe.

Examples

interface MyInterface : IUnknown                         
{         
    HRESULT GetStubProcess([out, system_handle(sh_process)] HANDLE* processHandle);

    HRESULT WatchProcess([in, system_handle(sh_process, PROCESS_QUERY_INFORMATION | PROCESS_QUERY_LIMITED_INFORMATION)] HANDLE processHandle);
}

Requirements

   
Minimum supported client Windows 10 Anniversary Update (version 1607, build 14393)
Minimum supported server Windows Server 2016 (build 14393)

See also

system_handle

About Processes and Threads

Process Security and Access Rights

CreateProcess function

OpenProcess function