We're migrating a C++ application to .Net CF. We need to monitor both the UI and several external events. I therefore wonder if we can get the same functionality of MsgWaitForMultipleObjects in the unmanaged world also in the managed world?
Edit: P/Invoke is not the complete answer I'm seeking, since what I meant was that we want the full functionality of what we have in the unmanaged world, meaning that when input messages are pumped, events and other sync objects are also monitored. We don't have access to the message pump in .Net, for obvious reasons. So where do we hook ourselves in for P/Invoking MsgWaitForMultipleObjects?