Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Hi
recently in my project when I call showdialog method of openfiledialog I get this error: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

I has been searching all over the web before now but my problem is not solved. Also I installed microsoft patch, but because my project is in .Net 3.5, it was not useful.

Thanks for any help.
Posted
Comments
Timberbird 8-Dec-11 9:41am    
Provide the code you use to open the file dialog
Richard MacCutchan 8-Dec-11 10:01am    
This error is more likely caused by a bug in your code. Check all the values and references in you dialog to ensure that they are correct.
Hamid Khezeli 8-Dec-11 13:49pm    
Thanks for replies,
It's a simple Code like:
OpenFileDialog OFD = new OpenFileDialog();
OFD.ShowDialog(); // In this line I get error

Also I follow my source code and realize before connect to Oledb database(Aceess) my code work correctly and after connect to database it get error.
Additionally, I get this error recently and before it was worked correctly.

Please help me. there isn't a good solution in the web even at microsoft website.
Timberbird 9-Dec-11 7:13am    
Have you checked this page? Some people there seem to have the same problem
BillWoodruff 10-Dec-11 17:44pm    
I think this is an excellent referral, and if posted as an answer, I would have voted you 5 !

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900