Rediger

Del via


Marshal.BindToMoniker(String) Method

Definition

Gets an interface pointer identified by the specified moniker.

public:
 static System::Object ^ BindToMoniker(System::String ^ monikerName);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static object BindToMoniker (string monikerName);
public static object BindToMoniker (string monikerName);
[System.Security.SecurityCritical]
public static object BindToMoniker (string monikerName);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member BindToMoniker : string -> obj
static member BindToMoniker : string -> obj
[<System.Security.SecurityCritical>]
static member BindToMoniker : string -> obj
Public Shared Function BindToMoniker (monikerName As String) As Object

Parameters

monikerName
String

The moniker corresponding to the desired interface pointer.

Returns

An object containing a reference to the interface pointer identified by the monikerName parameter. A moniker is a name, and in this case, the moniker is defined by an interface.

Attributes

Exceptions

An unrecognized HRESULT was returned by the unmanaged BindToMoniker method.

Remarks

BindToMoniker exposes the COM BindToMoniker method, which produces an object that you can cast to any COM interface you require. This method provides the same functionality as the GetObject method in Visual Basic 6.0 and Visual Basic 2005.

Applies to