Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3427254
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:48:51+00:00 2026-05-18T06:48:51+00:00

I have a .NET 3.5 winforms app that calls a method in a VB6

  • 0

I have a .NET 3.5 winforms app that calls a method in a VB6 ActiveX DLL, which brings up a dialog box. Everything worked fine for almost 10 years (first as a .NET 1.1 app, then 2.0, then 3.5, all on Windows XP). Now that the customer has upgraded to Windows 7, I am experiencing a System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

The structure of the call is like this:

.NET Code

try {
  VB6Object obj = new VB6Object();
  obj.DoStuff();
}
catch (Exception ex) {  // handle }

VB6 code in VB6Object class

Public Sub DoStuff()
    on error goto errHandle
    RetrieveData();

    Call frmPopup.Show(vbModal)

exitPoint:
    exit sub
errHandle: 
    ' handle error
End Sub

The problem starts in the VB6 code on this line: Call frmPopup.Show(vbModal). The error is propagated to the .NET code (error handlers in the VB6 code are completely ignored) where I handle the error. I thought the problem might be the Load event of the frmPopup, but the code does not ever reach the Load event (i have tracing statements all over the place, so that’s how I know).

The interesting part is that the second time I make the call, it does not fail at all, but the form is missing a 3rd party grid (ActiveX DevExpress Quantum Grid), so I am assuming that the grid is probably not compatible somehow with Windows 7.

Everything that I have described happens when I simply run the application as an EXE or from VS2008 IDE, so the VB6 ActiveX DLL is simply a reference. If I use COM indirection and run the VB6 code in the IDE, everything works perfectly fine.

I’ve tried running things as an Administrator, but nothing changed.

Where can I go next to troubleshoot this issue?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T06:48:51+00:00Added an answer on May 18, 2026 at 6:48 am

    Turn DEP off. Older Ax Controls tend to use funky subclassing thunks (other than ATL/MFC ones) that no one cares to set the NX flag off.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have an MSI installer for a .Net WinForms app for Windows XP that
I have a .net winforms app which has a few animation effects, fade ins
I've got a VB.NET WinForms app in which I have the need to refer
I have a legacy WinForms Mdi App in VB.Net 2.0 which I am adding
I have a WinForms app written in C# with .NET 3.5. It runs a
I have created a setup project in VS2008. My WinForms app uses .NET 2.0,
I have a .net 3.5 WinForms application that runs fine on my machine, but
I have the following class in my C# .NET 3.5 win forms app: class
I have a .net (3.5) WinForms application and want to display some html on
I have a RichTextBox in .NET WinForms. I have been hooking up hot keys

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.