468,512 Members | 1,495 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,512 developers. It's quick & easy.

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 5287

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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Kevin Flanagan | last post: by
2 posts views Thread by Id L | last post: by
1 post views Thread by Peter Reid | last post: by
3 posts views Thread by =?Utf-8?B?U0Q=?= | last post: by
2 posts views Thread by Tricky | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.