Marshal.CreateAggregatedObject 方法

定義

多載

CreateAggregatedObject(IntPtr, Object)
已淘汰.

將 Managed 物件與指定的 COM 物件進行彙總。

CreateAggregatedObject<T>(IntPtr, T)

將所指定類型的 Managed 物件與指定的 COM 物件進行彙總。

CreateAggregatedObject(IntPtr, Object)

來源:
Marshal.NoCom.cs
來源:
Marshal.NoCom.cs
來源:
Marshal.NoCom.cs

警告

CreateAggregatedObject(IntPtr, Object) may be unavailable in future releases. Instead, use CreateAggregatedObject<T>(IntPtr, T). For more info, go to http://go.microsoft.com/fwlink/?LinkID=296518

將 Managed 物件與指定的 COM 物件進行彙總。

public:
 static IntPtr CreateAggregatedObject(IntPtr pOuter, System::Object ^ o);
[System.Obsolete("CreateAggregatedObject(IntPtr, Object) may be unavailable in future releases. Instead, use CreateAggregatedObject<T>(IntPtr, T). For more info, go to http://go.microsoft.com/fwlink/?LinkID=296518")]
[System.Security.SecurityCritical]
public static IntPtr CreateAggregatedObject (IntPtr pOuter, object o);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static IntPtr CreateAggregatedObject (IntPtr pOuter, object o);
[System.Security.SecurityCritical]
public static IntPtr CreateAggregatedObject (IntPtr pOuter, object o);
public static IntPtr CreateAggregatedObject (IntPtr pOuter, object o);
[<System.Obsolete("CreateAggregatedObject(IntPtr, Object) may be unavailable in future releases. Instead, use CreateAggregatedObject<T>(IntPtr, T). For more info, go to http://go.microsoft.com/fwlink/?LinkID=296518")>]
[<System.Security.SecurityCritical>]
static member CreateAggregatedObject : nativeint * obj -> nativeint
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member CreateAggregatedObject : nativeint * obj -> nativeint
[<System.Security.SecurityCritical>]
static member CreateAggregatedObject : nativeint * obj -> nativeint
static member CreateAggregatedObject : nativeint * obj -> nativeint
Public Shared Function CreateAggregatedObject (pOuter As IntPtr, o As Object) As IntPtr

參數

pOuter
IntPtr

nativeint

外部 IUnknown 指標。

o
Object

要彙總的物件。

傳回

IntPtr

nativeint

受管理物件的內部 IUnknown 指標。

屬性

例外狀況

o是 Windows 執行階段物件。

備註

CreateAggregatedObject方法會使用指定的外部指標來匯總 Managed 對象的內部 Managed 指標,然後傳回 Managed 對象的內部 IUnknown 指標。

適用於

CreateAggregatedObject<T>(IntPtr, T)

來源:
Marshal.NoCom.cs
來源:
Marshal.NoCom.cs
來源:
Marshal.NoCom.cs

將所指定類型的 Managed 物件與指定的 COM 物件進行彙總。

public:
generic <typename T>
 static IntPtr CreateAggregatedObject(IntPtr pOuter, T o);
[System.Security.SecurityCritical]
public static IntPtr CreateAggregatedObject<T> (IntPtr pOuter, T o);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static IntPtr CreateAggregatedObject<T> (IntPtr pOuter, T o);
public static IntPtr CreateAggregatedObject<T> (IntPtr pOuter, T o);
[<System.Security.SecurityCritical>]
static member CreateAggregatedObject : nativeint * 'T -> nativeint
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member CreateAggregatedObject : nativeint * 'T -> nativeint
static member CreateAggregatedObject : nativeint * 'T -> nativeint
Public Shared Function CreateAggregatedObject(Of T) (pOuter As IntPtr, o As T) As IntPtr

類型參數

T

要彙總的 Managed 物件類型。

參數

pOuter
IntPtr

nativeint

外部 IUnknown 指標。

o
T

要彙總的 Managed 物件。

傳回

IntPtr

nativeint

Managed 物件的內部 IUnknown 指標。

屬性

例外狀況

o是 Windows 執行階段物件。

備註

CreateAggregatedObject方法會匯總具有指定外部指標之指定型別之 Managed 物件的內部 Managed 指標,並傳回 Managed 物件的內部 IUnknown 指標。

適用於