COM class visibility: C# to VB6
Asked Answered
A

1

7

I have a C# .Net 4.0 Application on the one hand and on the other a VB6 App. I created a COM Interface by making the Project COM Visible and actived register COM Interop.

I Tested the COM interface by implementing a C# Application wich imports the new tlb file. All seems to be fine.

As next step I tried to use the dll with vb6. The dll could be loaded but now i can't see all public classes. In C# I see 4 classes in vb6 I can only see 3.

The class I can't see is a "special" one cause it impelements an interface and serves events.

The class is marked with

[ComSourceInterfaces(typeof(COMEvents))]

and the COMEvents interface is like

[Guid("11947063-4665-4DE1-931D-9915CCD01794")]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
    public interface COMEvents 
    {
        void MethodOne();
        void MethodTwo();
    }

I have to say that all worked fine. Than i added a project which only effects other assemblys wich are loaded on runtime by the COM interface project. They implement an interface which changed. Thats the only change i made to the com interface is adding additonal parameter to a method.

Why can't I see the Class any more? And why is it only the class I changed but in no "risky" way?

need help thanks!

P.S: I Tried up to now: -> all Project are Build x86 -> Project Build on x86 Machine -> Dependency Walker(GPSVC.DLL and IESHIMS.DLL are missing but they did also before and i don't think they have anny effect cause the tlb is build and could be loaded) -> tryied tlbexp.exe but get an dependencie error cause assambly runtime is newer than current one. wtf?)

Ator answered 11/3, 2011 at 9:41 Comment(0)
A
5

Found it... had constructor with 2 parameters and VB6 does not support constructors with more then zero parameters.

Ator answered 11/3, 2011 at 13:39 Comment(1)
Makes you wonder... "get an dependencie error cause assambly runtime is newer than current one.".... A completely non-related error, and still you persevered. I salute you, you brave man.Gorki

© 2022 - 2024 — McMap. All rights reserved.