Connect with Expertise | Find Experts, Get Answers, Share Insights

Attempted to read or write protected memory again...

C
 
Join Date: Oct 2006
Location: Netherlands
Posts: 112
#1: Mar 20 '10
Hello,
I still struggling with this problem on a windows 7 platform.
However i found out that the program wants to use a part of the memory that he may not use.
In my case it only happens when i want to print something.
In there i have a PrintPreviewDialog and add a PrintDocument.
After that one is loaded it shows the document on the PrintPreviewDialog.
Most errors that appear show drawing errors.

So, how can i tell windows that the program may use the memory?
A friend of mine thought it was something like this:
Expand|Select|Wrap|Line Numbers
  1. [Security].Permissions.FileDialogPermission(Security.Permissions.SecurityAction.Demand) ]
Thanks for the reply!

CroCrew's Avatar
E
M
C
 
Join Date: Jan 2008
Location: Lansing, Michigan
Posts: 483
#2: Mar 24 '10

re: Attempted to read or write protected memory again...


Are you having the same problem running the program under the Win XP platform?

CroCrew~
C
 
Join Date: Oct 2006
Location: Netherlands
Posts: 112
#3: Mar 27 '10

re: Attempted to read or write protected memory again...


No, under windows xp it's working perfectly.
It only happens under windows 7 (maybe vista but i don't have that)
Reply