-
October 11th, 2011, 06:52 AM
#1
Attempted to read or write protected memory error
I have several visual basic 2010 programs. One of the programs I have installed the program on four different windows 7 computers. I get the following error on one of the computers. Then another program I have installed it on 8 computers and I get the same error on 6 of the computers. Here is the error message I get:
2011-10-11 06:19:04 , Main, -2147467261, Attempted to read or write protected memory. This is often an indication that other memory is corrupt., at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.RunDialog(Form form)
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at System.Windows.Forms.Form.ShowDialog()
at Molding.modMain.Main() in C:\Users\user\Documents\Visual Studio 2010\Line Side Labeling\Toota\051 Radiator\GB-Final\modMain.vb:line 198
So far I have disabled DEP, turned off antivirus, turned off firewall and nothing has worked. I leave the program open on the weekend and the program doesn’t even do anything and I still get the error. Does anybody know how to fix this problem?
-
October 11th, 2011, 02:40 PM
#2
Re: Attempted to read or write protected memory error
Show us the Code around the line that errors ( Line 198 in modMain.vb) .. It sounds like you may be trying to open a dialog with invalid settings..
Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
WPF Articles : 3D Animation 1 , 2 , 3
Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.
-
October 11th, 2011, 03:31 PM
#3
Re: Attempted to read or write protected memory error
Here is the code arround line 198:
Code:
frmPartSelect.ShowDialog()
If strSelectedShort <> "CANCEL" Then
frmMain.ShowDialog()
End If
line 198 is:
frmMain.ShowDialog()
-
October 14th, 2011, 01:07 AM
#4
Re: Attempted to read or write protected memory error
I think it may be an issue of Form ownership..
MSDN article
your Main Form should be your Base form and be the Owner of all subsequent Dialog forms. and not be owned by any of them..
Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
WPF Articles : 3D Animation 1 , 2 , 3
Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|