Gamestudio Links
Zorro Links
Newest Posts
Performance reporting showing Annual and monthly % returns
by OptimusPrime
Today at 01:19
Issue with inconsistent test results
by kvm
Yesterday at 17:24
Access string content through another string
by ChrstphFr
Yesterday at 11:30
How to return a vector from a function
by Superku
Yesterday at 05:39
Vector Displacement, realtime Blendshapes
by jumpman
08/14/18 23:46
Code Repository
by OptimusPrime
08/14/18 13:25
Votes for future features
by OptimusPrime
08/14/18 07:18
AUM Magazine
Latest Screens
AckCon'18 - Lotter vs the World 2 - Preview Release
Evonet Beta v1.0 : Online Project Development Template
Lake scene
Forgotten Tales - Demo version
Who's Online
6 registered (Dalla, kvm, jenGs, firecrest, alibaba, bailemad), 452 Guests and 3 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
Ulenspegel, toto, FloMi, behr065, OptimusPrime
18027 Registered Users
Topic Options
Rate This Topic
#472699 - 05/15/18 07:17 on_exit - Not calling if engine crashes.
EVO Offline
Junior Member

Registered: 02/09/13
Posts: 89
Loc: Maysville, Ga
I have important data that needs changed when my project exits. I'm currently dealing with the issue that if the project crashes, the on_exit function never gets called.

Is there a way to force the on_exit function if the project crashes?
_________________________
Evoeon.com - Evonet - Twitter


Top
#472702 - 05/15/18 10:58 Re: on_exit - Not calling if engine crashes. [Re: EVO]
txesmi Offline
Serious User

Registered: 06/13/07
Posts: 1159
Loc: Hiporope and its pain
Hi,
as far as I tested, the window callback function always receive the window destroying message.

Code:
LRESULT CALLBACK onMsgOld (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);

LRESULT CALLBACK myMsg (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) {
	if (message == WM_DESTROY) {
		// do whatwever you need at window destroying time
	}
	return onMsgOld(hwnd, message, wParam, lParam);   	  
}

void main () {
	onMsgOld = on_message;
	on_message = myMsg;
	...



Salud!

Top
#472714 - 05/15/18 19:02 Re: on_exit - Not calling if engine crashes. [Re: txesmi]
EVO Offline
Junior Member

Registered: 02/09/13
Posts: 89
Loc: Maysville, Ga
This works great.
Thanks Txesmi.
_________________________
Evoeon.com - Evonet - Twitter


Top
#472722 - 05/15/18 22:40 Re: on_exit - Not calling if engine crashes. [Re: EVO]
txesmi Offline
Serious User

Registered: 06/13/07
Posts: 1159
Loc: Hiporope and its pain
glag of been helpful

Top


Moderator:  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de