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. 1-Can I reverse drawtext function? 2-How to know the length of data in your app

1-Can I reverse drawtext function? 2-How to know the length of data in your app

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
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.
  • J Offline
    J Offline
    JoneLe86
    wrote on last edited by
    #1

    Hello amazing people, just have 2 questions 1- assuming I use Drawtext to output a text on HDC, is it possible to reverse that? i meant get that text which i drawn from HDC not from the buffer? 2- How in the world we know the length of executed code in an app? is it SizeOfRawData or what/? I know how to use DOS header and the NTheader.. but i still do not know the length exactly, it seems that it's different if do calculation, I am sure that i did it wrong.... Thanks...

    L 1 Reply Last reply
    0
    • J JoneLe86

      Hello amazing people, just have 2 questions 1- assuming I use Drawtext to output a text on HDC, is it possible to reverse that? i meant get that text which i drawn from HDC not from the buffer? 2- How in the world we know the length of executed code in an app? is it SizeOfRawData or what/? I know how to use DOS header and the NTheader.. but i still do not know the length exactly, it seems that it's different if do calculation, I am sure that i did it wrong.... Thanks...

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      1. I am not aware of any functions that can read a device context. 2. What do you mean by "length of executed code"? The size of an executable program in memory will be larger than its loadable exe file as it has the addition of stack and heap space. It can also grow and shrink during execution.

      Veni, vidi, abiit domum

      J 1 Reply Last reply
      0
      • L Lost User

        1. I am not aware of any functions that can read a device context. 2. What do you mean by "length of executed code"? The size of an executable program in memory will be larger than its loadable exe file as it has the addition of stack and heap space. It can also grow and shrink during execution.

        Veni, vidi, abiit domum

        J Offline
        J Offline
        JoneLe86
        wrote on last edited by
        #3

        about the 2 question.. Yes i did mean that, but what if i want the size of written code inside a section? not the size of the section.. it's oky even if it before loading to the memory... basically not the extra 0000 in the size just the raw code.... this what i am trying to find out...?

        L 1 Reply Last reply
        0
        • J JoneLe86

          about the 2 question.. Yes i did mean that, but what if i want the size of written code inside a section? not the size of the section.. it's oky even if it before loading to the memory... basically not the extra 0000 in the size just the raw code.... this what i am trying to find out...?

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          How do you define "written code inside a section", what is a section in this context? Do you mean source lines of code or object code, etc?

          Veni, vidi, abiit domum

          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