IVsProjectStartupServices::RemoveStartupService Method (Guid)
Removes a service ID GUID from the list of third party services to be started and releases the service if it has been loaded.
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Parameters
- guidService
-
Type:
System::Guid
[in] GUID object specifying service.
Return Value
Type: System::Int32If the method succeeds, it returns S_OK. If it fails, it returns an error code.
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 's CMyProjectHierarchy, so the interface is implemented in the sample. The implementation of the above behavior in 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.385fd2a3-d9f1-4808-87c2-a3f05a91fc36385fd2a3-d9f1-4808-87c2-a3f05a91fc36385fd2a3-d9f1-4808-87c2-a3f05a91fc36