Hi everyone,
I have a Class Library assembly written in VB2005, which I wish to expose via COM to an application written in Visual Basic 6. The library acts as an object store, and basically wraps a Hash table that is used for passing variables around DOTNET assemblies and, if my boss gets his way, VB6.
This is one of those personal projects that my boss has decided he likes the look of...
Anyway, here's the problem. To enable the user to add and inspect variables in the object store, I use a couple of generic methods -
Having marked the library for InterOp and also marked the Class as being exposed to COM, I'm finding it no-longer compiles as VB2005 knows that COM is going to freak at the generic methods. Fair enough...
At the moment, I have exposed the class via the <Microsoft.VisualBasic.ComClass()> attribute.
What I would like to do is to mark the generic methods so as they are ignored by the InterOp, allowing the compilation of the library to succeed - at which point I'll add things like VB6GetInt, VB6GetString etc to support VB6's needs (there will only be a few datatypes that VB6 should care about...)
Does anyone have an idea how this might be achieved?
Thanks,
mmilan.
I have a Class Library assembly written in VB2005, which I wish to expose via COM to an application written in Visual Basic 6. The library acts as an object store, and basically wraps a Hash table that is used for passing variables around DOTNET assemblies and, if my boss gets his way, VB6.
This is one of those personal projects that my boss has decided he likes the look of...
Anyway, here's the problem. To enable the user to add and inspect variables in the object store, I use a couple of generic methods -
Code:
GetObj(of T)(obj as T, sKey as String)
SetObj(of T)(obj as T, sKey as String)
Having marked the library for InterOp and also marked the Class as being exposed to COM, I'm finding it no-longer compiles as VB2005 knows that COM is going to freak at the generic methods. Fair enough...
At the moment, I have exposed the class via the <Microsoft.VisualBasic.ComClass()> attribute.
What I would like to do is to mark the generic methods so as they are ignored by the InterOp, allowing the compilation of the library to succeed - at which point I'll add things like VB6GetInt, VB6GetString etc to support VB6's needs (there will only be a few datatypes that VB6 should care about...)
Does anyone have an idea how this might be achieved?
Thanks,
mmilan.