<table cellspacing="0" cellpadding="0" border="0" ><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><jshwright@gmail.com></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 <jshwright@gmail.com><BR>Subject: Re: [vbox-dev] How to get the current running IMachine instance inside a host service?<BR>To: "Huihong Luo" <huisinro@yahoo.com><BR>Cc: vbox-dev@virtualbox.org<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">huisinro@yahoo.com</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">huisinro@yahoo.com</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">huisinro@yahoo.com</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">deathon2legs@gmail.com</A>><BR>> Cc: <A href="http://us.mc343.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org" ymailto="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</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">deathon2legs@gmail.com</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">deathon2legs@gmail.com</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">huisinro@yahoo.com</A>><BR>> Cc: <A href="http://us.mc343.mail.yahoo.com/mc/compose?to=vbox-dev@virtualbox.org" ymailto="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</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">huisinro@yahoo.com</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">vbox-dev@virtualbox.org</A><BR>>> <A href="http://vbox.innotek.de/mailman/listinfo/vbox-dev" target=_blank>http://vbox.innotek.de/mailman/listinfo/vbox-dev</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">vbox-dev@virtualbox.org</A><BR>> <A href="http://vbox.innotek.de/mailman/listinfo/vbox-dev" target=_blank>http://vbox.innotek.de/mailman/listinfo/vbox-dev</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">vbox-dev@virtualbox.org</A><BR>> <A href="http://vbox.innotek.de/mailman/listinfo/vbox-dev"
 target=_blank>http://vbox.innotek.de/mailman/listinfo/vbox-dev</A><BR>><BR>><BR></DIV></BLOCKQUOTE></td></tr></table>