Re: [vbox-dev] How to get the current running IMachine instance inside a host service?

2009-05-12 Thread Michael Thayer
Hello Huihong,

Huihong Luo wrote:
 You are correct. For clipboard and shared file module, we don't need the vm 
 name.
  
 We are also developing another addition, that will add shortcuts to the host 
 start menu, so vm apps can be launched directly from host. In order to do 
 this, we need the vm name to add to host shortcuts so it can correlate the 
 correct vm. VM could be offline, and the shortcuts are stored on host disk, 
 so when a user click a link, it will launch the vm, then the app inside vm.
  
 When an app is installed in a vm, our addin will inform the host to create 
 the shortcuts. The shortcut will embed a vm name.
If you are interested, we should be able to co-ordinate adding your code
to VirtualBox.

Regards,

Michael
-- 
Sun Microsystems GmbHMichael Thayer
Werkstrasse 24   VirtualBox engineer
71384 Weinstadt, Germany mailto:michael.tha...@sun.com

Sitz der Gesellschaft:
Sun Microsystems GmbH, Sonnenallee 1, 85551 Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB 161028
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel
Vorsitzender des Aufsichtsrates: Martin Haering

___
vbox-dev mailing list
vbox-dev@virtualbox.org
http://vbox.innotek.de/mailman/listinfo/vbox-dev


Re: [vbox-dev] How to get the current running IMachine instance inside a host service?

2009-05-12 Thread Huihong Luo
Michael,
 
Sure, that will be nice. Once it's stable, I will let you know. We are trying 
to add Drag and Drop right now on windows guest/host. 
 
By the way, I read your emails about DnD. I found the most difficult thing is 
how to initiate a drag source inside guest. We are still experiment, if you 
have ideas, pls inform. Basically, the gui accepts drops, then send a request 
to guest. and a guest surrogate will act as the drag source object. This is 
what gets difficult. How to code a virtual drag source?
 
We are implementing this cool feature, when a shortcut is dragged out to host 
OS, a new one will be created on host that can launches a vm app.
 
The only thing different is that we are using our own shared folder driver 
inside guest, but should be pretty similar, and easy to add to the main 
virtualbox code.
 
- huihong

--- On Tue, 5/12/09, Michael Thayer michael.tha...@sun.com wrote:


From: Michael Thayer michael.tha...@sun.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: Tuesday, May 12, 2009, 5:40 AM


Hello Huihong,

Huihong Luo wrote:
 You are correct. For clipboard and shared file module, we don't need the vm 
 name.
  
 We are also developing another addition, that will add shortcuts to the host 
 start menu, so vm apps can be launched directly from host. In order to do 
 this, we need the vm name to add to host shortcuts so it can correlate the 
 correct vm. VM could be offline, and the shortcuts are stored on host disk, 
 so when a user click a link, it will launch the vm, then the app inside vm.
  
 When an app is installed in a vm, our addin will inform the host to create 
 the shortcuts. The shortcut will embed a vm name.
If you are interested, we should be able to co-ordinate adding your code
to VirtualBox.

Regards,

Michael
-- 
Sun Microsystems GmbH        Michael Thayer
Werkstrasse 24               VirtualBox engineer
71384 Weinstadt, Germany     mailto:michael.tha...@sun.com

Sitz der Gesellschaft:
Sun Microsystems GmbH, Sonnenallee 1, 85551 Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB 161028
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel
Vorsitzender des Aufsichtsrates: Martin Haering
___
vbox-dev mailing list
vbox-dev@virtualbox.org
http://vbox.innotek.de/mailman/listinfo/vbox-dev


Re: [vbox-dev] How to get the current running IMachine instance inside a host service?

2009-05-11 Thread Michael Thayer
Hello Huihong,

Huihong Luo wrote:
 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?
HGCM services have no built-in mechanism for getting information about
the VM they are running in and such-like.  This is because they were
originally designed to work in things like VBoxBFE, which is a
simplified frontend where the normal VirtualBox APIs are not available.
 What you can do instead is to use the HGCM host call functionality to
pass any needed information into the service when it is started.  To see
examples of this, grep for HostCall in src/VBox/Main/ConsoleImpl[2].cpp.

