<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Hi Klaus,<br><br>Thank you for the follow-up and the details.  Sorry for my delayed reply.<br><br>I believe you have helped me identify the root cause of why I am not receiving some events (registering with the Console event).<br><br>From your comments then, it seems if I want to track events for running VMs, I should enable console event tracking for each running VM.<br><br>Question:    Do I need to specifically call the IConsole::IEventSource::unregisterListener for VMs that, though were previously running, are no longer running?<br><br><br>Thanks,<br>Joe<br><br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><font face="Tahoma" size="2"><hr size="1"><b><span
 style="font-weight: bold;">From:</span></b> Klaus Espenlaub <klaus.espenlaub@oracle.com><br><b><span style="font-weight: bold;">To:</span></b> Nikolay Igotti <nikolay.igotti@oracle.com><br><b><span style="font-weight: bold;">Cc:</span></b> Joseph Smith <joseph1962smith@yahoo.com>; vbox-dev@virtualbox.org<br><b><span style="font-weight: bold;">Sent:</span></b> Fri, March 25, 2011 9:11:20 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [vbox-dev] IEvent not triggering on some events ... ?<br></font><br>
Hi Joe,<br><br>see comments inline<br><br>On 24.03.2011 20:23, Nikolay Igotti wrote:<br>> Hi Joseph,<br>><br>> I think you just hit an issue (aka bug) in VirtualBox - certain events<br>> not triggered when they should or could be triggered.<br>> The only solution is to implement those.<br>><br>> Klaus, what do you think about when shall events firing happen, do you<br>> have bit of time to look on that?<br>><br>> Thanks,<br>> Nikolay<br>><br>><br>><br>> 24.03.2011 17:45, Joseph Smith пишет:<br>>><br>>> Hi,<br>>><br>>> Was wondering if anyone has had an opportunity to give this some<br>>> thought and maybe have some suggestions or ideas to offer.<br>>><br>>><br>>> Thanks,<br>>> Joe<br>>><br>>> ------------------------------------------------------------------------<br>>> *From:* Joseph Smith <<a
 ymailto="mailto:joseph1962smith@yahoo.com" href="mailto:joseph1962smith@yahoo.com">joseph1962smith@yahoo.com</a>><br>>> *To:* <a ymailto="mailto:vbox-dev@virtualbox.org" href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a><br>>> *Sent:* Sat, March 19, 2011 11:11:12 PM<br>>> *Subject:* [vbox-dev] IEvent not triggering on some events ... ?<br>>><br>>><br>>> VBox Ver: 4.0.0 and 4.0.4<br>>> Hosts: Win XP, openSuSE 11.2, Mac OS 10.6<br>>> Guests: various<br>>><br>>> I am using the VirtualBox webservice PHP APIs (via<br>>> vboxServiceWrappers.php). With the release of 4.0.x, I shifted my<br>>> solution approach from a heavy polling approach to the light-weight<br>>> IEvent approach.<br>>><br>>> It appears there are some key events that are not being triggered. For<br>>> example, I do not receive the IMediumChanged and IMediumRegistered<br>>>
 events among some lesser important events that I don't quite need just<br>>> yet (e.g: IRuntimeErrorEvent).<br><br>IMediumRegistered (an IVirtualBox event) indeed is never triggered. Will <br>look into getting this fixed for 4.0.6. No promises.<br><br>IMediumChanged (an IConsole event) is triggered, but only when a VM is <br>running. You need to register with the Console object of the running VM, <br>not with the local Console object which is associated with every session...<br><br>I can see no problem with IRuntimeErrorEvent (also an IConsole event) <br>either, it should be fired for every runtime error encountered by a <br>running VM. Sure you're using the right Console object?<br><br>>> I do consistently receive the OnMachineRegistered,<br>>> OnMachineDataChanged, OnMachineStateChanged, OnGuestPropertyChanged,<br>>> OnEventSourceChanged, OnSessionStateChagned events and a few others.<br>>><br>>> When I register the
 listner (EventSource::RegisterListener), I listen<br>>> for 'Any' events as described in the documentation and after handling<br>>> each event, I call EventSource::EventProcessed.<br>>><br>>> Does ver 4.0.x fire IMedium events ? Any suggestions of what I might<br>>> be able to look for to determine what I might be doing incorrectly?<br><br>Half of them yes, half of them no.<br><br>>> Oh ... my application runs for weeks at a time without being restarted<br>>> and polls about every 3 seconds for events. There are never any events<br>>> that are not processed. Of the events I listed above, I continue to<br>>> receive those events when actions trigger them ... just not getting<br>>> many of the others listed in the enumerated VBoxEvent Type.<br><br>Again sounds like a description of the symptoms of not registering with <br>the Console events correctly. They do not show up for the VirtualBox
 <br>event source.<br><br>Klaus<br><br>>><br>>> Any suggestions are welcome.<br>>><br>>><br>>> Thanks,<br>>> Joe<br>>><br>>><br>>><br>>> _______________________________________________<br>>> vbox-dev mailing list<br>>> <a ymailto="mailto:vbox-dev@virtualbox.org" href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a><br><span>>> <a target="_blank" href="http://vbox.innotek.de/mailman/listinfo/vbox-dev">http://vbox.innotek.de/mailman/listinfo/vbox-dev</a></span><br>><br><br></div></div>
</div></body></html>