"ActiveX component can't create object" while using VB6 ActiveX Dll with C# 2010

Discussion in 'C#' started by toofgib, Jun 12, 2012.

  1. toofgib

    toofgib New Member

    Joined:
    Jun 12, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    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
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice