> Still got one problem, > > my $messref [EMAIL PROTECTED]; > $result=$Win1->PeekMessage(0,0,@$messref); > > Should fill @message with the message details. > like getmessage does, ... > but it dont, any suggestion ?
I suggest there is a bug in the xs. I have come across the same thing and did not manage to find a solution - the 3-parm-version of PeekMessage simply does not return the messref, it garbles up your program instead. Simple workaround is, when PeekMessage signals the Message you are looking for is in the Q, do a GetMessage to get it. Very easy. The problem I see in your case: if you want to make sure you get notified before shutdown, you either have to poll PeekMessage at a rather high frequency (burning resources) or do a GetMessage on that particular ID, blocking your script for everything else. Maybe you can fork into a new task that then sits there, patiently waiting for GetMessage to trigger saving the settings. hth Harald