HighTechTalks DotNet Forums  

Interop problems from C# to VB

Dotnet Academic General Discussions microsoft.public.dotnet.academic


Discuss Interop problems from C# to VB in the Dotnet Academic General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Interop problems from C# to VB - 02-23-2004 , 10:13 AM






I am working on an existing .NET (C Sharp) component that had a com
interface that was used by a VB component. When it was originally
written, it had a class with 12 methods that inherited from that
interface. I needed to add two new ones. I was told I would need to
create a secondary interface
that the class would use which I've done. I cannot get VB to
recognize both the new and old methods in any situation I've tried. I
have tried the following scenarios to no avail. Can someone help
here?

1) Tried with just the old interface with 12 methods and got rid of
my two new ones - this worked just fine but since I need the new
ones...

2) Added two new methods to old interface - old methods worked, new
ones caused "Object doesn't support this property or method" error.

3) Left old interface with two new methods - changed the guid -
caused "Type Mismatch" error when object was being created.

4) Created new interface with two new methods, had my class inherit
from both the old and new interface - VB does not show the new methods
in intellisense and trying to call them causes "Object doesn't support
this property or method" error (interestingly enough if I change my
class to inherit from the new class first and the old class second,
then the old methods don't show up in intellisense, the new ones do).

5) In new interface, had it inherit from old interface and had my
class inherit just from new interface - VB does not show the old
methods in intellisense and trying to call them causes "Object doesn't
support this property or method" error.

6) In old interface, had it inherit from new interface - VB does not
show the new methods in intellisense and trying to call them causes
"Object doesn't support this property or method" error.

7) In new interface, removed inheritance from old interface - put
methods from old interface in new interface, had class inherit from
new interface only. VB shows all methods in intellisense, but throws
"Object doesn't support this property or method" error when calling
old methods. New method calls work just fine.

8) Kept new and old interface, had class inherit from old interface.
Created brand new class and had it inherit from new interface. Create
a seperate object in VB to call new methods that would use new class
from C# code. When object attempted to get created got the error:
"Could not load type PLXX0005.SSEAssemblyCom2 from assembly PLXX0005.
PLXX0005.SSEAssemblyCom2"

Reply With Quote
  #2  
Old   
Tom
 
Posts: n/a

Default RE: Interop problems from C# to VB - 02-24-2004 , 06:46 PM






I suspect you are trying to reference an ActiveX VB 6 server from C#
If you build the ActiveX component with VB 6, then it is probably already registered into your PC. Your C# app must re-reference to that same ActiveX component or object. Check your Object browser for the newly build ActiveX VB 6 server for your new methods. If they can be viewed in the Browser, then you should be able to compile and run

gl,

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.