IVsProjectStartupServices.RemoveStartupService Method
Removes a service ID GUID from the list of third party services to be started and releases the service if it has been loaded.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'Declaration
Function RemoveStartupService ( _
ByRef guidService As Guid _
) As Integer
int RemoveStartupService(
ref Guid guidService
)
int RemoveStartupService(
[InAttribute] Guid% guidService
)
abstract RemoveStartupService :
guidService:Guid byref -> int
function RemoveStartupService(
guidService : Guid
) : int
Parameters
guidService
Type: System.Guid%[in] GUID object specifying service.
Return Value
Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From vsshell.idl:
HRESULT IVsProjectStartupServices::RemoveStartupService(
[in] REFGUID guidService
);
On RemoveStartupService, you stop the service by releasing the pointer previously held, and remove the GUID from the list of startup service GUIDs persisted with your project file.
This functionality is not provided in HierUtil7's CVsHierarchy, which is the basis for Basic Project's CMyProjectHierarchy, so the interface is implemented in the Basic Project sample. The implementation of the above behavior in Basic Project is contained within a member variable to the hierarchy (m_projectStartupServices), which adds the code it takes to remember the services, and start/stop them. The m_projectStartupServices class member is implemented in CVsProjectStartupServices in the file VsProjectStartupServices.h/.cpp, which you can analyze to get an example of proper implementation.
.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.