RegisterAppInstance function (smbclnt.h)
Registers the AppInstance ID for a process.
Syntax
DWORD RegisterAppInstance(
[in] HANDLE ProcessHandle,
[in] GUID *AppInstanceId,
[in] BOOL ChildrenInheritAppInstance
);
Parameters
[in] ProcessHandle
A process handle for the current process or a remote process to be tagged with the AppInstanceId. To tag a remote process, the handle must have PROCESS_TERMINATE access to that process.
[in] AppInstanceId
The application instance ID, which is a GUID.
[in] ChildrenInheritAppInstance
TRUE to tag the child processes spawned by the process specified by ProcessHandle; otherwise, FALSE.
Return value
Return code | Description |
---|---|
|
The CCF Filter failed to allocate the proper cache objects to fulfill this operation. |
|
The current process that's trying to tag the process specified by ProcessHandle doesn't have PROCESS_TERMINATE access to that process. |
|
ProcessHandle is not a handle to a process. |
|
The CCF mini-filter is not found. |
|
Another AppInstanceGUID is provided for the same process, which means that the RegisterAppInstance function was called twice or the application was registered twice. |
Remarks
The RegisterAppInstance function issues an IOCTL_CCF_REGISTER_APPINSTANCE call to the CCF mini-filter. The function passes the AppInstance GUID, the process handle, and the tagged child processes to the CCF cache that maps the process handle to the AppInstanceId.
The issued IOCTL for tagging another process checks if the current process has PROCESS_TERMINATE access to the target process.
Requirements
Requirement | Value |
---|---|
Minimum supported client | None supported |
Minimum supported server | Windows Server 2012 |
Target Platform | Windows |
Header | smbclnt.h |
Library | NTLanMan.lib |
DLL | NTLanMan.dll |