cs_mfrai02
Messages postés18Date d'inscriptionjeudi 6 mars 2003StatutMembreDernière intervention22 février 2007
-
22 févr. 2007 à 16:18
cs_mfrai02
Messages postés18Date d'inscriptionjeudi 6 mars 2003StatutMembreDernière intervention22 février 2007
-
22 févr. 2007 à 16:33
Salut,
lorsque je veux traiter le message WM_QUERYENDSESSION ou WM_ENDSESSION, je peux déterminer grace au lParam si l'utilisateur à réaliser un logoff ou un shutdown (MSDN -> Windows 2000/XP: If this parameter is zero, the system is shutting
down.)
Mais j'ai pas trouvé comment faire la différence entre un reboot et un shutdown.
LRESULT CALLBACK WindowProc(
HWND hwnd, // handle to window
WM_QUERYENDSESSION, // the message to send
WPARAM[ wParam], // not used
LPARAM[ lParam] // logoff option
);
Merci par avance si vous pouvez me donner la solution.
yoyo269
Messages postés1403Date d'inscriptionlundi 23 février 2004StatutMembreDernière intervention11 janvier 20092 22 févr. 2007 à 16:31
Voilà un extrait de la MSDN :
LRESULTCALLBACKWindowProc( HWNDhwnd, // handle to window
UINTuMsg, // message identifier
WPARAMwParam, // not used
LPARAMlParam // logoff option
);
Parameters
* hwnd : A handle to the window. * uMsg : <dd>The WM_QUERYENDSESSION identifier. * wParam : <dd>This parameter is reserved for future use. * lParam : <dd>This
parameter can be one or more of the following values. If this parameter
is 0, the system is shutting down or restarting (it is not possible to
determine which event is occurring).Value |Meaning |----
ENDSESSION_CLOSEAPP
0x1, The
application is using a file that must be replaced, the system is being
serviced, or system resources are exhausted. For more information, see Site officiel de YoyoCut, découpe fichiers open source]
cs_mfrai02
Messages postés18Date d'inscriptionjeudi 6 mars 2003StatutMembreDernière intervention22 février 2007 22 févr. 2007 à 16:33
c'est bien ce qui me semblait aussi, merci pour ta réponse en tout cas.
Je sais pas s'il y a un moyen de contourner ce problème je vais faire des recherches !!!
Encore merci !