Dela via


ServiceProvider.QueryService Method (Guid, 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 ( _
    guid As Guid, _
    <OutAttribute> ByRef service As Object _
) As Integer
public int QueryService(
    Guid guid,
    out Object service
)
public:
int QueryService(
    Guid guid, 
    [OutAttribute] Object^% service
)
member QueryService : 
        guid:Guid * 
        service:Object byref -> int
public function QueryService(
    guid : Guid, 
    service : Object
) : int

Parameters

  • guid
    Type: Guid

    The type of service to retrieve. The GUID of this type is used to obtain the service from the native service provider.

  • service
    Type: Object%

    [out] The requested service, or a nulla null reference (Nothing in Visual Basic) if the service could not be located.

Return Value

Type: Int32
The HRESULT.

.NET Framework Security

See Also

Reference

ServiceProvider Class

QueryService Overload

Microsoft.VisualStudio.Shell Namespace