realbasic-plugins
[Top] [All Lists]

Re: Storing global data (was Callbacks and events on Windows)

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: Storing global data (was Callbacks and events on Windows)
From: James Milne <james dot milne at mac dot com>
Date: Wed, 26 Apr 2006 17:22:55 +0100
Cc: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <C0755736 dot 4B539%listmail1 at dsl dot pipex dot com>
 
On Wednesday, April 26, 2006, at 04:58PM, Dave Addey <listmail1 at dsl dot 
pipex dot com> wrote:

>Here's another, final piece of the puzzle:
>
>The WindowProc receives Messages.  DirectInput sets Events:
>
>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/
>IDirectInputDevice8__SetEventNotification.asp
>
>How do the two intermix?  How do I differentiate messages and events in my
>WindowProc?  Or have I got the complete wrong end of the stick?

Ah, sorry. I haven't read the DirectInput documentation yet; it's been years 
since I've done any work with DirectInput.

Dredging up Win32 that I've done my best in the last couple of years to 
suppress:

Events are objects that you create and use to send messages between threads. 
You create an Event using CreateEvent and attach it to the DirectInput device 
using SetEventNotification. You later query that Event using 
MsgWaitForMultipleObjects to see if anything has happened for that device. If 
anything has happened, you can then query the device. Typically you call 
MsgWaitForMultipleObjects from another thread, as MsgWaitForMultipleObjects can 
be told to block the thread until something happens.

I'll have a better read when I get home this evening. I'll be able to advise 
you better then.

--
Kind regards,
James Milne
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>