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. I couldn't find any method to do this simple thing: where am I?
--- On Fri, 5/8/09, Josh Wright <jshwri...@gmail.com> wrote: From: Josh Wright <jshwri...@gmail.com> Subject: Re: [vbox-dev] How to get the current running IMachine instance inside a host service? To: "Huihong Luo" <huisi...@yahoo.com> Cc: vbox-dev@virtualbox.org Date: Friday, May 8, 2009, 3:03 PM What do you mean by "the" running VMs? IVirtualBox::machines[] will give you a list of all the existing VMs, you can then look at IMachine::state to see if they're running or not. ~JW On Fri, May 8, 2009 at 12:38 PM, Huihong Luo <huisi...@yahoo.com> wrote: > some clarification: Host service, I mean something like the > VBoxSharedFolders or VBoxSharedClipboard service dll > > --- On Fri, 5/8/09, Huihong Luo <huisi...@yahoo.com> wrote: > > From: Huihong Luo <huisi...@yahoo.com> > Subject: Re: [vbox-dev] How to get the current running IMachine instance > inside a host service? > To: "Armindo Silva" <deathon2l...@gmail.com> > Cc: vbox-dev@virtualbox.org > Date: Friday, May 8, 2009, 7:08 AM > > Thanks. Yes, we can get that info from command line, on linux or windows. > > I was wondering if there are better ways? for instance, the COM. If not, > perhaps add a method to IVirtualBox, or pass some info to the host services > on loading time. > > --- On Fri, 5/8/09, Armindo Silva <deathon2l...@gmail.com> wrote: > > From: Armindo Silva <deathon2l...@gmail.com> > Subject: Re: [vbox-dev] How to get the current running IMachine instance > inside a host service? > To: "Huihong Luo" <huisi...@yahoo.com> > Cc: vbox-dev@virtualbox.org > Date: Friday, May 8, 2009, 6:27 AM > > On linux hosts: > > $ ps aux | grep -i virtual > mndo 18797 0.0 0.0 5600 1808 ? S 13:02 0:00 > /usr/lib/virtualbox/VBoxXPCOMIPCD > mndo 19614 0.0 0.0 3336 884 pts/5 S+ 14:24 0:00 grep -i > virtual > mndo 21477 0.0 0.2 13828 4256 ? Sl 13:03 0:01 > /usr/lib/virtualbox/VBoxSVC --automate > mndo 21485 20.2 24.4 631264 503028 ? Sl 13:03 16:26 > /usr/lib/virtualbox/VirtualBox --comment WinXP --startvm > 849a196c-2b64-4235-97ea-1a6722c79d96 > > The last line have the name and the uuid. > Don't have a windows host :| > > Hope this helps. > > Cheers > > Armindo > > > On Thu, May 7, 2009 at 6:21 PM, Huihong Luo <huisi...@yahoo.com> wrote: >> I am developping a shared service between host and guest. On host service >> dll, I need to get some info about the current running vm. What is the >> correct way of doing this? I couldn't figure out how to get the vm name or >> vm uuid. >> >> Thanks, >> >> Huihong >> >> >> _______________________________________________ >> vbox-dev mailing list >> vbox-dev@virtualbox.org >> http://vbox.innotek.de/mailman/listinfo/vbox-dev >> >> > > > > -- > > > > -- > "The only way of discovering the limits of the possible is to venture > a little way past them into the impossible." > Sir Arthur C. Clarke > > -----Inline Attachment Follows----- > > _______________________________________________ > vbox-dev mailing list > vbox-dev@virtualbox.org > http://vbox.innotek.de/mailman/listinfo/vbox-dev > > _______________________________________________ > vbox-dev mailing list > vbox-dev@virtualbox.org > http://vbox.innotek.de/mailman/listinfo/vbox-dev > >
_______________________________________________ vbox-dev mailing list vbox-dev@virtualbox.org http://vbox.innotek.de/mailman/listinfo/vbox-dev