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 1277
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 self-extracting executable
update programs in a famous installer style with adjustable
user-friendly interface and multilingual support.
Enhanced with features like easy-to-use interface including a Wizard
mode, powerful patch engine, integrated...
|
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
files containing some templates: adjacency_list.hpp and mem_fn.hpp can
not compile.
Does anyone have any solutions?
|
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
concreate and implementing class?
MS seems to like the first approach with 2 assemblies over the latter with
just one assembly?
|
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
using System;
using System.Collections.Generic;
using System.Text;
| |
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 without any problems.
|
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. I want to have it
run automatically as specified by the user.
What is the best thing to do and what platforms would it limit me to?
|
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, as we seem to lack only a
single 'step' to have "full separation"...
We have a first project, namespace Ninterface, that contains the interface
definitions in class1_interface.cs, like this:
namespace Ninterface {
public interface IClass1{
|
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 because I have written a generic plugin system for my
current and future C# needs. I defined a base plugin system interface named
IPlugin (original, I know...) which contains some basic plugin infomration
all plugins of this system must expose...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |