Marshal::CreateAggregatedObject<T> Method (IntPtr, T)
![]() |
---|
The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience. |
[Supported in the .NET Framework 4.5.1 and later versions]
Aggregates a managed object of the specified type with the specified COM object.
Assembly: mscorlib (in mscorlib.dll)
public: generic<typename T> [SecurityCriticalAttribute] static IntPtr CreateAggregatedObject( IntPtr pOuter, T o )
Parameters
- pOuter
-
Type:
System::IntPtr
The outer IUnknown pointer.
- o
-
Type:
T
The managed object to aggregate.
Type Parameters
- T
The type of the managed object to aggregate.
Exception | Condition |
---|---|
ArgumentException | o is a Windows Runtime object. |
TheCreateAggregatedObject<T> 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.
SecurityCriticalAttribute
requires full trust for the immediate caller. This member cannot be used by partially trusted or transparent code.
Universal Windows Platform
Available since 8.1
.NET Framework
Available since 4.5.1
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1
Available since 8.1
.NET Framework
Available since 4.5.1
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1
Show: