Specific .NET Windows 7 Errors

I have a .NET application and setup for it. Built using VS 2005.

Development Machine - Windows XP SP3.

As soon as someone installed it under Windows7. And get the following errors.

WinForm ThreadException

System.AccessViolationException: attempt to read or write protected Memory. This often indicates that another memory is corrupt.        in System.Windows.Forms.UnsafeNativeMethods.IOleObject.DoVerb (Int32 iVerb, IntPtr lpmsg, IOleClientSite pActiveSite, Int32 lindex, IntPtr hwndParent, COMRECT lprcPosRect) in System.Windows.Forms.VhHol.AhH. Forms.AxHost.InPlaceActivate ()

other

An exception of type 'System.Windows.Forms.AxHost + InvalidActiveXStateException' was thrown. The Disable method cannot be called at this time.

Now we wonder where the problem was, and installed VS 2005 on this Windows7. Now the solution is compiled and launched without exception. I built the installation and reinstall the new version of this Win7 machine ...

I have exceptions. Why is this?

Applications do not have exceptions launched using VS, but throws them when after running the installed executable ...

However, I successfully (without exceptions) tested the installed application on some machines with OS> Win XP: Windows 7 (x64) and Windows Server 2008 (x64) ...

Studying the logs, I discovered code that throws an exception:

Panel p = new Panel();
p.Margin = new Padding(0);
p.Dock = DockStyle.Fill;
p.Controls.Add(display); // 'display' is an ActiveX control instance

Logger.LogMessage("before");

this.tableLayoutPanel.Controls.Add(p); // protected memory EXCEPTION

Logger.LogMessage("after");

So, I see "earlier" and then AccessViolationException: Attempted to read or write protected memory...not see "after" ...

?

  • ActiveX ;
  • ( ++) ActiveX .
  • x86;
  • ** Windows Server 2008 (x64) Windows 7 (x64);
  • "Windows XP Compatibility (SP2, SP3)" - ().
  • ProgramFiles. C:\TestFolder - : AccesViolationException....
+3
4

, x84, ;-)) , , x64...

Windows XP 64-?
, 32/64- , Windows 7.

Forms.UnsafeNativeMethods.IOleObject

DLL ActiveX?

32- dll 64- dll? 32- dll 64- .

COM, . , , Linux, C/++ long 8 64 , 4 32- .

x86 (= 32 ) .NET.

+5

, ActiveX Windows 7.

+2

XP, . Vista 7 .

, , randome , . , . , XP, , .

+1

.

, COM-.

0

Source: https://habr.com/ru/post/1769571/


All Articles