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

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -