IShellService::SetOwner method (shdeprecated.h)
Deprecated. Declares an owner reference to the service object.
Syntax
HRESULT SetOwner(
IUnknown *punkOwner
);
Parameters
punkOwner
Type: IUnknown*
The address of an interface pointer to the owner object. If NULL, the object should call IUnknown::Release to release the existing reference.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
The client calls CoCreateInstance for IShellService, then calls SetOwner(this) to declare ownership. When the client is dismissed, typically when the window is closed, it calls SetOwner(NULL) to instruct the service object to release the reference to the owner object.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | shdeprecated.h |