IHandlerActivationHost::BeforeCoCreateInstance method (shobjidl_core.h)
Notifies a client of ShellExecuteEx that a handler is about to be created, giving that client the opportunity to display UI confirming the use of that handler or reject it by returning a specific error code.
HRESULT BeforeCoCreateInstance( [in] REFCLSID clsidHandler, [in] IShellItemArray *itemsBeingActivated, [in] IHandlerInfo *handlerInfo );
Identifies the handler.
The Shell item objects that will be passed to the handler. Typically there is only one, but in some cases there can be more than one.
Provides access to information about the handler that will be invoked. This object also supports IHandlerInfo2 on versions of Windows that support that interface.
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code, HRESULT_FROM_WIN32(ERROR_CANCELLED) indicates that the ShellExecute call should be canceled, EXECUTE_E_LAUNCH_APPLICATION indicates that this handler should not be used, but if there is another it should be used.
|Minimum supported client||Windows 8 [desktop apps only]|
|Minimum supported server||Windows Server 2012 [desktop apps only]|
|Header||shobjidl_core.h (include Shobjidl.h)|