This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Signifies that a source code control event has occurred.
Namespace:  Microsoft.VisualStudio.VCProjectEngine
Assembly:  Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)
Syntax
声明
Sub SccEvent ( _
    Item As Object, _
    eventID As enumSccEvent _
)
用法
Dim instance As _dispVCProjectEngineEvents
Dim Item As Object
Dim eventID As enumSccEvent
instance.SccEvent(Item, eventID)
void SccEvent(
    Object Item,
    enumSccEvent eventID
)
void SccEvent(
    [InAttribute] Object^ Item, 
    [InAttribute] enumSccEvent eventID
)
function SccEvent(
    Item : Object, 
    eventID : enumSccEvent
)
Parameters
- Item 
 Type: System.Object- Required. The item. 
- eventID 
 Type: Microsoft.VisualStudio.VCProjectEngine.enumSccEvent- Required. The event. An enumSccEvent value. 
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.
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
Permissions
- 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.
See Also
Reference
_dispVCProjectEngineEvents Interface