IPart::Activate method (devicetopology.h)
The Activate method activates a function-specific interface on a connector or subunit.
Syntax
HRESULT Activate(
[in] DWORD dwClsContext,
[in] REFIID refiid,
[out] void **ppvObject
);
Parameters
[in] dwClsContext
The execution context in which the code that manages the newly created object will run. The caller can restrict the context by setting this parameter to the bitwise OR of one or more CLSCTX enumeration values. The client can avoid imposing any context restrictions by specifying CLSCTX_ALL. For more information about CLSCTX, see the Windows SDK documentation.
[in] refiid
The interface ID for the requested control function. The client should set this parameter to one of the following REFIID values:
IID_IAudioAutoGainControl
IID_IAudioBass
IID_IAudioChannelConfig
IID_IAudioInputSelector
IID_IAudioLoudness
IID_IAudioMidrange
IID_IAudioMute
IID_IAudioOutputSelector
IID_IAudioPeakMeter
IID_IAudioTreble
IID_IAudioVolumeLevel
IID_IDeviceSpecificProperty
IID_IKsFormatSupport
IID_IKsJackDescription
IID_IKsJackDescription2
For more information, see Remarks.
[out] ppvObject
Pointer to a pointer variable into which the method writes the address of the interface that is specified by parameter refiid. Through this method, the caller obtains a counted reference to the interface. The caller is responsible for releasing the interface, when it is no longer needed, by calling the interface's Release method. If the Activate call fails, *ppObject is NULL.
Return value
If the method succeeds, it returns S_OK. If it fails, possible return codes include, but are not limited to, the values shown in the following table.
Return code | Description |
---|---|
|
The CLSCTX_INPROC_SERVER bit in dwClsContext is zero. |
|
Pointer ppvObject is NULL. |
|
The part object does not support the requested interface. |
Remarks
The Activate method supports the following function-specific control interfaces:
- IAudioAutoGainControl
- IAudioBass
- IAudioChannelConfig
- IAudioInputSelector
- IAudioLoudness
- IAudioMidrange
- IAudioMute
- IAudioOutputSelector
- IAudioPeakMeter
- IAudioTreble
- IAudioVolumeLevel
- IDeviceSpecificProperty
- IKsFormatSupport
- IKsJackDescription
- IKsJackDescription2
const IID IID_IAudioAutoGainControl __uuidof(IAudioAutoGainControl)
For more information about the __uuidof operator, see the Windows SDK documentation.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | devicetopology.h |