Click here to Skip to main content
15,891,852 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello All,


I have got this eception and VS get crashed.Below is code;
C#
Preview  pv= new Preview();
pv.Owner = App.Current.Windows[0];
pv.cmbName.IsEnabled = true;
pv.ShowDialog();

got error at bold area with details: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Any suggestions?

Thanks
Posted
Updated 22-May-12 10:40am
v2

1 solution

The exception happens somewhere in the Preview class. Do you have its source code? Look at the Form_Load and Form_Shown event handlers. Somewhere there, a call to an unmanaged resource fails. Which DllImports do you use? Did you check the Marshalling of the parameters?
 
Share this answer
 

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