If you need to get information or send notifications or whatever while
the service is running, you can also register callbacks (host service
extensions) with the service.  For an example of this, grep for
ServiceExtension in ConsoleImpl2.cpp.

BTW, I haven't forgotten the VbglR3GuestPropWait() issue you mentioned,
but I haven't got round to looking at it yet.  Sorry!

Regards,

Michael
-- 
Sun Microsystems GmbHMichael Thayer
Werkstrasse 24   VirtualBox engineer
71384 Weinstadt, Germany mailto:michael.tha...@sun.com

Sitz der Gesellschaft:
Sun Microsystems GmbH, Sonnenallee 1, 85551 Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB 161028
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel
Vorsitzender des Aufsichtsrates: Martin Haering

___
vbox-dev mailing list
vbox-dev@virtualbox.org
http://vbox.innotek.de/mailman/listinfo/vbox-dev


Re: [vbox-dev] How to get the current running IMachine instance inside a host service?

2009-05-11 Thread Huihong Luo
Michael,
 
Thanks. This is the info I needed.
 
I was trying not to modify the main line code. If there is no better way, I 
guess need to modify the host call to pass the vm info I needed.
 
By the way, we have added copy/paste of files between guest and host, so a user 
can do Control-C/Control-V for file copying, etc. To do this, we added CF_HDROP 
format support to the shared clipboard. We used our own shared folder 
additions. if you would like to add this support to the main line of code, pls 
let me know. (we only did it on windows guest and host).
 
We may add drag-drop support on windows later on
 
Huihong

--- On Mon, 5/11/09, Michael Thayer michael.tha...@sun.com wrote:


From: Michael Thayer michael.tha...@sun.com
Subject: Re: [vbox-dev] How to get the current running IMachine instance inside 
a host service?
To: Huihong Luo huisi...@yahoo.com
Cc: Josh Wright jshwri...@gmail.com, vbox-dev@virtualbox.org
Date: Monday, May 11, 2009, 2:10 AM


Hello Huihong,

Huihong Luo wrote:
 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?
HGCM services have no built-in mechanism for getting information about
the VM they are running in and such-like.  This is because they were
originally designed to work in things like VBoxBFE, which is a
simplified frontend where the normal VirtualBox APIs are not available.
What you can do instead is to use the HGCM host call functionality to
pass any needed information into the service when it is started.  To see
examples of this, grep for HostCall in src/VBox/Main/ConsoleImpl[2].cpp.

If you need to get information or send notifications or whatever while
the service is running, you can also register callbacks (host service
extensions) with the service.  For an example of this, grep for
ServiceExtension in ConsoleImpl2.cpp.

BTW, I haven't forgotten the VbglR3GuestPropWait() issue you mentioned,
but I haven't got round to looking at it yet.  Sorry!

Regards,

Michael
-- 
Sun Microsystems GmbH        Michael Thayer
Werkstrasse 24               VirtualBox engineer
71384 Weinstadt, Germany     mailto:michael.tha...@sun.com

Sitz der Gesellschaft:
Sun Microsystems GmbH, Sonnenallee 1, 85551 Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB 161028
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel
Vorsitzender des Aufsichtsrates: Martin Haering
___
vbox-dev mailing list
vbox-dev@virtualbox.org
http://vbox.innotek.de/mailman/listinfo/vbox-dev


Re: [vbox-dev] How to get the current running IMachine instance inside a host service?

2009-05-11 Thread Michael Thayer
Hello Huilong,

Huihong Luo wrote:
 Thanks. This is the info I needed.
  
 I was trying not to modify the main line code. If there is no better way, I 
 guess need to modify the host call to pass the vm info I needed.
  
 By the way, we have added copy/paste of files between guest and host, so a 
 user can do Control-C/Control-V for file copying, etc. To do this, we added 
 CF_HDROP format support to the shared clipboard. We used our own shared 
 folder additions. if you would like to add this support to the main line of 
 code, pls let me know. (we only did it on windows guest and host).
  
 We may add drag-drop support on windows later on
I take it from the above that you are rebuilding the clipboard service
and additions module.  If this is correct and you can give me a hint as
to why you need to know the VM name, perhaps we can think of a way
around this without modifying the main VBox code.

Regards,

