473,408 Members | 1,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

C++/C# Interop and gacutil/regasm DOS commands

Hello everybody,
I am getting in the tough issue in my application. I hope I can get
some advice from you. My application CatchAllMessages is mainly written
in C++ and is used to catch messages from the internal network. I have
many interfaces to display message data. But for some unlucky reason,
we designed the new interface written in C# to catch a new message
which has the different platform compared to messages caught in
CatchAllMessages application. That's why I am using Interop to regsiter
the C# DLL as the COM object.
What I did was to create the DataWrapper.cpp class( in DataWrapper
project ) which translates some basic data of the message, such as
IPAddress and the content of the message. Then, I created the
NewMessage.cs( written in C#) in the NewMessage project. My
NewMessage.cs class can catch the content of the message sent by the
DataWrapper.cpp and then display to the NewMessage interface.
To open the NewMessage interface, I have to run the following DOS
commands after compiling to produce CatchAllMessages.dll,
DataWrapper.dll, and NewMessage.dll:
gacutil /i DataWrapper.dll CatchAllMessages\Debug
gacutil /i NewMessage.dll CatchAllMessages\Debug
regasm DataWrapper.dll
/tlb:CatchAllMessages\Debug\com.DataWrapper.tlb
regasm NewMessage.dll /tlb:CatchAllMessages\Debug\com.NewMessage.tlb

Two tools, gacutil and regasm, are provided by .NET Framework 1.1.
After that, I execute my application CatchAllMessages from the .NET
2003 IDE. The code works fine. My problem is that I don't want the user
to run those DOS commands. The user just needs to double click
CatchAllMessages.exe to run the application.
Do you know any way to run those commands programmatically? I really
appreciate your help and thank you for reading the message.
Jared.

Sep 13 '06 #1
1 5607

tr******@yahoo.com wrote:
Hello everybody,
I am getting in the tough issue in my application. I hope I can get
some advice from you. My application CatchAllMessages is mainly written
in C++ and is used to catch messages from the internal network. I have
many interfaces to display message data. But for some unlucky reason,
we designed the new interface written in C# to catch a new message
which has the different platform compared to messages caught in
CatchAllMessages application. That's why I am using Interop to regsiter
the C# DLL as the COM object.
What I did was to create the DataWrapper.cpp class( in DataWrapper
project ) which translates some basic data of the message, such as
IPAddress and the content of the message. Then, I created the
NewMessage.cs( written in C#) in the NewMessage project. My
NewMessage.cs class can catch the content of the message sent by the
DataWrapper.cpp and then display to the NewMessage interface.
To open the NewMessage interface, I have to run the following DOS
commands after compiling to produce CatchAllMessages.dll,
DataWrapper.dll, and NewMessage.dll:
gacutil /i DataWrapper.dll CatchAllMessages\Debug
gacutil /i NewMessage.dll CatchAllMessages\Debug
regasm DataWrapper.dll
/tlb:CatchAllMessages\Debug\com.DataWrapper.tlb
regasm NewMessage.dll /tlb:CatchAllMessages\Debug\com.NewMessage.tlb

Two tools, gacutil and regasm, are provided by .NET Framework 1.1.
After that, I execute my application CatchAllMessages from the .NET
2003 IDE. The code works fine. My problem is that I don't want the user
to run those DOS commands. The user just needs to double click
CatchAllMessages.exe to run the application.
Do you know any way to run those commands programmatically? I really
appreciate your help and thank you for reading the message.
None of that crap has anything to do with C++. C++.NET is not the same
language and none of those commands are part of any normal C++ toolkit
either. You need to go talk to MS people about these problems.

Sep 13 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Kevin Flanagan | last post by:
This can be reproduced with VS.NET as follows. Create a new ATL project with default wizard settings (dll, attributed). To the 'module' attribute, add a specifier 'version = "1.10" ' alongside the...
0
by: Roy | last post by:
Hi all, I have the following issue: I have a .net assembly that I need registered in the GAC as well as registered for COM interop (using gacutil). When I deploy it to clients I register it with...
20
by: Razzie | last post by:
Hey all, I'm really going through a small hell right now - I've completely lost it :) I made a project, using two interop libraries from exchange (created them as in this msdn article:...
2
by: Id L | last post by:
hi, i want to use gacutil.exe and regasm.exe but i don't want to install "all" .net framework SDK do you know if i can install only these 2 methods? or maybe i can use them without installing...
1
by: Peter Reid | last post by:
Hi I've created an interop dll with the following commands: tlbimp NegociosObjects.dll /keyfile:key.snk /out:NegociosObjectsInterop.dll gacutil -i NegociosObjectsInterop.dll Then, in a web...
2
by: Nicke | last post by:
I have accomplished this on my machine with vs2005 but how can I deploy the dll on a web server for example? Has anyone made a deployment project that does this? this is my class: ...
3
by: =?Utf-8?B?U0Q=?= | last post by:
Hi, I'm using the the MSDN sample "COM Interop Part 2 Sample" (CSharpServerWithCOMClient.sln). The C# COM component gets registered when the solution is built. Somehow the component doesn't get...
1
by: Bhrionn | last post by:
Hello World, I am working on implementing a build for my companies application. The scenario implemeted is producing the error: ‘Class does not support automation or does not support expected...
2
by: Tricky | last post by:
I am a newbie to .NET (using 3.5) however have written a C# Class library that performs some decryption and need to be able to reference this class from Visual Basic 6.0. I have attempted to do...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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...
0
jinu1996
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...
0
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...
0
agi2029
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,...
0
isladogs
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...
0
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.