Condividi tramite


ILocalRegistry3.GetClassObjectOfClsid Method

Returns the class object that is associated with a CLSID.

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

Syntax

'Dichiarazione
Function GetClassObjectOfClsid ( _
    ByRef clsid As Guid, _
    dwFlags As UInteger, _
    lpReserved As IntPtr, _
    ByRef riid As Guid, _
    ppvClassObject As IntPtr _
) As Integer
'Utilizzo
Dim instance As ILocalRegistry3
Dim clsid As Guid
Dim dwFlags As UInteger
Dim lpReserved As IntPtr
Dim riid As Guid
Dim ppvClassObject As IntPtr
Dim returnValue As Integer

returnValue = instance.GetClassObjectOfClsid(clsid, _
    dwFlags, lpReserved, riid, ppvClassObject)
int GetClassObjectOfClsid(
    ref Guid clsid,
    uint dwFlags,
    IntPtr lpReserved,
    ref Guid riid,
    IntPtr ppvClassObject
)
int GetClassObjectOfClsid(
    [InAttribute] Guid% clsid, 
    [InAttribute] unsigned int dwFlags, 
    [InAttribute] IntPtr lpReserved, 
    [InAttribute] Guid% riid, 
    [InAttribute] IntPtr ppvClassObject
)
function GetClassObjectOfClsid(
    clsid : Guid, 
    dwFlags : uint, 
    lpReserved : IntPtr, 
    riid : Guid, 
    ppvClassObject : IntPtr
) : int

Parameters

  • clsid
    Type: System.Guid%

    [in] Class identifier (CLSID) of the requested object. This CLSID is associated with the data and code that is used to create the object.

  • riid
    Type: System.Guid%

    [in] Interface to be used to communicate with the object. For example, IID_IClassFactory.

  • ppvClassObject
    Type: System.IntPtr

    [in] Address of pointer variable that receives the interface pointer that is requested in riid. On successful return, ppvObj contains the requested interface pointer. On failure, ppvObj 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.

Implements

ILocalRegistry2.GetClassObjectOfClsid(Guid%, UInt32, IntPtr, Guid%, IntPtr)

Remarks

COM Signature

From objext.idl:

HRESULT ILocalRegistry3::GetClassObjectOfClsid(
    [in] REFCLSID clsid, 
    [in] DWORD dwFlags, 
    [in] LPVOID lpReserved, 
    [in] REFIID riid, 
    [in] void** ppvClassObject
);

Specify a value of CLSCTX_INPROC_SERVER for the dwFlags parameter to instantiate the object locally. If you do not specify this value, then the object will be instantiated globally by using CoCreateInstance.

Permissions

See Also

Reference

ILocalRegistry3 Interface

ILocalRegistry3 Members

Microsoft.VisualStudio.Shell.Interop Namespace