CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11

Thread: DLL Debuggin'

  1. #1
    Join Date
    Oct 2005
    Posts
    158

    DLL Debuggin'

    I've got a DLL that I'm trying to debug. I've inherited this code and cannot get in touch with the original developer to find out what to do.

    This dll gets called to build a webpage. When I set a break point on the function getting called, the dll breaks just fine.

    A bunch of Dim statements get called including
    Code:
    Dim objContext As COMSVCSLib.ObjectContext
    Then a bit later (the first actual line to debug)
    Code:
    Set objContext = GetObjectContext
    This isn't doing much of anything. objContext is not populated with anything.
    The thing is, if I'm not debugging, everything works fine. I'm just trying to walk through the code to get a feel for the way things work. There's a ton of function calls and I do much better if I can walk through, ya know.

    Does anyone have any ideas?

    Someone suggested permission issues in the Component Services, which I've changed to include the IUSR, but that had no effect.

    Thanks for your time.

    edit -
    I've debugged other DLLs for this application, none of them use COMSVCSLib though, so I think that's the main part of the problem.
    Last edited by stin; November 11th, 2008 at 10:33 AM. Reason: added clarification

  2. #2
    Join Date
    Aug 2000
    Location
    Essex, Uk
    Posts
    1,214

    Re: DLL Debuggin'

    Seeing a line of code like this suggests to me that there should be a COM Component somewhere that's probably registered and being used under MTS.
    If you find my answers helpful, dont forget to rate me

  3. #3
    Join Date
    Oct 2005
    Posts
    158

    Re: DLL Debuggin'

    Could you expand on this a bit? I'm not really very hip to the DLL thing yet.

  4. #4
    Join Date
    Aug 2000
    Location
    Essex, Uk
    Posts
    1,214

    Re: DLL Debuggin'

    If you go into the Management console, you should find a number of MTS Package's. If you run the code that calls this Dll, watch the Packages and see which one starts running. If you have load's it might be tricky to see which one it is, however, you should be able to work through the packages to work out which one it is.
    If you find my answers helpful, dont forget to rate me

  5. #5
    Join Date
    Oct 2005
    Posts
    158

    Re: DLL Debuggin'

    I had to set up my console, but I didn't see MTS in the list of sanp-ins to add. I added 'Component services' Which has a 'Distributed Transaction Coordinator' in it, but I didn't see anything else. Any other ideas??

  6. #6
    Join Date
    Aug 2000
    Location
    Essex, Uk
    Posts
    1,214

    Re: DLL Debuggin'

    in that case it could just be a component under component services. Are there any components that look as though they may have been Application based as opposed to system Based.
    If you find my answers helpful, dont forget to rate me

  7. #7
    Join Date
    Oct 2005
    Posts
    158

    Re: DLL Debuggin'

    I saw 1 that started up after I started the application, called w3wp.exe. (under 'Running Processes') That particular program though is used for uploading files.

    Here are the components I have:
    .Net Utilities
    COM+ Explorer
    COM+ QC Dead Letter Queue Listener
    COM+ Utilities
    IIS Out-Of-Process Pooled Application
    Microsoft.SQLServer.MSMQTask
    SA-FileUp (This is the one that started up)
    System Application

    Under System Application -> Components there is COMSVCS.TrackerServer, which, at least to me, appears to be the one I'm having trouble with. There isn't much I can do here in the way of configuration.

    On the System Application I can right click and get a properties page and in the 'Security' tab there are options available to change for 'Authentication Level for Calls'. I have no idea what that does, but I'll look at it. The current setting is on 'Packet Privacy'

    Thank you

  8. #8
    Join Date
    Oct 2005
    Posts
    158

    Re: DLL Debuggin'

    As a follow up - I found this MS Knowledge base article - http://support.microsoft.com/kb/265492.

    There are 4 resolutions:
    The MTS Transaction Mode for the component is set to a value other than 0 - NotAnMTSObject. I tried all available options, nothing worked. Currently set to 1

    Visual Basic 6 Service Pack 3 (SP3) or later is installed on the computer.
    I'm using SP 6

    The authenticating user has the appropriate permissions. For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
    259725 PRB: Error Occurs When You Debug a COM+ Component Under the Visual Basic IDE with an ASP Client
    I went through the steps here and nothing

    The component is deployed in a COM+ application.
    Not really sure how to check this.

    I realized just now that all these solutions are for allowing me to debug. I'm able to debug just fine. The issue is that COMSVCSLib isn't initializing or something.
    Last edited by stin; November 13th, 2008 at 04:11 PM.

  9. #9
    Join Date
    Aug 2000
    Location
    Essex, Uk
    Posts
    1,214

    Re: DLL Debuggin'

    Hmm... If you've not got MTS showing chances are you have no apps using it, so anything to do with MTS you can ignore.

    I notice that you have .Net Installed, do you have .Net available as a developer tool? if you do , you might be able to use .Net Instrumentation to get process information etc that might help.
    If you find my answers helpful, dont forget to rate me

  10. #10
    Join Date
    Oct 2005
    Posts
    158

    Re: DLL Debuggin'

    If you could provide a quick demo on how to do that, that would be awesome.

  11. #11
    Join Date
    Aug 2000
    Location
    Essex, Uk
    Posts
    1,214

    Re: DLL Debuggin'

    ok, first thing you will need to do is attach your Dll to the .NET app via the Interop. you then need to create a listener and a trace object.

    For both these classes you will need to reference the System.Diagnostics namespace. The program will also need to be built in Debug mode.

    Code:
    The Trace will be something like:
    
    TraceSource MyTrace = new TraceSource("myApp");
    MyTrace.Switch.ShouldTrace(TraceEventType.Information);
    MyTrace.Switch.Level = SourceLevels.Information;
    MyTrace.TraceInformation("This is a Test");
    
    the listener will be something like:
    XmlWriterTraceListener MyListener = new XmlWriterTraceListener(@"c:\myoutput.xml");
    Trace.Listeners().TraceOptions = TraceOptions.Callstack;
    Trace.Listeners.Add(MyListener);
    My thinking here is that through the callstack option, it might gleen information as to what is getting called.

    You will probably have to play with it a bit as it's been a while since I did this, the syntax above is C#
    If you find my answers helpful, dont forget to rate me

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
  •  





Click Here to Expand Forum to Full Width

Featured