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 94605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:31:40+00:00 2026-05-10T23:31:40+00:00

I have an application written in C#.Net (Framework 2.0 if it matters). It calls

  • 0

I have an application written in C#.Net (Framework 2.0 if it matters). It calls a VB6 exe that exposes a COM class with one method – that shows a form.

When the VB form is closed, I get a system error (Windows message): The memory location could not be read. Then, Windows asks me whether to close the application or debug it. It doesn’t really matter what I choose since there are not debuggers installed on the test machine and when I select debug it gives me a message that it will have to close.

The error only happens under two conditions (both must apply):

  • When this is run under Windows 2000.
  • Also, this only happens if I click the ‘Display Report’ button first, which calls another COM DLL – Crystal reports – to generate a report.

Basically, the flow is like this:

     C#.Net application      |-- MDI Form           |   When clicking a button on the form, the VB6 method is called           +-- showing the form. setParent(VBForm.Handle, DotNetForm.Handle) is called           |   and the form is shown. The called method returns (there is no return value)           |    |           |    +-- When clicking 'Display report', crystal reports is used to generate a report and show it to the user           |    |           |    \-- When Exit button is clicked, form is closed - this is where the error occures           |           \-- .Net form keeps on living long after that inner form is closed 

Does anyone know what could cause such an error? The VB has an On Error Goto line surrounding the entire Main method, which should catch any error in VB – but it doesn’t. The error does, however, come from the VB-generated EXE file.

  • 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. 2026-05-10T23:31:41+00:00Added an answer on May 10, 2026 at 11:31 pm

    You could confirm which module within the VB exe is crashing by attaching an unmanaged debugger and seeing what the stack trace is.

    Crystal Reports sounds like a likely culprit, but it is possible that something else is triggering the problem. Assuming you have access to the VB code I would check that all the Crystal Report COM objects are being released correctly. If something is being left around then it could be interacting badly with application shutdown.

    If you want a really hackish solution you could consider calling the Win32 TerminateProcess function within the OnClose event. This will terminate the process without informing any attached DLLs … not pretty and may lead to dangling connections to databases, etc that will need to clean themselves up (likely on timeout).

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

Sidebar

Ask A Question

Stats

  • Questions 69k
  • Answers 69k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer SELECT atype, SUM(CASE btype WHEN 'x' THEN 1 ELSE 0… May 11, 2026 at 12:39 pm
  • added an answer Under the Solution properties, you can choose a configuration (or… May 11, 2026 at 12:39 pm
  • added an answer It looks like you have a custom error page called… May 11, 2026 at 12:39 pm

Related Questions

Ok, I have an application written in C#. We have data in an SQL
I have an application written in java, and I want to add a flash
I have an application written in Delphi 7 which does not require an admin
I have an application written in VB.NET that interacts with Excel via interop. I
We have an application written in C#, using .NET Framework 3.0 or 3.5 or
I have an existing application that is written in C++ for Windows. This application
I've written the following routine to manually traverse through a directory and calculate its
I am new here so first of all my greetings to you I am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.