<html><body bgcolor="#FFFFFF"><div>Well I don't run a Windows host, but I assume that dll is "used" by all running VMs with the guest additions loaded. I doubt it's associated with any given VM.</div><div><br></div><div>The API gives you tools to list all the VMs, and to determine what state they're in. If that doesn't meet your needs, you're going to have to be more specific about your eventual goal. </div><div><br></div><div>~JW<br><br>Sent from my iPod</div><div><br>On May 8, 2009, at 7:43 PM, Huihong Luo <<a href="mailto:huisinro@yahoo.com">huisinro@yahoo.com</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div><table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font: inherit;"><div>take an example, the VBoxSharedFolders.dll is a service between guest and host. This dll is running inside the same process as the VirtualBox.exe launching the vm. I just need to find out the current vm this shared dll is being used.</div>
<div> </div>
<div>I couldn't find any method to do this simple thing: where am I?<br><br>--- On <b>Fri, 5/8/09, Josh Wright <i><<a href="mailto:jshwright@gmail.com">jshwright@gmail.com</a>></i></b> wrote:<br></div>
<blockquote style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid"><br>From: Josh Wright <<a href="mailto:jshwright@gmail.com">jshwright@gmail.com</a>><br>Subject: Re: [vbox-dev] How to get the current running IMachine instance inside a host service?<br>To: "Huihong Luo" <<a href="mailto:huisinro@yahoo.com">huisinro@yahoo.com</a>><br>Cc: <a href="mailto:vbox-dev@virtualbox.org"><a href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a></a><br>Date: Friday, May 8, 2009, 3:03 PM<br><br>
<div class="plainMail">What do you mean by "the" running VMs?<br><br>IVirtualBox::machines[] will give you a list of all the existing VMs,<br>you can then look at IMachine::state to see if they're running or not.<br><br>~JW<br><br>On Fri, May 8, 2009 at 12:38 PM, Huihong Luo <<a href="http://us.mc343.mail.yahoo.com/mc/compose?to=huisinro@yahoo.com" ymailto="mailto:huisinro@yahoo.com"><a href="mailto:huisinro@yahoo.com">huisinro@yahoo.com</a></a>> wrote:<br>> some clarification: Host service, I mean something like the<br>> VBoxSharedFolders or VBoxSharedClipboard service dll<br>><br>> --- On Fri, 5/8/09, Huihong Luo <<a href="http://us.mc343.mail.yahoo.com/mc/compose?to=huisinro@yahoo.com" ymailto="mailto:huisinro@yahoo.com"><a href="mailto:huisinro@yahoo.com">huisinro@yahoo.com</a></a>> wrote:<br>><br>> From: Huihong Luo <<a href="http://us.mc343.mail.yahoo.com/mc/compose?to=huisinro@yahoo.com" ymailto="mailto:huisinro@yahoo.com"><a href="mailto:huisinro@yahoo.com">huisinro@yahoo.com</a></a>><br>> Subject: Re: [vbox-dev] How to get the
 current running IMachine instance<br>> inside a host service?<br>> To: "Armindo Silva" <<a href="http://us.mc343.mail.yahoo.com/mc/compose?to=deathon2legs@gmail.com" ymailto="mailto:deathon2legs@gmail.com"><a href="mailto:deathon2legs@gmail.com">deathon2legs@gmail.com</a></a>><br>> Cc: <a href="http://us.mc343.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org" ymailto="mailto:vbox-dev@virtualbox.org"><a href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a></a><br>> Date: Friday, May 8, 2009, 7:08 AM<br>><br>> Thanks. Yes, we can get that info from command line, on linux or windows.<br>><br>> I was wondering if there are better ways? for instance, the COM. If not,<br>> perhaps add a method to IVirtualBox, or pass some info to the host services<br>> on loading time.<br>><br>> --- On Fri, 5/8/09, Armindo Silva <<a href="http://us.mc343.mail.yahoo.com/mc/compose?to=deathon2legs@gmail.com" ymailto="mailto:deathon2legs@gmail.com"><a href="mailto:deathon2legs@gmail.com">deathon2legs@gmail.com</a></a>> wrote:<br>><br>>
 From: Armindo Silva <<a href="http://us.mc343.mail.yahoo.com/mc/compose?to=deathon2legs@gmail.com" ymailto="mailto:deathon2legs@gmail.com"><a href="mailto:deathon2legs@gmail.com">deathon2legs@gmail.com</a></a>><br>> Subject: Re: [vbox-dev] How to get the current running IMachine instance<br>> inside a host service?<br>> To: "Huihong Luo" <<a href="http://us.mc343.mail.yahoo.com/mc/compose?to=huisinro@yahoo.com" ymailto="mailto:huisinro@yahoo.com"><a href="mailto:huisinro@yahoo.com">huisinro@yahoo.com</a></a>><br>> Cc: <a href="http://us.mc343.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org" ymailto="mailto:vbox-dev@virtualbox.org"><a href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a></a><br>> Date: Friday, May 8, 2009, 6:27 AM<br>><br>> On linux hosts:<br>><br>> $ ps aux | grep -i virtual<br>> mndo     18797  0.0  0.0   5600  1808 ?        S    13:02   0:00<br>> /usr/lib/virtualbox/VBoxXPCOMIPCD<br>> mndo 
    19614  0.0  0.0   3336   884 pts/5    S+   14:24   0:00 grep -i<br>> virtual<br>> mndo     21477  0.0  0.2  13828  4256 ?        Sl   13:03   0:01<br>> /usr/lib/virtualbox/VBoxSVC --automate<br>> mndo     21485 20.2 24.4 631264 503028 ?       Sl   13:03  16:26<br>> /usr/lib/virtualbox/VirtualBox --comment WinXP --startvm<br>> 849a196c-2b64-4235-97ea-1a6722c79d96<br>><br>> The last line have the name and the uuid.<br>> Don't have a windows host :|<br>><br>> Hope this helps.<br>><br>> Cheers<br>><br>> Armindo<br>><br>><br>> On Thu, May 7, 2009 at 6:21 PM, Huihong Luo <<a href="http://us.mc343.mail.yahoo.com/mc/compose?to=huisinro@yahoo.com" ymailto="mailto:huisinro@yahoo.com"><a href="mailto:huisinro@yahoo.com">huisinro@yahoo.com</a></a>> wrote:<br>>> I am developping a shared service between host and guest. On host service<br>>> dll, I need to get some info about the current running vm. What is the<br>>> correct way of doing this? I couldn't figure out how to get the vm name or<br>>> vm uuid.<br>>><br>>> Thanks,<br>>><br>>> Huihong<br>>><br>>><br>>> _______________________________________________<br>>> vbox-dev mailing list<br>>> <a href="http://us.mc343.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org" ymailto="mailto:vbox-dev@virtualbox.org"><a href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a></a><br>>> <a href="http://vbox.innotek.de/mailman/listinfo/vbox-dev" target="_blank"><a href="http://vbox.innotek.de/mailman/listinfo/vbox-dev">http://vbox.innotek.de/mailman/listinfo/vbox-dev</a></a><br>>><br>>><br>><br>><br>><br>> --<br>><br>><br>><br>> --<br>> "The only way of discovering the
 limits of the possible is to venture<br>> a little way past them into the impossible."<br>> Sir Arthur C. Clarke<br>><br>> -----Inline Attachment Follows-----<br>><br>> _______________________________________________<br>> vbox-dev mailing list<br>> <a href="http://us.mc343.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org" ymailto="mailto:vbox-dev@virtualbox.org"><a href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a></a><br>> <a href="http://vbox.innotek.de/mailman/listinfo/vbox-dev" target="_blank"><a href="http://vbox.innotek.de/mailman/listinfo/vbox-dev">http://vbox.innotek.de/mailman/listinfo/vbox-dev</a></a><br>><br>> _______________________________________________<br>> vbox-dev mailing list<br>> <a href="http://us.mc343.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org" ymailto="mailto:vbox-dev@virtualbox.org"><a href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a></a><br>> <a href="http://vbox.innotek.de/mailman/listinfo/vbox-dev" target="_blank"><a href="http://vbox.innotek.de/mailman/listinfo/vbox-dev">http://vbox.innotek.de/mailman/listinfo/vbox-dev</a></a><br>><br>><br></div></blockquote></td></tr></tbody></table></div></blockquote></body></html>