ServiceProvider.GetService Method (Guid)

Gets the specified service from the unmanaged service provider.

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)

Syntax

'宣言
Public Function GetService ( _
    guid As Guid _
) As Object
'使用
Dim instance As ServiceProvider
Dim guid As Guid
Dim returnValue As Object

returnValue = instance.GetService(guid)
public Object GetService(
    Guid guid
)
public:
Object^ GetService(
    Guid guid
)
public function GetService(
    guid : Guid
) : Object

Parameters

  • guid
    Type: System.Guid

    The GUID of the service to retrieve.

Return Value

Type: System.Object

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

Permissions

See Also

Reference

ServiceProvider Class

ServiceProvider Members

GetService Overload

Microsoft.VisualStudio.Shell Namespace