none
WC7, api reference? Setwindowshookex supported? RRS feed

  • Question

  • I'm very new to Windows Compact..

    The program I'm writing needs to know when an usb memory stick is inserted. If anyone can give me the code to that, great!

    My first idea was to just keep enumerating over all the drives, and see when a new drive would pop up. That didn't work, because Compact .Net doesn't support the functions I need to do that. I turned to the reference of Compact 7 at the msdn site, but so far I've not been able to find the functions that would help me achieve my goal.

    Then I tried the setwindowshookex function, to intercept windows messages: Apparently a message is send to the application whenever a new drive is detected. Unfortunately in the code I wrote, the setwindowshookex function keeps returning 0 which means an error ocurred. The getlasterror function however returns a 0 value as well (which means no error occurred). After reading some material on the Internet, I started to doubt whether the setwindowshookex function was even supported. Maybe it's just a stub that returns zero. 

    Basically my questions are:

    How do I know what functions the WC7 API offers?

    Is setwindowshookex function supported fully?

    Thanks

    Monday, April 29, 2013 12:42 AM

All replies