Hi,
I have tried to create the sample C# VSS addin described here:
http://msdn2.microsoft.com/library/hcdf9zk2(en-us,vs.80).aspx
but no event is being trapped. Actually, the COM component is not even registered.
Any pointer to a working demo/sample
Thanks in advance.

Any VSS addin sample that works?
Bruce_Krasnof
First, I'm using VSS2005.
The C# VSS addin sample works fine, but VSS explorer crashes while closing.
One more thing. Where should I place "VSSEvents.dll" Same folder as "ssaddin.ini" goes
Thanks in advance. Extra thanks to anybody who answers.
Dvorak Pavel
O.k, I figured it out by myself.
It was becuase of a line of code in my VSS2005 help file.
~IvssEventSample()
{
// Unwire the connection point (see Init)
vssEvents.Unadvise(cookie);
}
My local copy of msdn has the same the code as above, but
This destructor is empty in msdn online and crashing issue disappeared by commenting this code.
MikeFrey
You can get the sample working by doing the following:
1. There is a ; missing at line 3: using System.Runtime.InteropServices.ComTypes
2. Add the extra line as commented:
[Guid("E1916BD8-A8AA-47b7-A862-C1AF995E64EF")]
[ComVisible(true)] //this is the line you have to add; this value is false by default
public class IvssEventSample : IVSSEventHandler, IVSSEvents
3. In the ssaddin.ini file, add the name of the ProgID you created Microsoft.SourceSafe.EventSample = 1
instead of
Microsoft.SourceSafe.EventSam = 1
Double check, in HKCR -> CLSID -> {E1916BD8-A8AA-47b7-A862-C1AF995E64EF} -> ProgID (the name here is the name that goes in your ssaddin.ini file)
4. Create the ssaddin.ini file in the same folder as ssapi.dll (If it happens to be ..\Microsoft Visual Studio\VSS\win32, so be it)
This should get the sample working for you.
You might find this link helpful:
http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnvss/html/vssauto.asp
Lajash
I am converting a VB addin from VB6 to VB under Visual Studio 2005. The Init() method of the new addin is being called, but none of my event methods are being called.
Thanks,
Frank
Poma
blopez
However, the "Register for COM Interop" option has been checked.
Asifkhan75025
I have tried to generate a typelib from various .Net components and I always get the same result: empty typelibs. Other developers have observed the same behavior as well. Beta 1 apparently has the same problem.
STreml
However, all the class members are public, there's a default constructor and everything in the code appears to comply with COM Interop rules for exposing .Net types to COM.
I don't understand.