IMMDeviceActivate Method
Creates a COM object with the specified interface
Namespace: DevCase.Win32.InterfacesAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[PreserveSigAttribute]
HResult Activate(
ref Guid refId,
int clsCtx,
IntPtr activationParams,
ref Object refInterface
)
<PreserveSigAttribute>
Function Activate (
ByRef refId As Guid,
clsCtx As Integer,
activationParams As IntPtr,
ByRef refInterface As Object
) As HResult
Dim instance As IMMDevice
Dim refId As Guid
Dim clsCtx As Integer
Dim activationParams As IntPtr
Dim refInterface As Object
Dim returnValue As HResult
returnValue = instance.Activate(refId,
clsCtx, activationParams, refInterface)
[PreserveSigAttribute]
HResult Activate(
Guid% refId,
int clsCtx,
IntPtr activationParams,
Object^% refInterface
)
[<PreserveSigAttribute>]
abstract Activate :
refId : Guid byref *
clsCtx : int *
activationParams : IntPtr *
refInterface : Object byref -> HResult
No code example is currently available or this language may not be supported.
- refId Guid
-
The interface identifier.
This parameter is a reference to a GUID that identifies the interface that the caller requests be activated.
The caller will use this interface to communicate with the COM object.
- clsCtx Int32
-
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.
Alternatively, the client can avoid imposing any context restrictions by specifying CLSCTX_ALL.
- activationParams IntPtr
-
Set to Zero to activate an IAudioClient, IAudioEndpointVolume,
IAudioMeterInformation, IAudioSessionManager, or IDeviceTopology interface on an audio endpoint device.
When activating an IBaseFilter, IDirectSound, IDirectSound8,
IDirectSoundCapture, or IDirectSoundCapture8 interface on the device,
the caller can specify a pointer to a PROPVARIANT structure that contains stream-initialization information.
- refInterface Object
-
Pointer to a pointer variable into which the method writes the address of the interface specified by
parameter refId.
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(Guid, Int32, IntPtr, Object) call fails, refInterface is .
HResult
If the method succeeds, it returns
S_OK.
If it fails, it returns an
HResult value.