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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. RtlCopyMemory() question

RtlCopyMemory() question

Scheduled Pinned Locked Moved C / C++ / MFC
questionwinformsalgorithmsperformancehelp
2 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.
  • M Offline
    M Offline
    Mattzimmerer
    wrote on last edited by
    #1

    I'm trying to code a driver that will read from either virtual or physical memory given an address and report the contents. Obviously I would vrather read from virtual memory, but at this point I still have a lot to learn about the mysterious kernel lol... This is where im looking: im going to try and copy the contents of an address into a buffer. The goal is one byte using: VOID RtlCopyMemory( IN VOID UNALIGNED *Destination, IN CONST VOID UNALIGNED *Source, IN SIZE_T Length ); My first problem is how I am going to pass these parameters to my driver from my GUI. Secondly, I could benifit from some insight on how this will work. I am thinking that when my driver calls RtlCopyMemory() its going to get a pointer to a byte to copy, but I was planning on passing a virtual address. In that case i have the feeling I should also be passing a process handle, which is obviously not the case. So then is RtlCopyMemory intended to copy from physical memory into a buffer? Other questions (lol): What IRQL should I be operating at? How can I convert a system::string^ into a LPCVOID, (system::string^ is from taking the text from a windows forms textbox) I'm totally willing to write my own algorithm, I just dont know anything about the fundamental structure of system::string^. I dont even know what that ^ is lol...

    _ 1 Reply Last reply
    0
    • M Mattzimmerer

      I'm trying to code a driver that will read from either virtual or physical memory given an address and report the contents. Obviously I would vrather read from virtual memory, but at this point I still have a lot to learn about the mysterious kernel lol... This is where im looking: im going to try and copy the contents of an address into a buffer. The goal is one byte using: VOID RtlCopyMemory( IN VOID UNALIGNED *Destination, IN CONST VOID UNALIGNED *Source, IN SIZE_T Length ); My first problem is how I am going to pass these parameters to my driver from my GUI. Secondly, I could benifit from some insight on how this will work. I am thinking that when my driver calls RtlCopyMemory() its going to get a pointer to a byte to copy, but I was planning on passing a virtual address. In that case i have the feeling I should also be passing a process handle, which is obviously not the case. So then is RtlCopyMemory intended to copy from physical memory into a buffer? Other questions (lol): What IRQL should I be operating at? How can I convert a system::string^ into a LPCVOID, (system::string^ is from taking the text from a windows forms textbox) I'm totally willing to write my own algorithm, I just dont know anything about the fundamental structure of system::string^. I dont even know what that ^ is lol...

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      You can pass in a buffer from user mode to kernel mode by defining custom IO control codes with different transfer types. Read about it here - Defining Custom I/O Control Codes[^]

      «_Superman_» I love work. It gives me something to do between weekends.
      Microsoft MVP (Visual C++)

      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