waitingsong / node-win32-api

win32 api
MIT License
413 stars 53 forks source link

SendMessageW stalls entire node app #81

Open laztheripper opened 10 months ago

laztheripper commented 10 months ago

If the target process is unable to handle the message, which always happens eventually either when the target isn't controlled by you, or the system is under load, or the target has crashed - the sending node app will then wait infinitely for SendMessageW to return, and it never does.

I went through win32-api's src and SendMessageTimeoutW is missing, if time permits I would very much appreciate if someone added it, because it would solve exactly these issues in a very critical part of my stack.

Also willing to pay a bounty for whoever adds it!

Thank you

waitingsong commented 1 month ago

added user32.SendMessageTimeoutW(), not test