C# COM wrapper registry update/clear


yo .net dudes:

seeking expert guidance on how go c# com registries got c# com wrapper called classic asp legacy system. trouble each time modify class or function in c# com wrapper, doesn't reflect in registries.

here's followed c# com new com: http://msdn.microsoft.com/en-us/library/c3fd4a20.aspx

should write c# exe clear although following batch script got clearing doesn't hit nail on head.

although c# com has got lot of classes , functions here’ s example code snippet of how go coding  the c# com wrapper

// c# code (classicaspcom.dll) built strong name , registered com interop in visual studio 2005 (.net framework 2.0) , windows 7:

using system;

using system.runtime.interopservices;

namespace classicaspcom

{

  [comvisibleattribute(true)]

     [guid("4042fe79-8aca-4e5d-9f14-2ff7c6ae8d88")]

     public interface igetmessage

     {

         [dispid(1)]

         string getmessage(string message);

     }

    

     [comvisibleattribute(true)]

     [guid("9a133858-5893-4ca7-9048-345cd0fcf535"),

     classinterface(classinterfacetype.none)]

     public class classcom : igetmessage

     {

         public string getmessage(string message)

         {

             return "your message: " + message;

         }

     } 

 }

// com installation batch script:

regasm classicaspcom.dll

regasm classicaspcom.dll /codebase

regasm classicaspcom.dll /tlb

gacutil/i classicaspcom.dll

// com uninstallation batch script:

iisreset

regasm/u classicaspcom.dll

gacutil/u classicaspcom.dll

// vbscript (classicasphome.asp): 

<%

response.write("my first asp script!")

 

dim com

set com = server.createobject("classicaspcom.classcom")

response.write(ccom.getmessage("1234567890"))

response.write("all's ends well.")

%>

please me c# program clear registries or automate.

thanks

hi recherche,

  welcome msdn forum support.

  when attending sweep existing sample issued all-in-onecode  framework, found tutorial suitable needs name invoke .net assembly native c++ code. in-process c# com server (csdllcomserveris common way tell how invoke com dll , core used by com wrapper. would be relative regasm command , other key points such autodual , autodispatch. using 2 alternates implement binding , late binding. if want know detailed implementations,you can read that.

  sincerely,

  jason wang


jason wang [msft]
msdn community support | feedback us



Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

Catalog Staging

How to Share webservice object to all user