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

Discussion in 'C++' started by trantanm@yahoo.com, Sep 13, 2006.

  1. Guest

    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, 2006
    #1
    1. Advertising

  2. Noah Roberts Guest

    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.
    Noah Roberts, Sep 13, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nick Harris

    Re: regasm /regfile does not work

    Nick Harris, Apr 27, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    1,800
    Nick Harris
    Apr 27, 2004
  2. Namratha Shah \(Nasha\)
    Replies:
    0
    Views:
    4,685
    Namratha Shah \(Nasha\)
    Nov 5, 2004
  3. Id L
    Replies:
    2
    Views:
    4,778
    mikeb
    Mar 3, 2004
  4. Ram

    Gacutil Returns Access Denied

    Ram, Oct 11, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    1,751
  5. Samuel

    how to user GACUTIL -i to install the WEBCONTROLS ?

    Samuel, Nov 26, 2003, in forum: ASP .Net Web Controls
    Replies:
    12
    Views:
    580
Loading...

Share This Page