Michael
--
Sun Microsystems GmbHMichael Thayer
Werkstrasse 24   VirtualBox engineer
71384 Weinstadt, Germany mailto:michael.tha...@sun.com

Sitz der Gesellschaft:
Sun Microsystems GmbH, Sonnenallee 1, 85551 Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB 161028
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel
Vorsitzender des Aufsichtsrates: Martin Haering

___
vbox-dev mailing list
vbox-dev@virtualbox.org
http://vbox.innotek.de/mailman/listinfo/vbox-dev


Re: [vbox-dev] How to get the current running IMachine instance inside a host service?

2009-05-11 Thread Huihong Luo
Micheal,
 
You are correct. For clipboard and shared file module, we don't need the vm 
name.
 
We are also developing another addition, that will add shortcuts to the host 
start menu, so vm apps can be launched directly from host. In order to do this, 
we need the vm name to add to host shortcuts so it can correlate the correct 
vm. VM could be offline, and the shortcuts are stored on host disk, so when a 
user click a link, it will launch the vm, then the app inside vm.
 
When an app is installed in a vm, our addin will inform the host to create the 
shortcuts. The shortcut will embed a vm name.
 
Huihong

--- On Mon, 5/11/09, Michael Thayer michael.tha...@sun.com wrote:


From: Michael Thayer michael.tha...@sun.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: Monday, May 11, 2009, 9:27 AM


Hello Huilong,

Huihong Luo wrote:
 Thanks. This is the info I needed.
  
 I was trying not to modify the main line code. If there is no better way, I 
 guess need to modify the host call to pass the vm info I needed.
  
 By the way, we have added copy/paste of files between guest and host, so a 
 user can do Control-C/Control-V for file copying, etc. To do this, we added 
 CF_HDROP format support to the shared clipboard. We used our own shared 
 folder additions. if you would like to add this support to the main line of 
 code, pls let me know. (we only did it on windows guest and host).
  
 We may add drag-drop support on windows later on
I take it from the above that you are rebuilding the clipboard service
and additions module.  If this is correct and you can give me a hint as
to why you need to know the VM name, perhaps we can think of a way
around this without modifying the main VBox code.

Regards,

Michael
--
Sun Microsystems GmbH        Michael Thayer
Werkstrasse 24               VirtualBox engineer
71384 Weinstadt, Germany     mailto:michael.tha...@sun.com

Sitz der Gesellschaft:
Sun Microsystems GmbH, Sonnenallee 1, 85551 Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB 161028
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel
Vorsitzender des Aufsichtsrates: Martin Haering
___
vbox-dev mailing list
vbox-dev@virtualbox.org
http://vbox.innotek.de/mailman/listinfo/vbox-dev


Re: [vbox-dev] How to get the current running IMachine instance inside a host service?

2009-05-08 Thread Armindo Silva
On linux hosts:

$ ps aux | grep -i virtual
mndo 18797  0.0  0.0   5600  1808 ?S13:02   0:00
/usr/lib/virtualbox/VBoxXPCOMIPCD
mndo 19614  0.0  0.0   3336   884 pts/5S+   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

___
vbox-dev mailing list
vbox-dev@virtualbox.org
http://vbox.innotek.de/mailman/listinfo/vbox-dev


Re: [vbox-dev] How to get the current running IMachine instance inside a host service?

2009-05-08 Thread Huihong Luo
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
___
vbox-dev mailing list
vbox-dev@virtualbox.org
http://vbox.innotek.de/mailman/listinfo/vbox-dev


Re: [vbox-dev] How to get the current running IMachine instance inside a host service?

2009-05-08 Thread Josh Wright
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


Re: [vbox-dev] How to get the current running IMachine instance inside a host service?

2009-05-08 Thread Huihong Luo
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


Re: [vbox-dev] How to get the current running IMachine instance inside a host service?

2009-05-08 Thread Josh Wright
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.


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.


~JW

Sent from my iPod

On May 8, 2009, at 7:43 PM, Huihong Luo huisi...@yahoo.com wrote:

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 ?S13:02   0:00
 /usr/lib/virtualbox/VBoxXPCOMIPCD
 mndo 19614  0.0  0.0   3336   884 pts/5S+   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