0

These days I upgrade to Windows 10 to 1903, however, after that, my MFC program soon disappears after running up. The solution is composed of an MFC project and a DLL project, they are static linked.

Vikrant
  • 4,920
  • 17
  • 48
  • 72
ALICE.C
  • 1
  • 1

2 Answers2

0

Thank you all for paying attention to my question. So far the issue disappear, and below is the story.

1) I modified my code to dynamic link.
2) I got the message of System AccessViolationException when calling the second API of DLL.
3) I found think link. Programs randomly getting System.AccessViolationException
4) In the post, someone mentioned that change platform setting may solve it
5) So I change my platform setting to x64
6) It works
7) I continue to finish my work base on x64 and everything looks OK
8) However I was required to provide x32 version Orz
9) So I have to dig this question as very first priority
10) However, base on the modified source code, now x32 is able to run

Sorry there is not so many useful information.....

ALICE.C
  • 1
  • 1
0

There is more information. I tried to install VS2013 Express at another Win7 64bit PC, which is able to re-produce the phenomenon. It does not matter x86 or Win32 this time.

When Running "Local Windows Debugger," (or use hostkey of: F10, F11, F5) the debug interface soon finish, with below log:

The program '[2576] test.exe: Native' has exited with code 1 (0x1).

However, in my code did not write any pattern like "return 1" Below is the main function built-in

[STAThreadAttribute]
int main(array<System::String ^> ^args)
{
    // Enabling Windows XP visual effects before any controls are created
    Application::EnableVisualStyles();
    Application::SetCompatibleTextRenderingDefault(false);
    // Create the main window and run it
    Application::Run(gcnew Form_main());
    return 0;
}
ALICE.C
  • 1
  • 1