Why am I getting this error "Attempted to read or write protected memory....."? [modified]
-
Hello everyone, I have a WebBrowser Control in Windows Application. As the user Navigate using the Web Browser Control if the site tries to open a new Window using script I get the following error.
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
I also tried the code given here http://www.codeproject.com/KB/cpp/ExtendedWebBrowser.aspx[^] and same error was given. I am using Visual Studio C# 2008. Can anyone tell me what is going on and how I can sort this out? Thank you very much for your help and have a great day. Khoramdin
modified on Sunday, December 09, 2007 11:07:25 PM
-
Hello everyone, I have a WebBrowser Control in Windows Application. As the user Navigate using the Web Browser Control if the site tries to open a new Window using script I get the following error.
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
I also tried the code given here http://www.codeproject.com/KB/cpp/ExtendedWebBrowser.aspx[^] and same error was given. I am using Visual Studio C# 2008. Can anyone tell me what is going on and how I can sort this out? Thank you very much for your help and have a great day. Khoramdin
modified on Sunday, December 09, 2007 11:07:25 PM
What does the debugger say. If an error is reproducable in this way you can be lucky. The reasons are many: Overwritten memory, buffer overrun, unlocked pointer, pointer to a pined managed object were the pn is freed, but the pointer is still in use... Repro the error in the debugger and watch the call stack.
SSK. Anyone who says sunshine brings happiness has never danced in the rain.
-
What does the debugger say. If an error is reproducable in this way you can be lucky. The reasons are many: Overwritten memory, buffer overrun, unlocked pointer, pointer to a pined managed object were the pn is freed, but the pointer is still in use... Repro the error in the debugger and watch the call stack.
SSK. Anyone who says sunshine brings happiness has never danced in the rain.
Vri SSK wrote:
What does the debugger say. If an error is reproducable in this way you can be lucky. The reasons are many: Overwritten memory, buffer overrun, unlocked pointer, pointer to a pined managed object were the pn is freed, but the pointer is still in use... Repro the error in the debugger and watch the call stack.
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=148108&SiteID=1[^]
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions