Compartilhar via


_dispVCProjectEngineEvents.SccEvent(Object, enumSccEvent) Method

Definition

Signifies that a source code control event has occurred.

This API supports the product infrastructure and is not intended to be used directly from your code.

public:
 void SccEvent(System::Object ^ Item, Microsoft::VisualStudio::VCProjectEngine::enumSccEvent eventID);
public:
 void SccEvent(Platform::Object ^ Item, Microsoft::VisualStudio::VCProjectEngine::enumSccEvent eventID);
void SccEvent(winrt::Windows::Foundation::IInspectable const & Item, Microsoft::VisualStudio::VCProjectEngine::enumSccEvent eventID);
[System.Runtime.InteropServices.DispId(280)]
public void SccEvent (object Item, Microsoft.VisualStudio.VCProjectEngine.enumSccEvent eventID);
[<System.Runtime.InteropServices.DispId(280)>]
abstract member SccEvent : obj * Microsoft.VisualStudio.VCProjectEngine.enumSccEvent -> unit
Public Sub SccEvent (Item As Object, eventID As enumSccEvent)

Parameters

Item
Object

Required. The item.

eventID
enumSccEvent

Required. The event. An enumSccEvent value.

Attributes

Examples

[Visual Basic]

' add reference to Microsoft.VisualStudio.VCProjectEngine  
Imports EnvDTE  
Imports Microsoft.VisualStudio.VCProjectEngine  

Public Module Module1  
    Sub SccEvent(ByVal item As Object, ByVal eventid As enumSccEvent)  
        Dim vcitem As VCProjectItem  
        vcitem = item  
        MsgBox(vcitem.Name)  
    End Sub  

    Sub Main()  
        Dim projEngine As VCProjectEngine  
        Dim evt As VCProjectEngineEvents  
        Dim prj As VCProject  
        Dim configuration As VCConfiguration  
        prj = DTE.Solution.Projects.Item(1).Object  
        projEngine = prj.VCProjectEngine  
        evt = projEngine.Events  
        AddHandler evt.SccEvent, AddressOf SccEvent  
        configuration = prj.Configurations.Item("Debug")  
        configuration.IntermediateDirectory = "DebugNew"  
    End Sub  

End Module

Remarks

The SccEvent method can be used to catch, allow a change, or disallow a change to project file settings. It can also be used when integrating your own source code system into Visual Studio.

Applies to