Index: /trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp	(revision 31015)
+++ /trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp	(revision 31016)
@@ -824,5 +824,6 @@
 
         // open a session
-        CHECK_ERROR_BREAK(m, LockForSession(session, false /* fPermitShared */, NULL));
+        SessionType_T st;
+        CHECK_ERROR_BREAK(m, LockForSession(session, false /* fPermitShared */, &st));
         fSessionOpened = true;
 
Index: /trunk/src/VBox/Frontends/VBoxHeadless/testcase/tstHeadless.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxHeadless/testcase/tstHeadless.cpp	(revision 31015)
+++ /trunk/src/VBox/Frontends/VBoxHeadless/testcase/tstHeadless.cpp	(revision 31016)
@@ -150,5 +150,6 @@
         {
             RTPrintf ("Opening an existing session...\n");
-            CHECK_ERROR_BREAK(m, LockForSession(session, true /* fPermitShared */, NULL));
+            SessionType_T st;
+            CHECK_ERROR_BREAK(m, LockForSession(session, true /* fPermitShared */, &st));
 
             ComPtr <IConsole> console;
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp	(revision 31015)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp	(revision 31016)
@@ -1864,5 +1864,6 @@
         CHECK_ERROR_RET(aVirtualBox, FindMachine(Bstr(argv[0]), ptrMachine.asOutParam()), 1);
 
-    CHECK_ERROR_RET(ptrMachine, LockForSession(aSession, true /* fPermitShared */, NULL), 1);
+    SessionType_T st;
+    CHECK_ERROR_RET(ptrMachine, LockForSession(aSession, true /* fPermitShared */, &st), 1);
 
     /*
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp	(revision 31015)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp	(revision 31016)
@@ -88,5 +88,6 @@
 
     /* open a session for the VM */
-    CHECK_ERROR_RET(machine, LockForSession(a->session, true /* fPermitShared */, NULL), 1);
+    SessionType_T st;
+    CHECK_ERROR_RET(machine, LockForSession(a->session, true /* fPermitShared */, &st), 1);
 
     do
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp	(revision 31015)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestCtrl.cpp	(revision 31016)
@@ -286,5 +286,6 @@
         {
             /* open an existing session for VM */
-            CHECK_ERROR_BREAK(machine, LockForSession(a->session, true /* fPermitShared */, NULL));
+            SessionType_T st;
+            CHECK_ERROR_BREAK(machine, LockForSession(a->session, true /* fPermitShared */, &st));
             // @todo r=dj assert that it's an existing session
 
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp	(revision 31015)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp	(revision 31016)
@@ -88,5 +88,6 @@
     {
         /* open a session for the VM - new or existing */
-        CHECK_ERROR_RET(machine, LockForSession(a->session, true /* fPermitShared */, NULL), 1);
+        SessionType_T st;
+        CHECK_ERROR_RET(machine, LockForSession(a->session, true /* fPermitShared */, &st), 1);
 
         /* get the mutable session machine */
@@ -153,5 +154,6 @@
     {
         /* open a session for the VM - new or existing */
-        CHECK_ERROR_RET(machine, LockForSession(a->session, true /* fPermitShared */, NULL), 1);
+        SessionType_T st;
+        CHECK_ERROR_RET(machine, LockForSession(a->session, true /* fPermitShared */, &st), 1);
 
         /* get the mutable session machine */
@@ -213,5 +215,6 @@
     {
         /* open a session for the VM - new or existing */
-        CHECK_ERROR_RET(machine, LockForSession(a->session, true /* fPermitShared */, NULL), 1);
+        SessionType_T st;
+        CHECK_ERROR_RET(machine, LockForSession(a->session, true /* fPermitShared */, &st), 1);
 
         /* get the mutable session machine */
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp	(revision 31015)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp	(revision 31016)
@@ -2135,5 +2135,6 @@
 
         /* open an existing session for the VM */
-        rc = machine->LockForSession(a->session, true /* fPermitShared */, NULL);
+        SessionType_T st;
+        rc = machine->LockForSession(a->session, true /* fPermitShared */, &st);
         if (SUCCEEDED(rc))
             /* get the session machine */
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp	(revision 31015)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageMisc.cpp	(revision 31016)
@@ -418,5 +418,6 @@
         {
             /* we have to open a session for this task */
-            CHECK_ERROR_BREAK(machine, LockForSession(a->session, false /* fPermitShared */, NULL));
+            SessionType_T st;
+            CHECK_ERROR_BREAK(machine, LockForSession(a->session, false /* fPermitShared */, &st));
             do
             {
@@ -452,5 +453,6 @@
         {
             /* we have to open a session for this task */
-            CHECK_ERROR_BREAK(machine, LockForSession(a->session, false /* fPermitShared */, NULL));
+            SessionType_T st;
+            CHECK_ERROR_BREAK(machine, LockForSession(a->session, false /* fPermitShared */, &st));
             do
             {
@@ -726,5 +728,6 @@
 
             /* open an existing session for the VM */
-            CHECK_ERROR_RET(machine, LockForSession(a->session, true /* fPermitShared */, NULL), 1);
+            SessionType_T st;
+            CHECK_ERROR_RET(machine, LockForSession(a->session, true /* fPermitShared */, &st), 1);
             /* get the session machine */
             CHECK_ERROR_RET(a->session, COMGETTER(Machine)(machine.asOutParam()), 1);
@@ -740,5 +743,6 @@
         {
             /* open a session for the VM */
-            CHECK_ERROR_RET(machine, LockForSession(a->session, false /* fPermitShared */, NULL), 1);
+            SessionType_T st;
+            CHECK_ERROR_RET(machine, LockForSession(a->session, false /* fPermitShared */, &st), 1);
 
             /* get the mutable session machine */
@@ -790,5 +794,6 @@
 
             /* open an existing session for the VM */
-            CHECK_ERROR_RET(machine, LockForSession(a->session, true /* fPermitShared */, NULL), 1);
+            SessionType_T st;
+            CHECK_ERROR_RET(machine, LockForSession(a->session, true /* fPermitShared */, &st), 1);
             /* get the session machine */
             CHECK_ERROR_RET(a->session, COMGETTER(Machine)(machine.asOutParam()), 1);
@@ -804,5 +809,6 @@
         {
             /* open a session for the VM */
-            CHECK_ERROR_RET(machine, LockForSession(a->session, false /* fPermitShared */, NULL), 1);
+            SessionType_T st;
+            CHECK_ERROR_RET(machine, LockForSession(a->session, false /* fPermitShared */, &st), 1);
 
             /* get the mutable session machine */
@@ -874,5 +880,6 @@
 
     /* open an existing session for the VM. */
-    CHECK_ERROR(machine, LockForSession(a->session, true /* fPermitShared */, NULL));
+    SessionType_T st;
+    CHECK_ERROR(machine, LockForSession(a->session, true /* fPermitShared */, &st));
     if (SUCCEEDED(rc))
     {
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp	(revision 31015)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp	(revision 31016)
@@ -312,5 +312,6 @@
 
     /* open a session for the VM */
-    CHECK_ERROR_RET(machine, LockForSession(a->session, false /* fPermitShared */, NULL), 1);
+    SessionType_T st;
+    CHECK_ERROR_RET(machine, LockForSession(a->session, false /* fPermitShared */, &st), 1);
 
     /* get the mutable session machine */
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageSnapshot.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageSnapshot.cpp	(revision 31015)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageSnapshot.cpp	(revision 31016)
@@ -240,5 +240,6 @@
     {
         /* we have to open a session for this task (new or shared) */
-        rc = pMachine->LockForSession(a->session, true /* fPermitShared */, NULL);
+        SessionType_T st;
+        rc = pMachine->LockForSession(a->session, true /* fPermitShared */, &st);
         ComPtr<IConsole> console;
         CHECK_ERROR_BREAK(a->session, COMGETTER(Console)(console.asOutParam()));
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp	(revision 31015)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageStorageController.cpp	(revision 31016)
@@ -755,5 +755,6 @@
 
     /* open a session for the VM */
-    CHECK_ERROR_RET(machine, LockForSession(a->session, false /* fPermitShared */, NULL), 1);
+    SessionType_T st;
+    CHECK_ERROR_RET(machine, LockForSession(a->session, false /* fPermitShared */, &st), 1);
 
     /* get the mutable session machine */
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp	(revision 31015)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageUSB.cpp	(revision 31016)
@@ -417,5 +417,6 @@
     {
         /* open a session for the VM */
-        CHECK_ERROR_RET(cmd.mMachine, LockForSession(a->session, false /* fPermitShared */, NULL), 1);
+        SessionType_T st;
+        CHECK_ERROR_RET(cmd.mMachine, LockForSession(a->session, false /* fPermitShared */, &st), 1);
         /* get the mutable session machine */
         a->session->COMGETTER(Machine)(cmd.mMachine.asOutParam());
Index: /trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp	(revision 31015)
+++ /trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp	(revision 31016)
@@ -1365,5 +1365,6 @@
     AssertReleaseRC(vrc);
 
-    rc = pMachine->LockForSession(session, false /* fPermitShared */, NULL);
+    SessionType_T st;
+    rc = pMachine->LockForSession(session, false /* fPermitShared */, &st);
     if (FAILED(rc))
     {
