Hi,
Is there anything out there which can take either a COM interface
definition as an input, or a VB6 class file as an input, and return a
..NET Interface definition block as an output?
I need to refactor a block of VB6 code, and the converters built into VS
2005 aren't working at all for me.
Rob 3 1260
Rob Perkins wrote: Hi,
Is there anything out there which can take either a COM interface definition as an input, or a VB6 class file as an input, and return a .NET Interface definition block as an output?
I need to refactor a block of VB6 code, and the converters built into VS 2005 aren't working at all for me.
Rob
What seems to be the problem Rob? There are command line utilities
(tlbimp.exe) that can take a dll or type lib and convert them into .NET
RCW's. You can also go the other way with tlbexp.exe.
VS will do this for you automatically if you reference the compiled VB6
dll...
Or are you just trying to convert the actual code? If that's the case
- and the converters are having issues with it, then you may need to do
a re-write there....
--
Tom Shelton [MVP]
Tom Shelton wrote: Rob Perkins wrote:
Hi,
Is there anything out there which can take either a COM interface definition as an input, or a VB6 class file as an input, and return a .NET Interface definition block as an output?
I need to refactor a block of VB6 code, and the converters built into VS 2005 aren't working at all for me.
Rob
What seems to be the problem Rob? There are command line utilities (tlbimp.exe) that can take a dll or type lib and convert them into .NET RCW's. You can also go the other way with tlbexp.exe.
VS will do this for you automatically if you reference the compiled VB6 dll...
No no, I'm aware of those. However, I discovered a circular reference
situation which makes me uncomfortable where I have a COM DLL containing
four COM interfaces, one of which is referenced by my .NET assembly.
The .NET assembly, in turn, references the interfaces on the COM DLL. It
has not failed to work, but it has made debugging... interesting.
I can resolve it by refactoring one of the COM classes into a .NET
class, and I've found that the code conversion stuff doesn't really work
that well on the whole class, though it works just fine on snippets of
code from the class, without telling me which part of the class it's got
trouble with.
Therefore, if I can produce a (rather complex) .NET *interface* for the
COM code, and expose that to COM, along with a .NET implementation
class, I can resolve the circular reference problem which is giving me
fits.
Make sense?
Or are you just trying to convert the actual code? If that's the case - and the converters are having issues with it, then you may need to do a re-write there....
A rewrite is basically what I'm doing, natch. But the rewrite must in
turn expose its interface to COM, which is why I wanted to duplicate, as
much as possible, what I already had. The snippet converter in the tools
menu has no problem with most of the class, but it won't tell me which
part of the class it has problems with, since the machine just enters
some kind of race condition, whose only exit is a forced termination of
the devenv process.
Rob No no, I'm aware of those. However, I discovered a circular reference situation which makes me uncomfortable where I have a COM DLL containing four COM interfaces, one of which is referenced by my .NET assembly.
By that I mean that the COM DLL references an interface on the .NET
assembly. The .NET assembly, in turn, references the interfaces on the COM DLL. It has not failed to work, but it has made debugging... interesting.
The .NET assembly in turn references *different* interfaces on the COM DLL.
Rob This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: PatchFactory Support |
last post by:
Description:
Professional and easy-to-use patch building environment that can help
you to create instant patch packages for software and file updating.
Generated patch packages are small size...
|
by: AIM |
last post by:
Error in msvc in building inheritance.obj to build hello.pyd
Hello,
I am trying to build the boost 1.31.0 sample extension hello.cpp.
I can not compile the file inheritance.cpp because the two...
|
by: Anon Email |
last post by:
Hi people,
I'm learning about header files in C++. The following is code from
Bartosz Milewski:
// Code
const int maxStack = 16;
class IStack
|
by: Ole Olsen |
last post by:
Hi
Any input on what is best practice:
1 ) Put an Interface definition (e.g. IMyInterface) into a separate Assembly
2 ) Put the Interface definirion into the same assembly that holds the...
|
by: John Salerno |
last post by:
I understand how they work (basically), but I think maybe the examples
I'm reading are too elementary to really show their value. Here's one
from Programming C#:
#region Using directives
...
|
by: Mark |
last post by:
I create a simple interface in a com object:
public interface ISimple
{
void a();
int b();
}
I build the object in Visual Studio and load the object from Excel. I can call a and b...
|
by: Shane Story |
last post by:
Have an app and would like to allow easy addition of MYAPP.EXE /F /P (for
example)
my prog with command line args, as a job to be run.
Would like to make it easier on the user to run the app. ...
|
by: Luc Kumps |
last post by:
(Sorry about the previous post, it got transmitted before it was complete)
We try to separate implementation and interface defintions, but we run into
a problem. I hope the guru's can solve this,...
|
by: WTH |
last post by:
I am now aware (I am primarily a C++ developer) that in C# if you reference
the same interface from the same file in two different projects the types
are actually incompatible.
I found this out...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |