Documentation for capturing OutputDebugString / Kernel messages

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • lemony

    #1

    Documentation for capturing OutputDebugString / Kernel messages

    I have written a small .net application to captutre the output from calls to
    OutputDebugStri ng. However it does not always work, and in general does not
    seem to capture the output when it is written out from within an ASP.Net
    application on Windows2000.

    I have noticed using DebugView that the strings I can not capture are the
    same as are only captured when DebugViews' "capture kernel" setting is
    enabled.

    Could anyone point me in the direction of any documentation or samples on
    how to capture or read all of the outputs that are sent to OutputDebugStri ng,
    and what determines whether "capture kernel" mode is required or not ?

    The program I have does seem to work most of the time, but what I really
    want is some documentation or information on how your supposed to do this.

    thanks
    Lemony

  • Kevin Yu [MSFT]

    #2
    RE: Documentation for capturing OutputDebugStri ng / Kernel messages

    Hi Lemony,

    First of all, I would like to confirm my understanding of your issue. From
    your description, I understand that you need hook everything that
    OutputDebugStri ng writes. If there is any misunderstandin g, please feel
    free to let me know.

    As far as I can see, we have to use an API hook to get what the
    OutputDebugStri ng is trying to write. So I suppose you need a system wide
    API hook. There is some articles discussing about this on CodeProject with
    source code. Here are some of them. Hope this helps.





    Kevin Yu
    =======
    "This posting is provided "AS IS" with no warranties, and confers no
    rights."

    Comment

    • lemony

      #3
      RE: Documentation for capturing OutputDebugStri ng / Kernel message

      Kevin

      Thanks for the reply,
      [color=blue]
      > First of all, I would like to confirm my understanding of your issue. From
      > your description, I understand that you need hook everything that
      > OutputDebugStri ng writes[/color]

      Yes this is correct.
      [color=blue]
      > As far as I can see, we have to use an API hook to get what the
      > OutputDebugStri ng is trying to write.[/color]

      I currently use the DBWIN_BUFFER segment and DBWIN_DATA_READ Y events which I
      thought would be the official way of doing things. However I cant find any
      MS documentation about this either. I'll have a look at the hooks documents
      you sent me, but do you think this is a preferable approach to the events ?

      thanks
      Lemony

      Comment

      • Kevin Yu [MSFT]

        #4
        RE: Documentation for capturing OutputDebugStri ng / Kernel message

        Hi Lemony,

        As far as I know, there is no official way of doing this. Hooking is a
        reliable way to get all the messages.

        Kevin Yu
        =======
        "This posting is provided "AS IS" with no warranties, and confers no
        rights."

        Comment

        Working...