Scott Hanselman

Version Independent ProgIDs in the .NET Framework and C#

June 11, 2004 Comment on this post [0] Posted in Programming
Sponsored By

Generating a Version Independent ProgID in a C# Component that is being exposed as COM is apparently tantamount to Voodoo.  Nothing has been written about it either in Google Groups or in Google proper.  Sam Gentile in his wisdom confirmed to me that there is no [VersionIndependentProgID] attribute or the like. 

So, sounds like I'll need it manually in my own "DllRegisterServer" functions:

[ComRegisterFunctionAttribute]
public static void myDllRegisterServer(string registrationLogic) {
   // perform my logic 
   Trace.WriteLine( "Registration is occuring ..." );

}

[ComUnregisterFunctionAttribute]
public static void myDllUnregisterServer(string registrationLogic) {
    // perform my logic
    Trace.WriteLine( "Dis-Un-registration is occuring ..." );
}

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.