5

I'm trying to debug a VB 6 dll that is used in an ASP classic page. I've gotten other dll working, but one in particular is causing me some real headaches. This one references the COMSVCSLib COM and when debugging, is empty.

    ...
    Dim objContext as COMSVCLib.ObjectContext
    Set objContext = GetObjectContext
    ...

When compiled and called from the asp page, all is fine,

    <%
        dim obj
        set obj = Server.CreateObject("page_builder.glue")
        obj.Login
        set obj = nothing
    %>

I have 'EVERYONE' added to all aspects of the VB ASP debugging DCOM.

I am running Windows Server 2003 in 32-bit on a 64 bit machine, using IIS 6.

As I mentioned other DLLs debug fine, it's just this aspect of this one that doesn't work. Any suggestions?

1
  • I am running Windows 2008 on a 64-bit machine, using IIS 7 and having a similar issue. Oct 1, 2013 at 16:05

1 Answer 1

2

The COMSVCLib.ObjectContext object represents the object context in the DCOM host (dllhost.exe). This context gives you access to properties that describe the configuration of your DCOM Application in Component Services.

When you run your .DLL project in debug mode in VB6 however, the DLL will be hosted by the VB6.exe process. This process doesn't have any configuration of the kind that your DCOM Application has, so the VB6.exe process doesn't contain any object context information.

Therefore the GetObjectContext will return nothing.

2
  • Is there anything I can do about that?
    – spuppett
    May 23, 2014 at 20:38
  • Not really. You can check if the context is nothing and respond accordingly. You can use other debugger to attach to the dllhost process, but then you will miss edit & continue
    – GTG
    May 26, 2014 at 6:49

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.