I got the Q319448 hotfix code to resolve the "Incorrect code message" I got
using a VSS Addin with my VS.Net Addin (I'm
trying to add additional functionality at the solution, project, file event
level to VS.Net. It failed miserably.. It seems that via the VS.Net Addin
the init code is being called twice and that althought the "Invalid code"
message is gone, it seems that none of the VSS events other than "Init /
Begin command / End command" are ever being called.
So I stepped back and created just a bare bones Vss Addin using the code
that Ryan Cromwell posted previously to this group. And using only Vss
Explorer, it caught the init and only the begin/end command events, but any
other VSS event handlers did not fire and the command
did not work (checkout displayed and completed the checkout dialog, but the
file list was not updated to display it as checked out). On startup I a saw
the VssAddin fire (Init, Begin/End, Begin/End, Begin/End) before displaying
the file list.
So I starting debugging via my VS.Net Addin and I was able to open a source
controlled solution, and saw the VssAddin fire (Init/End, Init/End,
Begin/End) in opening the solution, but would not fire any other events
after that. I was however able to do checkout/checkin/undo checkout and VSS
reported the checkout correctly (even though it never let me intercept those
events).
Any thoughts on what might be wrong. Any testing done on using this support
at all? Plans for making DTE.SourceControl more robust (how about adding
CheckIn?)
TIA,
Paul.
The SourceControl is an automation interface and all methods it exposes are
UI-less.
The Checkin operation requires UI to be displayed sometimes (e.g. in the
case of a merge conflict),
making this operation unsuitable for automation, where user intervention
shouldn't be required.
--
Alin Constantin
Email (reversed for spam avoidance) moc.tfosorcim@cnila
This posting is provided "AS IS" with no warranties, and confers no rights.
"Paul D'Anna" <pda...@iname.com> wrote in message
news:eYhqdWXcCHA.1652@tkmsftngp11...
Understood that it must be UI-less, but that doesn't mean that there
shouldn't be a UI-less base checkin method that could be used to update the
status of a file. The automation interfaces should allow the external user
flexibility to construct his own external UI interface and not limit usage
based on its own UI requirements (because it shouldn't have any). .
Any thoughts on the rest of the question about whether the Addin works based
on my tests.
Paul.
"Alin Constantin" <moc.tfosorcim@cnila> wrote in message
news:OHEvw3ycCHA.2496@tkmsftngp12...
On Fri, 11 Oct 2002 15:30:22 -0700, "Paul D'Anna" <pda...@iname.com>
wrote:
On Fri, 11 Oct 2002 15:30:22 -0700, "Paul D'Anna" <pda...@iname.com>
wrote:
>VSS Support its been a couple of weeks since I posted this, so I thought I
Option Explicit On
Option Strict On
Imports System
Imports System.Runtime.InteropServices
Imports SourceSafeTypeLib
Public Class MyVSSEventHandler
Implements IVSSEventHandler
Implements IDisposable
Public Shared pVSSApp As VSSApp
Private VSSEventsHandler As New CVSSEvents()
Private cpVSSEvents As UCOMIConnectionPoint
Private ckVSSEvents As Integer
Public Sub Init(ByVal pIVSS As VSSApp) _
Implements IVSSEventHandler.Init
pVSSApp = pIVSS
Dim cpc As UCOMIConnectionPointContainer
Dim IID_IVSSEvents As Guid = GetType(IVSSEvents).GUID
cpc = CType(pIVSS, UCOMIConnectionPointContainer)
cpc.FindConnectionPoint(IID_IVSSEvents, cpVSSEvents)
cpVSSEvents.Advise(VSSEventsHandler, ckVSSEvents)
End Sub
Public Sub Dispose() Implements System.IDisposable.Dispose
cpVSSEvents.Unadvise(ckVSSEvents) 'Libérer la connection
End Sub
End Class
Friend Class CVSSEvents
Implements IVSSEvents
Public Sub AfterAdd(ByVal pIItem As VSSItem, _
ByVal Local As String, _
ByVal Comment As String) _
Implements IVSSEvents.AfterAdd
'TODO
End Sub
Public Sub AfterBranch(ByVal pIItem As VSSItem, _
ByVal Comment As String) _
Implements IVSSEvents.AfterBranch
'TODO
End Sub
Public Sub AfterCheckin(ByVal pIItem As VSSItem, _
ByVal Local As String, _
ByVal Comment As String) _
Implements IVSSEvents.AfterCheckin
'TODO
End Sub
Public Sub AfterCheckout(ByVal pIItem As VSSItem, _
ByVal Local As String, _
ByVal Comment As String) _
Implements IVSSEvents.AfterCheckout
'TODO
End Sub
Public Sub AfterEvent(ByVal iEvent As Integer, _
ByVal pIItem As VSSItem, _
ByVal Str As String, _
ByVal var As Object) _
Implements IVSSEvents.AfterEvent
'TODO
End Sub
Public Sub AfterRename(ByVal pIItem As VSSItem, _
ByVal OldName As String) _
Implements IVSSEvents.AfterRename
'TODO
End Sub
Public Sub AfterUndoCheckout(ByVal pIItem As VSSItem, _
ByVal Local As String) _
Implements
IVSSEvents.AfterUndoCheckout
'TODO
End Sub
Public Function BeforeAdd(ByVal pIPrj As VSSItem, _
ByVal Local As String, _
ByVal Comment As String) As Boolean _
Implements IVSSEvents.BeforeAdd
'TODO
Return True
End Function
Public Function BeforeBranch(ByVal pIItem As VSSItem, _
ByVal Comment As String) As Boolean _
Implements IVSSEvents.BeforeBranch
'TODO
Return True
End Function
Public Function BeforeCheckin(ByVal pIItem As VSSItem, _
ByVal Local As String, _
ByVal Comment As String) As Boolean
_
Implements IVSSEvents.BeforeCheckin
'TODO
Return True
End Function
Public Function BeforeCheckout(ByVal pIItem As VSSItem, _
ByVal Local As String, _
ByVal Comment As String) As Boolean
_
Implements
IVSSEvents.BeforeCheckout
'TODO
Return True
End Function
Public Function BeforeEvent(ByVal iEvent As Integer, _
ByVal pIItem As VSSItem, _
ByVal Str As String, _
ByVal var As Object) As Boolean _
Implements IVSSEvents.BeforeEvent
'TODO
Return True
End Function
Public Function BeforeRename(ByVal pIItem As VSSItem, _
ByVal NewName As String) As Boolean _
Implements IVSSEvents.BeforeRename
'TODO
Return True
End Function
Public Function BeforeUndoCheckout(ByVal pIItem As VSSItem, _
ByVal Local As String) As
Boolean _
Implements
IVSSEvents.BeforeUndoCheckout
'TODO
Return True
End Function
Public Function BeginCommand(ByVal unused As Integer) As Boolean _
Implements IVSSEvents.BeginCommand
'TODO
Return True
End Function
Public Sub EndCommand(ByVal unused As Integer) _
Implements IVSSEvents.EndCommand
'TODO
End Sub
End Class
Paul
"Benoit Poirier" <ms...@codasys.net> wrote in message
news:3dad6dee...@msnews.microsoft.com...