PC Review


Reply
Thread Tools Rate Thread

RE: System.AccessViolation when opening Modal VB6 Form from Hosted VB6

 
 
Fábio Chicout
Guest
Posts: n/a
 
      22nd Jan 2010
Hi Willy,

Well, I've got this message when my parameters weren't decorated (atributes,
out, in modifiers) correctly.

"Willy Van den Driessche" wrote:

> Hi,
> i have a rather simple question with a large background. We have a huge
> existing VB6 application consisting of 100+ VB6 com components. We are
> rewriting this app in .NET. Since there is more than 30 man years in the
> existing aplication, we are doing this step by step. In the meantime, the
> old components are hosted in the new .NET Winforms application. They all
> behave in a similar way : they show a list of items and have a toolbar on
> top of it. The grid and the toolbar are activeX controls, hosted on the
> main screen of the .NET application. All components expose a COM class
> with a common interface. These classes are instantiated by the .NET
> application and passed to the grid. The grid displays fine and behaves as
> planned. However, when the popup menu of the grid is invoked to display a
> modal (COM) form. Here however things go wrong. On Windows XP the
> application occasionally hangs. On Windows Vista the application crashes
> 95% of the time with the exception :
>
>
> ---> System.AccessViolationException: Attempted to read or write protected
> memory. This is often an indication that other memory is corrupt.
> at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageA(MSG& msg)
> at
> System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.Uns
> afeNativeMethods.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()
>
> I can explain for 3 more pages but that's not the idea. We have tried
> everything. *any* idea is welcome.
>
>
>
>
> __________ Informatie van ESET NOD32 Antivirus, versie van database
> viruskenmerken 4794 (20100121) __________
>
> Het bericht is gecontroleerd door ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>

 
Reply With Quote
 
 
 
 
Willy Van den Driessche
Guest
Posts: n/a
 
      22nd Jan 2010
Thanks for the reply.

My parameters ought to be decorated correctly since they are all generated
using impLib and aximp.
But maybe these tools made a mistake. I'll check on them again.



"Fábio Chicout" <(E-Mail Removed)> wrote in message
news:0E962400-0128-48FB-8FA2-(E-Mail Removed)...
> Hi Willy,
>
> Well, I've got this message when my parameters weren't decorated
> (atributes,
> out, in modifiers) correctly.
>
> "Willy Van den Driessche" wrote:
>
>> Hi,
>> i have a rather simple question with a large background. We have a huge
>> existing VB6 application consisting of 100+ VB6 com components. We are
>> rewriting this app in .NET. Since there is more than 30 man years in the
>> existing aplication, we are doing this step by step. In the meantime,
>> the
>> old components are hosted in the new .NET Winforms application. They all
>> behave in a similar way : they show a list of items and have a toolbar on
>> top of it. The grid and the toolbar are activeX controls, hosted on the
>> main screen of the .NET application. All components expose a COM class
>> with a common interface. These classes are instantiated by the .NET
>> application and passed to the grid. The grid displays fine and behaves
>> as
>> planned. However, when the popup menu of the grid is invoked to display
>> a
>> modal (COM) form. Here however things go wrong. On Windows XP the
>> application occasionally hangs. On Windows Vista the application crashes
>> 95% of the time with the exception :
>>
>>
>> ---> System.AccessViolationException: Attempted to read or write
>> protected
>> memory. This is often an indication that other memory is corrupt.
>> at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageA(MSG& msg)
>> at
>> System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.Uns
>> afeNativeMethods.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()
>>
>> I can explain for 3 more pages but that's not the idea. We have tried
>> everything. *any* idea is welcome.
>>
>>
>>
>>
>> __________ Informatie van ESET NOD32 Antivirus, versie van database
>> viruskenmerken 4794 (20100121) __________
>>
>> Het bericht is gecontroleerd door ESET NOD32 Antivirus.
>>
>> http://www.eset.com
>>
>>

>
> __________ Informatie van ESET NOD32 Antivirus, versie van database
> viruskenmerken 4794 (20100121) __________
>
> Het bericht is gecontroleerd door ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>



__________ Informatie van ESET NOD32 Antivirus, versie van database viruskenmerken 4794 (20100121) __________

Het bericht is gecontroleerd door ESET NOD32 Antivirus.

http://www.eset.com



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: System.AccessViolation when opening Modal VB6 Form from HostedVB6 ActiveX control inside .NET WinForms application Family Tree Mike Microsoft Dot NET Framework Forms 3 22nd Jan 2010 09:00 AM
Opening modal page from modal page Don Microsoft ASP .NET 0 28th May 2008 12:49 AM
"can't show a non modal form when modal form is displayed" tomer Microsoft Outlook Program Addins 9 26th Feb 2008 07:12 AM
Modal form opening another modal form David W Microsoft Dot NET Framework Forms 5 16th Feb 2007 09:01 PM
{OT - slightly} free website add ons (locally hosted preferred but remotely hosted OK) *ProteanThread* Freeware 2 31st Aug 2004 11:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:08 AM.