error -2147024894 (80070002) Automation Error

  • Thread starter Thread starter Vijayendran1924
  • Start date Start date
V

Vijayendran1924

Guest
I am trying to add few "dlls" created using "c#" into registry.
I use "regasm" utility from windows command prompt as follows (executed in with admin access)

"C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm /codebase /tlb .\somedir\Sample.dll "

Command prompt said above registration is successful.

"
RegAsm : warning RA0000 : Registering an unsigned assembly with /codebase can cause your assembly to interfere with other applications that may be installed onthe same computer. The /codebase switch is intended to be used only with signed assemblies. Please give your assembly a strong name and re-register it.
Types registered successfully
Assembly exported to C:\<Path>\Sample.tlb and the type library was registered successfully.
"

This "Sample.dll" i am loading because of below VBA code i use in my excel.
"
Sub SomeFunc()
'Below method is created in c#. Registered DLL is reference here
Dim somelib As someClass

'Instance creation using CreateObject
Set somelib = New someClass
End Sub
"

When the above Excel-VBA code is executed it throws error saying "someClass" cannot be referred.

error -2147024894 (80070002) Automation Error
The system cannot find the file specified

Same has been followed in some other PC. No error in excel code.

I suspect the DLL is not properly registered in registry.
Not sure how "regASM" result displayed as success.


In VBE, i checked by going to Tools -> References also to check whether the DLL is checked olr not.
When i access the above setting, it asked for password.
After entering correct password only, it has opened the dialog box.
Does this password prevents to access dll during execution.
I dont think so because in some other PCs its working well.


Please guide me how can i know DLL registration is really success or not ?


Please bare, i don't know who implemented the dll. I am least bothered to know the implementation. I received it and using. Thats it.

Continue reading...
 
Back
Top