Ticket #14829 (new defect)

Opened 7 months ago

Last modified 7 months ago

Application doesn't exit which is created as wxWidgets dll

Reported by: M Owned by:
Priority: low Milestone:
Component: wxMSW Version: 2.9.4
Keywords: Cc:
Blocked By: Patch: no
Blocking:

Description

Hello,

I've created a dll with wxWidgets which the app is calling from executable. But As I seen, when I exit dll application, executable which calls the dll GUI won't exit and still runs at background. Only GUI is invisible and still runs at background. I've attached the application.

The code in dll which is:

MyDllApp::~MyDllApp() {
//ExitProcess(0);
}

When I uncomment ExitProcess(0) it is exiting from dll. But it isn't exiting dll which I've provided the exit code in main.cpp sdk executable.

if(!msg1) {

wx_dll_cleanup();
PostQuitMessage(0);
//::PostMessage(g_hwndMain,WM_DESTROY,0,0);

}

}

What will be the problem?

Thanks in Advance.

Attachments

wxdll_minimal_sample.zip download (10.0 KB) - added by M 7 months ago.
wxdll_minimal_sample
wxdll_minimal_sample.2.zip download (10.0 KB) - added by M 7 months ago.
my_dll.cpp.patch download (11.1 KB) - added by M 7 months ago.
my_dll.h.patch download (1.3 KB) - added by M 7 months ago.
sdk_exe.cpp.patch download (4.7 KB) - added by M 7 months ago.

Change History

Changed 7 months ago by M

wxdll_minimal_sample

Changed 7 months ago by M

Changed 7 months ago by M

Sorry, I've accidently add the second sample zip which is same as the first one.

Changed 7 months ago by oneeyeman

Hi,
What is you Windows version/compiler? Can you reproduce the problem in the dll sample?
If you can you can post the patch to the sample and someone will look at it..

Changed 7 months ago by vadz

  • status changed from new to infoneeded_new

Changed 7 months ago by M

  • status changed from infoneeded_new to new

I am using Windows XP, VC++ 2008 SP1. Dll sample works fine and exists mainloop. The problem is different which I've attached. Only I want to run wxWidgets application from dll. It seems that the main sdkexe won't exists from the mainloop. I am using sdkexe for starting point of wxdll which will start the dll and release sources when wxWidgets dll application is closed.

Changed 7 months ago by vadz

  • status changed from new to infoneeded_new

If the sample works, please make a minimal patch to it showing the problem.

Also, I don't understand at all what do you mean by "run wxWidgets application from dll".

Changed 7 months ago by M

  • status changed from infoneeded_new to new

Well, I mean: "Only I want to show wxWidgets GUI from dll" The only difference with dll sample, I am using sdkexe for start point of wxdll and releasing resources when exited from executable.

Changed 7 months ago by vadz

  • status changed from new to infoneeded_new

The sample does show wxWidgets GUI from DLL. If it works for you, please determine what do you do differently and show us a patch with your changes.

If it doesn't work for you, please explain how exactly does it fail.

Sorry but I don't know how to explain this more clearly.

Changed 7 months ago by M

  • status changed from infoneeded_new to new

Sorry, I'll try to provide patch difference regarding dll sample and with my application.

Changed 7 months ago by M

Changed 7 months ago by M

Changed 7 months ago by M

Changed 7 months ago by M

I've attached.

Changed 7 months ago by vadz

  • priority changed from normal to low

OK, we're clearly having different interpretation of the word "minimal". I'm sorry but I won't have time to look into this.

Note: See TracTickets for help on using tickets.