Opened 21 months ago

Last modified 20 months ago

#14829 new defect

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: Blocking:
Patch: no

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 (5)

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

Download all attachments as: .zip

Change History (15)

Changed 21 months ago by M

wxdll_minimal_sample

Changed 21 months ago by M

comment:1 Changed 21 months ago by M

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

comment:2 Changed 21 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..

comment:3 Changed 21 months ago by vadz

  • Status changed from new to infoneeded_new

comment:4 Changed 21 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.

comment:5 Changed 21 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".

comment:6 Changed 21 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.

comment:7 Changed 21 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.

comment:8 Changed 21 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 20 months ago by M

Changed 20 months ago by M

Changed 20 months ago by M

comment:9 Changed 20 months ago by M

I've attached.

comment:10 Changed 20 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.