Export (0) Print
Expand All

Marshal.CreateAggregatedObject(T) Method (IntPtr, T)

[Supported in the .NET Framework 4.5.1 and later versions]

Aggregates a managed object of the specified type with the specified COM object.

Namespace:  System.Runtime.InteropServices
Assembly:  mscorlib (in mscorlib.dll)

static member CreateAggregatedObject : 
        pOuter:IntPtr * 
        o:'T -> IntPtr

Type Parameters


The type of the managed object to aggregate.


Type: System.IntPtr

The outer IUnknown pointer.

Type: T

The managed object to aggregate.

Return Value

Type: System.IntPtr
The inner IUnknown pointer of the managed object.


o is a Windows Runtime object.

TheCreateAggregatedObject method aggregates the inner managed pointer of a managed object of a specified type with the specified outer pointer, and returns an inner IUnknown pointer of the managed object.

.NET Framework

Supported in: 4.6, 4.5.1

Supported in: Windows Phone 8.1

  • SecurityCriticalAttribute 

    requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.

Windows Phone 8.1

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

© 2014 Microsoft