Windows Dev Center

RegisterAppInstance function

Registers the AppInstance ID for a process.

Syntax


DWORD WINAPI RegisterAppInstance(
  _In_ HANDLE ProcessHandle,
  _In_ GUID   *AppInstanceID,
  _In_ BOOL   ChildrenInheritAppInstance
);

typedef DWORD (WINAPI *PREGISTER_APPINSTANCE)(
    _In_ HANDLE ProcessHandle,
    _In_ GUID   *AppInstanceID,
    _In_ BOOL   ChildrenInheritAppInstance
);

Parameters

ProcessHandle [in]

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.

AppInstanceID [in]

The application instance ID, which is a GUID.

ChildrenInheritAppInstance [in]

TRUE to tag the child processes spawned by the process specified by ProcessHandle; otherwise, FALSE.

Return value

Return codeDescription
ERROR_NOT_ENOUGH_MEMORY

The CCF Filter failed to allocate the proper cache objects to fulfill this operation.

ERROR_ACCESS_DENIED

The current process that's trying to tag the process specified by ProcessHandle doesn't have PROCESS_TERMINATE access to that process.

ERROR_INVALID_PARAMETER

ProcessHandle is not a handle to a process.

ERROR_NOT_FOUND

The CCF mini-filter is not found.

ERROR_OBJECT_ALREADY_EXISTS

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

Minimum supported client

None supported

Minimum supported server

Windows Server 2012

Header

SmbClnt.h

Library

NTLanMan.lib

DLL

NTLanMan.dll

See also

Failover Cluster Resource Management Functions

 

 

Show:
© 2015 Microsoft