C# - Steps For Creating Class Library as COM Server
Here is the step by step instructions for creating a C# class library as a COM Server so that it can be used by C++ clients. In other words, how c++ clients can access C# code is explained on this page with step by step instructions
- C# - Step 1 Create Visual C# Class Library Project
- C# - Step 2 Making changes to AssemblyInfo.cs file
- C# - Step 3 Register For COM Interop in Project Settings
- C# - Step 4 Create Strong Name For Signing the Assembly
- C# - Step 5 Define Interface and Implement Class
- C# - Step 5.1 ComInterfaceType.InterfaceIsIUnknown
- C# - Step 5.2 ComInterfaceType.InterfaceIsIDispatch
- C# - Step 5.3 ComInterfaceType.InterfaceIsDual
- C# - Step 5.4 ClassInterfaceType.None
- C# - Step 5.5 ClassInterfaceType.AutoDispatch
- C# - Step 5.4 ClassInterfaceType.AutoDual
- C# - Step 6 Export COM Type Library using tlbexp
- C# - Step 7 Register Both Assembly and TypeLibrary
- C# - Step 8 Adding Assembly to GAC
- C# - Step 9 Writing C++ Test Application to test C# ClassLibrary
Click here to download the complete source code of C# Class Library Server and C++ Client
|