Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Problem with getting file and line from ImageHlp.dll

Problem with getting file and line from ImageHlp.dll

Scheduled Pinned Locked Moved C / C++ / MFC
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Stephen Kellett
    wrote on last edited by
    #1

    This is on NT 4.0, SP6 using dev studio 6.0, sp4 I've just upgraded to these to try to fix the problem I'm about to describe. The code I'm describing used to work, then one day I noticed it no longer worked, and I hadn't touched the code! I think a service pack or something broke the code. I've seen this once before and the only fix that worked was to reinstall the OS and all the tools. I don't want to do that :-). The code is some code that given an address uses the SymGetLineFromAddr() function in imagehlp.dll to get the line number. I'm using the fix that John Robbins provided that accounts for the address not matching a line's exact address. This used to work, but now I get no file or line number information. Anyone come across this and worked out how to fix it? Cheers Stephen (2 questions in 1 day...)

    G 1 Reply Last reply
    0
    • S Stephen Kellett

      This is on NT 4.0, SP6 using dev studio 6.0, sp4 I've just upgraded to these to try to fix the problem I'm about to describe. The code I'm describing used to work, then one day I noticed it no longer worked, and I hadn't touched the code! I think a service pack or something broke the code. I've seen this once before and the only fix that worked was to reinstall the OS and all the tools. I don't want to do that :-). The code is some code that given an address uses the SymGetLineFromAddr() function in imagehlp.dll to get the line number. I'm using the fix that John Robbins provided that accounts for the address not matching a line's exact address. This used to work, but now I get no file or line number information. Anyone come across this and worked out how to fix it? Cheers Stephen (2 questions in 1 day...)

      G Offline
      G Offline
      Gert Boddaert
      wrote on last edited by
      #2

      The problem is probably that the ImageHlp.dll was replaced by a service pack. So the SymGetLineFromAddr() function is no longer present in your current NT4 version. (It's only available in the W2K aka NT5 version) Since ImageHlp.dll is a redistributable you can replace it again with the most recent (W2K) version you can find. Make sure your debug symbol files are A-OK. If that does not help, re-read some of John Robbins' articles... GBO.

      S 1 Reply Last reply
      0
      • G Gert Boddaert

        The problem is probably that the ImageHlp.dll was replaced by a service pack. So the SymGetLineFromAddr() function is no longer present in your current NT4 version. (It's only available in the W2K aka NT5 version) Since ImageHlp.dll is a redistributable you can replace it again with the most recent (W2K) version you can find. Make sure your debug symbol files are A-OK. If that does not help, re-read some of John Robbins' articles... GBO.

        S Offline
        S Offline
        Stephen Kellett
        wrote on last edited by
        #3

        Thanks, But that isn't the problem. The functions are present and I am calling them, they just fail to return any valid info, even thought the pdb files are valid. I reinstalled the OS - which nicely trashed my partition table even though it shouldn't have, good job I had backups. Stephen

        G 1 Reply Last reply
        0
        • S Stephen Kellett

          Thanks, But that isn't the problem. The functions are present and I am calling them, they just fail to return any valid info, even thought the pdb files are valid. I reinstalled the OS - which nicely trashed my partition table even though it shouldn't have, good job I had backups. Stephen

          G Offline
          G Offline
          Gert Boddaert
          wrote on last edited by
          #4

          Sorry my comments didn't help. Can you use windbg on your system to read the Drwtsn32 "core" Dump files? This might give you a clue. (you got to make DrWtsn32 your default debugger and let it generate core files but I am sure you already read how to do this in John Robbin's articles...) You might want to change the debug info generation to "C7" compatible which is sufficient to read the line numbers and a get a function name context. Then again if you reinstalled the OS, everything might be running OK now. Good luck.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups