다음을 통해 공유


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: Type

    The 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

See Also

Reference

ServiceProvider Class

QueryService Overload

Microsoft.VisualStudio.Shell Namespace