ServiceProvider.QueryService Method (Type, Object%)
Gets type-based services from the unmanaged service provider, with an option to prevent the error being sent to the shell.
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)
Syntax
'Declaration
Public Function QueryService ( _
serviceType As Type, _
<OutAttribute> ByRef service As Object _
) As Integer
public int QueryService(
Type serviceType,
out Object service
)
public:
int QueryService(
Type^ serviceType,
[OutAttribute] Object^% service
)
member QueryService :
serviceType:Type *
service:Object byref -> int
public function QueryService(
serviceType : Type,
service : Object
) : int
Parameters
serviceType
Type: TypeThe type of service to retrieve.
service
Type: Object%The requested service, or nulla null reference (Nothing in Visual Basic).
Return Value
Type: Int32
The HRESULT.
.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.