共用方式為


ILocalRegistry3.GetClassObjectOfManagedClass Method

Returns an interface that is implemented by a particular managed object.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'宣告
Function GetClassObjectOfManagedClass ( _
    codeBase As String, _
    assemblyName As String, _
    typeName As String, _
    ByRef riid As Guid, _
    <OutAttribute> ByRef ppvClassObject As IntPtr _
) As Integer
'用途
Dim instance As ILocalRegistry3
Dim codeBase As String
Dim assemblyName As String
Dim typeName As String
Dim riid As Guid
Dim ppvClassObject As IntPtr
Dim returnValue As Integer

returnValue = instance.GetClassObjectOfManagedClass(codeBase, _
    assemblyName, typeName, riid, ppvClassObject)
int GetClassObjectOfManagedClass(
    string codeBase,
    string assemblyName,
    string typeName,
    ref Guid riid,
    out IntPtr ppvClassObject
)
int GetClassObjectOfManagedClass(
    [InAttribute] String^ codeBase, 
    [InAttribute] String^ assemblyName, 
    [InAttribute] String^ typeName, 
    [InAttribute] Guid% riid, 
    [OutAttribute] IntPtr% ppvClassObject
)
abstract GetClassObjectOfManagedClass : 
        codeBase:string * 
        assemblyName:string * 
        typeName:string * 
        riid:Guid byref * 
        ppvClassObject:IntPtr byref -> int 
function GetClassObjectOfManagedClass(
    codeBase : String, 
    assemblyName : String, 
    typeName : String, 
    riid : Guid, 
    ppvClassObject : IntPtr
) : int

Parameters

  • codeBase
    Type: System.String
    [in] String that contains a URL that is the location of the assembly. Optional: use nulla null reference (Nothing in Visual Basic) if you do not use a URL. For more information, see CodeBase.
  • assemblyName
    Type: System.String
    [in] String that contains the simple, unencrypted name of the assembly.
  • typeName
    Type: System.String
    [in] String that contains the name of the type to create.
  • riid
    Type: System.Guid%
    [in] Interface to be used to communicate with the object. For example, IID_IClassFactory.
  • ppvClassObject
    Type: System.IntPtr%
    [out] Pointer to the interface that is requested in riid. On successful return, ppvClassObject contains the requested interface pointer. On failure, ppvClassObject contains nulla null reference (Nothing in Visual Basic).

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From objext.idl:

HRESULT ILocalRegistry3::GetClassObjectOfManagedClass(
    [in] LPCWSTR codeBase, 
    [in] LPCWSTR assemblyName, 
    [in] LPCWSTR typeName, 
    [in] REFIID riid, 
    [out] void** ppvClassObject
;

.NET Framework Security

See Also

Reference

ILocalRegistry3 Interface

ILocalRegistry3 Members

Microsoft.VisualStudio.Shell.Interop Namespace