FW: Interop Problem: Object or class does not support the set of events

Brady Kelly <[email protected]> Wed, 6 Feb 2008 18:59:05 +0200
Newsgroups gmane.comp.windows.devel.dotnet.clr
Message-ID <[email protected]>
That was a brain fart.  My event name in the events interface doesn't match
the event name in the main class, but I wasn't warned because I'm not
explicitly inheriting the events interface.



From: Brady Kelly [mailto:[email protected]]
Sent: 06 February 2008 06:49 PM
To: 'Discussion of development on the .NET platform using any managed
language'
Subject: Interop Problem: Object or class does not support the set of events



Can anyone advise me on this issue?  I'm at a complete loss, and resorting
to 'bottom-up' rewrites to get my C# event source accepted by my VB6 client.
My COM interface is as below:



    public delegate void ProgressChangedEvent(string currentSection, int
totalRecords, int processedRecords);



    [ComVisible(true)]

    [Guid("41AC9609-F777-41ac-901B-E8EAAEDFD486")]

    [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]

    public interface _ExportEngine

    {

        string ConnectionString { get; set; }

        void RunExport(int batchId, string connectionString);

        int DemoDelay { get; set; }

        void DemoExportFile(string filePath);

    }



    [ComVisible(true)]

    [Guid("35182B01-57E1-4e46-978F-5AEAC43C04A9")]

    [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]

    public interface _ExportEngineEvents

    {

        void ProgressChangedEvent(string currentSection, int totalRecords,
int processedRecords);

    }



    [ComVisible(true)]

    [Guid("A5F75277-D8B7-4749-A3B7-A3AA0869B23F")]

    [ClassInterface(ClassInterfaceType.None)]

    [ComSourceInterfaces(typeof(_ExportEngineEvents))]

    public class ExportEngine: _ExportEngine

    {...






===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com