Gets a pointer to an interface of the specified type.
Namespace: Microsoft.VisualStudio.Package
Assembly: MPF.Project.NonShipping (in MPF.Project.NonShipping.dll)
Syntax
'宣言
Public Function QueryService ( _
ByRef guidService As Guid, _
ByRef riid As Guid, _
<OutAttribute> ByRef ppvObject As IntPtr _
) As Integer
'使用
Dim instance As OleServiceProvider
Dim guidService As Guid
Dim riid As Guid
Dim ppvObject As IntPtr
Dim returnValue As Integer
returnValue = instance.QueryService(guidService, _
riid, ppvObject)
public int QueryService(
ref Guid guidService,
ref Guid riid,
out IntPtr ppvObject
)
public:
virtual int QueryService(
Guid% guidService,
Guid% riid,
[OutAttribute] IntPtr% ppvObject
) sealed
public final function QueryService(
guidService : Guid,
riid : Guid,
ppvObject : IntPtr
) : int
Parameters
guidService
Type: System.Guid%The GUID of the service.
riid
Type: System.Guid%The interface ID.
ppvObject
Type: System.IntPtr%[out] The pointer to the interface.
Return Value
Type: System.Int32
S_OK if the method succeeded, otherwise an error code.
Implements
IServiceProvider.QueryService(Guid%, Guid%, IntPtr%)
Permissions
- 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.