![]() ![]() The framework then uses reflection to find the method marked with the ComRegisterFunction attribute and calls that function with the type being registered. The InitialiseCOM method in the main form uses RegistrationServices to register the type. Services.RegisterAssembly(ass, .SetCodeBase) The following method is called from the Form Loaded event to register the COM class(renamed to M圜OMClass for this example) private void InitialiseCOM() I've copied the following important bits from our implementation and renamed a few classes to illustrate the example. NET 1.0 days and has not been touched since then!īasically it performs a regasm style of registration each time the application starts (it needs to be run once to make registry entries before the COM object is instantiated in the COM container application). It was implemented for a project back in the. This is a bit of a hack and I'd welcome any suggestions to make it more elegant. We too had some issues many years ago with regasm and running the COM class as a Local EXE Server.
0 Comments
Leave a Reply. |