[RESOLVED] ActiveX component can't create object
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: [RESOLVED] ActiveX component can't create object

  1. #1
    Join Date
    Oct 2005
    Posts
    158

    [RESOLVED] ActiveX component can't create object

    I wrote a dll in vb.net that calls a web service, consumes the data returned then passes results back to the calling program. I originally wrote in in VS 2008, on windows 7 (x64). Tested it in a vb 6 program also written on windows 7 and everything worked. The vb6 program got the data and I could move on.

    The real world for me though is to use this dll inside another dll written in vb 6. I get the error "ActiveX component can't create object" when I get to the code
    Code:
    Dim myWebService as webService.ComClass1
    Set myWebService = New webService.ComClass1
    I've recompiled my code on windowsXP (x86) and recopied over the .dll and .tbl.

    When I try to register the dll I get an error: 'DllRegisterServer entry point was not found'. The .tbl seems to register fine in VB as far as adding a reference to it and the intellesense works too.

    Does anyone have any ideas what I need to do to get this working?

  2. #2
    Join Date
    Oct 2005
    Posts
    158

    Re: ActiveX component can't create object

    That error has gone away now. I used regasm on the target machine. Now I'm getting an different error:
    "Automation error. The system cannot find the file specified."

  3. #3
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,873

    Re: ActiveX component can't create object

    Look at the DLL, and see what it's doing
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  4. #4
    Join Date
    Oct 2005
    Posts
    158

    Re: ActiveX component can't create object

    I was just coming by to say I got it figured out. The problem is that you need to register the dll/tlb differently then normal. You need to first sign the dll in .net, then run regasm with the /tlb and /codebase options on the machine you're deploying on. Those programs are located in %WIN%/Microsoft.Net/Framework/v.xxxOldest.Version

    After that everything worked fine.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center