Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
-
In my application I have hooked the keyboard.Global hooked and in one function im getting a error saying.. “Attempted to read or write protected memory. This is often an indication that other memory is corrupt.” It comes from this code statement, return CallNextHookEx(hookID, nCode, wParam, ref lParam); [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] private static extern IntPtr CallNextHookEx(IntPtr hhk, int nCode, IntPtr wParam, ref KBDLLHOOKSTRUCT lParam); This cause to carshed my application. And Can U explain to overcome this issue.
-
In my application I have hooked the keyboard.Global hooked and in one function im getting a error saying.. “Attempted to read or write protected memory. This is often an indication that other memory is corrupt.” It comes from this code statement, return CallNextHookEx(hookID, nCode, wParam, ref lParam); [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] private static extern IntPtr CallNextHookEx(IntPtr hhk, int nCode, IntPtr wParam, ref KBDLLHOOKSTRUCT lParam); This cause to carshed my application. And Can U explain to overcome this issue.
ASysSolvers wrote:
This cause to carshed my application. And Can U explain to overcome this issue.
Yes, you are having a buffer overflow/overrun in your unmanaged code.
xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 alpha 4a out now (29 May 2008) -
ASysSolvers wrote:
This cause to carshed my application. And Can U explain to overcome this issue.
Yes, you are having a buffer overflow/overrun in your unmanaged code.
xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 alpha 4a out now (29 May 2008)Yes it is true. I have a grabber control to play TV stream. it a .ocx control. Can U explain how we design a apllication for that kind of issues.. Thankz
-
Yes it is true. I have a grabber control to play TV stream. it a .ocx control. Can U explain how we design a apllication for that kind of issues.. Thankz
ASysSolvers wrote:
Can U explain how we design a apllication for that kind of issues..
Attach an unmanaged debugger and look for the error. Your structs that you pass to the unmanaged function is probably incorrect/too small/misaligned etc. I cant help you on that.
xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 alpha 4a out now (29 May 2008)