flat assembler
Message board for the users of flat assembler.

Index > Windows > Reply to WM_QUERYENDSESSION

Author
Thread Post new topic Reply to topic
qyte



Joined: 13 Aug 2006
Posts: 6
qyte 13 Aug 2006, 12:05
Hi,

I'm writing a program to copy files, and i would like to prevent windows-shutdown while copying. Basicly I know that a WM_QUERYENDSESSION message is sent to every window running.

I catch the message in the WinProc but to prevent my window and the OS from shutting down i have to return FALSE on the message. My question is how to do that (DefWindowProc returns TRUE for this Message). I tryed ReplyMessage, retn 0 but nothing works.

Thanks in advance.
Post 13 Aug 2006, 12:05
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 13 Aug 2006, 12:27
Code:
mov eax, 0 ; or "xor eax, eax"
ret ; or "jmp .exitProc"
    
Post 13 Aug 2006, 12:27
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.