requests Windows message

WSAAsyncSelect
The WSAAsyncSelect function requests Windows message-based notification of network events for a socket.

This is what MSDN says about WSAAsyncSelect, for me this function works fine and now my question is There is also other function who makes a request for Windows Message (let say for example: Create File, or Registry ... )
[353 byte] By [GuruAPI] at [2007-11-19 15:59:18]
# 1 Re: requests Windows message
I don't understand your question. What kind of notifications are you looking for ?

Are you wanting to be notified of changes to registry or file system and what to be notified of these changes via window message ?
kirants at 2007-11-9 13:18:49 >
# 2 Re: requests Windows message
I don't understand your question. What kind of notifications are you looking for ?

Are you wanting to be notified of changes to registry or file system and what to be notified of these changes via window message ?

Yes Kirants this is actually what i look for, i need to be informed via Windows Message quee ... like i says earlier WSAAsyncSelect is a function that ships events for network to windows messages There should be function for shipping other kind of events to message queue

Thx
GuruAPI at 2007-11-9 13:19:58 >
# 3 Re: requests Windows message
It's still not 100% clear what you are trying to do, but you can just send/post your own messages using SendMessage/PostMessage. You can create your own message identifiers starting at WM_APP or by using RegisterWindowMessage (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/messagesandmessagequeues/messagesandmessagequeuesreference/messagesandmessagequeuesfunctions/registerwindowmessage.asp)
Marc G at 2007-11-9 13:20:57 >
# 4 Re: requests Windows message
Marc G i used RegisterWindowMessage create a certain channel in order recive events from the network
To ship events from network using i have used WSAAsyncSelect who retrive Windows message-based notification of network events for a socket.

So to create another channel to retive another kind of information i have to crete it using RegisterWindowMessage and to write/use a function that should send me on this channel information like file writen on hdd, modify on registry. (This system should work in order to Log Every System Events)

With other words i whant to know if there are function already implemented like WSAAsyncSelect that rerive other kind of events from WIndows Kernel
GuruAPI at 2007-11-9 13:22:00 >
# 5 Re: requests Windows message
Unfortunately, there is no such one place to receive all these and you will find all these scattered and non-uniform.

For e.g. you can sniff on file system notifications using
FindFirstChangeNotification (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/findfirstchangenotification.asp)

But, you will also notice that it doesn't post a window message , instead it uses kernel object signalling.. It is upto you to implement some sort of mechanism to post your own message when you hit on these conditions.
kirants at 2007-11-9 13:22:59 >
# 6 Re: requests Windows message
Yes kirants thx i see what kind of info that function can bring to me, i will try to use it with file creation/changing/deleting but still remain some questions raised and i donnt know what to solve them ... how can I recive information for registry changes ?
GuruAPI at 2007-11-9 13:23:59 >
# 7 Re: requests Windows message
Yes kirants thx i see what kind of info that function can bring to me, i will try to use it with file creation/changing/deleting but still remain some questions raised and i donnt know what to solve them ... how can I recive information for registry changes ?

one thing you can do is use API hooking to hook the Registry api functions calls and you will be able to know which key is going to be changed with the new value and also you will be able to know which app trying to make the change.
the cons for this method ( API hooking ) is that its not that trivial here is an article that can help you : API Hooking Revealed (http://www.dev-archive.com/Cpp/W-P/system/misc/article.php/c5667)

PS: you can hook also other api like ::CreateFile(..) and such ( like you pointed out in your first post )

Cheers
golanshahar at 2007-11-9 13:25:01 >