ILocalRegistryCorrected.GetClassObjectOfClsid Method
Returns the class object associated with a CLSID.
Namespace: Microsoft.VisualStudio.Shell.Flavor
Assembly: Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)
Syntax
'Declaration
Function GetClassObjectOfClsid ( _
ByRef clsid As Guid, _
dwFlags As UInteger, _
lpReserved As IntPtr, _
ByRef riid As Guid, _
<OutAttribute> ByRef ppvClassObject As IntPtr _
) As Integer
int GetClassObjectOfClsid(
ref Guid clsid,
uint dwFlags,
IntPtr lpReserved,
ref Guid riid,
out IntPtr ppvClassObject
)
int GetClassObjectOfClsid(
Guid% clsid,
unsigned int dwFlags,
IntPtr lpReserved,
Guid% riid,
[OutAttribute] IntPtr% ppvClassObject
)
abstract GetClassObjectOfClsid :
clsid:Guid byref *
dwFlags:uint32 *
lpReserved:IntPtr *
riid:Guid byref *
ppvClassObject:IntPtr byref -> int
function GetClassObjectOfClsid(
clsid : Guid,
dwFlags : uint,
lpReserved : IntPtr,
riid : Guid,
ppvClassObject : IntPtr
) : int
Parameters
clsid
Type: Guid%[in] Class identifier (CLSID) of the requested object. This is the CLSID associated with the data and code that is used to create the object.
dwFlags
Type: UInt32[in] Flags controlling the instance creation from the CLSCTX enumeration. Specifies a value of CLSCTX_INPROC_SERVER.
lpReserved
Type: IntPtr[in] Reserved.
riid
Type: Guid%[in] Interface to be used to communicate with the object. For example, IID_IClassFactory.
ppvClassObject
Type: IntPtr%[in] Address of pointer variable that receives the interface pointer requested in riid. Upon successful return, ppvObj contains the requested interface pointer. Upon failure, ppvObj contains nulla null reference (Nothing in Visual Basic).
Return Value
Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
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 using COM's CoCreateInstance function.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.