c# - CoCreateInstance fail with error "Class not registered" while using COM visible .NET class -
hello created com visible class myclass on c# registered regasm command - registration passed ok , can see in registry progid corresponding myclass in client c++ code : 1) call of clsidfromprogid passed ok 2) call of cocreateinstance fail error "class not registered" (80040154) can possible reasons of such behavior - valuable in advance
i had same issue, solved executing these commands console:
c:\windows\microsoft.net\framework\v4.0.30319\regasm dllname.dll /tlb:dllname.tlb c:\windows\microsoft.net\framework\v4.0.30319\regasm dllname.dll /regfile
then doing double click on reg file generated.
to test if ok can have small vb script file created object, put command in .vbs file:
set testobj = createobject("namespace.classname")
your com visible assembly should named.
Comments
Post a Comment