Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C# (http://www.go4expert.com/forums/c-sharp/)
-   -   "ActiveX component can't create object" while using VB6 ActiveX Dll with C# 2010 (http://www.go4expert.com/forums/activex-component-create-object-using-t28574/)

toofgib 13Jun2012 00:59

"ActiveX component can't create object" while using VB6 ActiveX Dll with C# 2010
 
hey,
my company wrote an activeX DLL in VB6 few years back, and now i've been asked to run some tests with it.
since i dont have VB6 environment anymore, i thought it'll be best to try and make a simple C# program that will call the registered COM Dll.

to do that i copied the DLL into c:\windows\system32, used regsrv32 to register the DLL, restarted the computer and referenced to it from my project.

from there i tried working like i use to:
Code:

mydll.cMain obj = new mydll.cMain();
int res;
res = obj.SetHttpServer("serveraddress", 80);
res = obj.PingServer();

with the first method call (SetHttpServer) Everything worked fine,
on the second method call (PingServer) i keep on getting Error# 429 " ActiveX component can't create object".
i looked over the original VB class, and it seems pretty simple, it creates an HttpWebRequest object and requests a string from the webserver defined with the SetHttpServer.

What am i doing wrong?

Thank you :)
Alon


All times are GMT +5.5. The time now is 21:47.