none
Programmatic approach for Gacutils.exe and Regasm.exe(Invocation from Unmanaged Code to Managed Code ) RRS feed

  • Question

  • Hi All,

    My project is based on Registration/De-Registration of Dll's, oriented towards (COM Dll's and .NET Dll's/Assemblies with COM interfaces), here, I need to simulate the behavior of Dll's registration for .NET with COM interface (RegAsm.exe/Gacutils.exe).

    Steps:

    1. To create a Strong Name assembly(sn.exe)

    2. To Create an assembly (.NET)(Class Library in VC#) and provide  new interface to mimic the functionality for Gacutils.exe (using Publish.GacInstall()) and Build and obtain the  A.dll and A.tlb(managed Code).(COM Callable Wrapper )

    3. To Create Un-Managed Code and access the above A.tlb and invoke the Publish.GacInstall(AssemblyName) member function through Un-Managed Code

    Though I found some references for Gacutils.exe programmatically,  I am unable to invoke the above Publish.GacInstall(...) after specifying namespace  "using System.EnterpriseServices.Internal" 

    To Sum-up, I need to invoke method(Gacutils.exe programmatically) from Unmanaged Code to Managed Code layer, and could not obtain working/examples for Gactuils.exe and Regasm.exe(Programmatically) in msdn forums. Also, I am new to C# & .NET domain.

    Any help in resolving the above would be much appreciable.

    Details: VS2008(IDE), Windows 7 (Enterprise)

    Regards,

    VishaK_90


    Vishal_K89

    Thursday, May 2, 2013 2:09 PM

Answers