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#
  4. Attempt to read arite protected memory

Attempt to read arite protected memory

Scheduled Pinned Locked Moved C#
csharphelpvisual-studiodata-structuresperformance
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.
  • R Offline
    R Offline
    Rao Rafique
    wrote on last edited by
    #1

    Hi Fellows: I am facing an error of access voilation while running a piece of code with Unsafe Context...I am developing steganographic application.And I want to embedd DataImage into Cover image using LSB method with the help of Lockbits() and UnLockBits () methos.. But when I compile the code it is compiled & Build succesfully.But at run time the app. frozes and with the following error message for the statement. byte bb=ptr1[0] //where ptr1 is byte type pointer that points to Scan0 ,i.e 1st byte of locked image array. Error :AccessVoilationUnhandelled exception Plateform :Visual C# Express edition VS.Net 2.0,Win XP Error Message: AcessVoilation: attempt to read or write protected memory.This is the oftenindication that other memeory is currupt. also I am thanfull to Chorrina John...who write very helpful articles on Steganography...I request If she is there please help & Supervise me in my project. Waiting for ur good response... Thanks I am getting B.S. degree in Computer Science.And want to enhance career in Software development. pineer programmer

    C 1 Reply Last reply
    0
    • R Rao Rafique

      Hi Fellows: I am facing an error of access voilation while running a piece of code with Unsafe Context...I am developing steganographic application.And I want to embedd DataImage into Cover image using LSB method with the help of Lockbits() and UnLockBits () methos.. But when I compile the code it is compiled & Build succesfully.But at run time the app. frozes and with the following error message for the statement. byte bb=ptr1[0] //where ptr1 is byte type pointer that points to Scan0 ,i.e 1st byte of locked image array. Error :AccessVoilationUnhandelled exception Plateform :Visual C# Express edition VS.Net 2.0,Win XP Error Message: AcessVoilation: attempt to read or write protected memory.This is the oftenindication that other memeory is currupt. also I am thanfull to Chorrina John...who write very helpful articles on Steganography...I request If she is there please help & Supervise me in my project. Waiting for ur good response... Thanks I am getting B.S. degree in Computer Science.And want to enhance career in Software development. pineer programmer

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Most likely cause - you're looking past the bits that contain the image, or you're looking past an individual scanline, not taking the stride value into account. You can read my image processing articles to see how you should iterate over the bits of an image.

      Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      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