Hi,
I've created a C# executable with one class being comvisible. I've executed regasm on the excutable and got a valid typelibrary and also the registry settings seem to have been correctly entered. Still, I can't create an object out of the excutable. VB gives me the well-known "activeX can't create object" and C++ gives me a more meaningfull error "Class not registered". However, looking at the registry, the class seems to be registered ok.
A little code from the C# module:
The registry entry in HKEY_CLASSES_ROOT\CLSID:
{D34A49B4-EB34-11DC-A791-005056C00008}
Implemented Catgories
{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}
InprocServer32 default: mscoree.dll
assembly: IIS7Admin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=80268d5306b8140e
class: LangSoftDev.IIS7Admin.Components.CContextMenuAccept
RuntimeVersion: v2.0.50727
Threadingmodel: both
1.0.0.0 Assembly, class and runtime again
ProgID default: LangSoftDev.IIS7Admin.Components.CContextMenuAccept
RegAsm did not add a typelib entry under the CLSID section, but I added that myself, with no luck of course...
And, given that nowhere in the InprocServer32 key, there's a reference to the physical location of the assembly, I figured I'd gacutil-it into the global assembly cache. No luck there either....
I'm not unfamiliar with COM; know my way around the COM registry rather well, but I'm a complete newbie on COM-ming from a .net executable and I'm probably overlooking something really simple, but it is driving me mad......
Thanks in avance,
Rick
Greetings,
Rick
I've created a C# executable with one class being comvisible. I've executed regasm on the excutable and got a valid typelibrary and also the registry settings seem to have been correctly entered. Still, I can't create an object out of the excutable. VB gives me the well-known "activeX can't create object" and C++ gives me a more meaningfull error "Class not registered". However, looking at the registry, the class seems to be registered ok.
A little code from the C# module:
Code:
[ComVisible(true), Guid("D34A49B5-EB34-11DC-A791-005056C00008"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IContextMenuAccept
{
some stuff
}
Code:
[ComVisible(true), Guid("D34A49B4-EB34-11DC-A791-005056C00008"), ClassInterface(ClassInterfaceType.None)]
public class CContextMenuAccept : IContextMenuAccept
{
more stuff
}
The registry entry in HKEY_CLASSES_ROOT\CLSID:
{D34A49B4-EB34-11DC-A791-005056C00008}
Implemented Catgories
{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}
InprocServer32 default: mscoree.dll
assembly: IIS7Admin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=80268d5306b8140e
class: LangSoftDev.IIS7Admin.Components.CContextMenuAccept
RuntimeVersion: v2.0.50727
Threadingmodel: both
1.0.0.0 Assembly, class and runtime again
ProgID default: LangSoftDev.IIS7Admin.Components.CContextMenuAccept
RegAsm did not add a typelib entry under the CLSID section, but I added that myself, with no luck of course...
And, given that nowhere in the InprocServer32 key, there's a reference to the physical location of the assembly, I figured I'd gacutil-it into the global assembly cache. No luck there either....
I'm not unfamiliar with COM; know my way around the COM registry rather well, but I'm a complete newbie on COM-ming from a .net executable and I'm probably overlooking something really simple, but it is driving me mad......
Thanks in avance,
Rick
Greetings,
Rick