T
trantanm
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.
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.