News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

On The Event Of ...

Started by 2-Bit Chip, September 27, 2009, 08:34:14 PM

Previous topic - Next topic

2-Bit Chip

I can not think up any ways to make event handler.


  • I don't want to burn out out the computer
  • Speed is necessary

What ideas could make an event handler? A gigantic loop? A driver for the system (.sys)?

BlackVortex

What kinds of event do you want to monitor ? I like windows callback system with SetWindowsHookEx ... is that any help to you ?

2-Bit Chip

It would be custom event handlers.

For an IRC protocol wrapper, it would need to run independent of the program (threaded) to grab what is being said at real-time. It would need to have

invoke irc_sethandler, OFFSET on_private_msg, IRC_EVENT_PRIVMSG
or
invoke irc_sethandler, OFFSET on_all_events, IRC_EVENT_ALL



I really hope you can understand this clutter. :red

hutch--

2 bit,

How regularly do you need to poll the event you want to monitor ?

It would be easy enough to set up a timer every 100ms or perhaps longer interval so the app that watches does not use much processor time.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

BogdanOntanu

Thou shall not make a gigantic loop unless you are a 8bit bit real time microcontroller.

Thou shall create a set of sincronization objects for each event.
Thou shall WaitForMultipleObjects or single objects to be signaled by the OS when a desired event occurs.

Thou may use callbacks for the same purpose (if available).
Ambition is a lame excuse for the ones not brave enough to be lazy.
http://www.oby.ro