Yes, it is possible to this. There are a few good samples that I ran across
searching the web, however, I didn't save a reference to them. You would be
better served by finding one of those. However, the basic process was not
too difficult.
1. Create an exe that references your .dll
2. Have your exe register the class factories for your creatable objects
3. Use regasm to register your .dll and create a type library
4. Manually replace any InprocServer32 registry entries that were added with
LocalServer entries
5. Manually add appropriate AppId registry entries
You will probably also find it helpful to define your own interfaces instead
of letting interop do it for you. You will want to make sure that you have
applied the appropriate Com attributes too.
As I mentioned I came across a few good tutorial web sites. They walked you
through the process step by step.
> Hello,
> I created a COM Server .NET dll that works fine as an InProcServer. It
[quoted text clipped - 72 lines]
> @="IkarosGMV.COM.Application"
> "AppID"="{D36F350B-7200-468F-8459-6BA8512BFD46}"
[HKEY_CLASSES_ROOT\CLSID\{D36F350B-7200-468F-8459-6BA8512BFD46}\InprocServer
32]
> @="mscoree.dll"
> "ThreadingModel"="Both"
[quoted text clipped - 12 lines]
> "DllSurrogate"=""
> "RunAs"="Interactive User"
[HKEY_CLASSES_ROOT\CLSID\{D36F350B-7200-468F-8459-6BA8512BFD46}\Implemented
> Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}]
> @=""
>
> [HKEY_CLASSES_ROOT\Component
> Category\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}]
> "0"=""