Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is my ObjectContext empty when debugging vb 6 dll for an asp classic page IIS6?

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?

like image 765
spuppett Avatar asked Nov 01 '22 15:11

spuppett


1 Answers

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.

like image 181
GTG Avatar answered Nov 15 '22 12:11

GTG