Index: /trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.cpp	(revision 51669)
+++ /trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.cpp	(revision 51670)
@@ -577,5 +577,5 @@
 }
 
-STDMETHODIMP VBoxSDLFB::Notify3DEvent(ULONG uType, BYTE *pReserved)
+STDMETHODIMP VBoxSDLFB::Notify3DEvent(ULONG uType, ComSafeArrayIn(BYTE, aData))
 {
     return E_NOTIMPL;
Index: /trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.h
===================================================================
--- /trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.h	(revision 51669)
+++ /trunk/src/VBox/Frontends/VBoxSDL/Framebuffer.h	(revision 51670)
@@ -96,5 +96,5 @@
     STDMETHOD(ProcessVHWACommand)(BYTE *pCommand);
 
-    STDMETHOD(Notify3DEvent)(ULONG uType, BYTE *pReserved);
+    STDMETHOD(Notify3DEvent)(ULONG uType, ComSafeArrayIn(BYTE, aData));
 
     // internal public methods
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp	(revision 51669)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp	(revision 51670)
@@ -409,5 +409,5 @@
 }
 
-STDMETHODIMP UIFrameBuffer::Notify3DEvent(ULONG uType, BYTE *pData)
+STDMETHODIMP UIFrameBuffer::Notify3DEvent(ULONG uType, ComSafeArrayIn(BYTE, aData))
 {
     /* Lock access to frame-buffer: */
@@ -426,4 +426,5 @@
     }
 
+    com::SafeArray<BYTE> data(ComSafeArrayInArg(aData));
     switch (uType)
     {
@@ -432,5 +433,5 @@
             /* Notify machine-view with the async-signal
              * about 3D overlay visibility change: */
-            BOOL fVisible = !!pData;
+            BOOL fVisible = data[0];
             LogRel2(("UIFrameBuffer::Notify3DEvent: Sending to async-handler: "
                      "(VBOX3D_NOTIFY_EVENT_TYPE_VISIBLE_3DDATA = %s)\n",
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h	(revision 51669)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h	(revision 51670)
@@ -152,8 +152,8 @@
     /** EMT callback: Notifies frame-buffer about 3D backend event.
       * @param        uType Event type. Currently only VBOX3D_NOTIFY_EVENT_TYPE_VISIBLE_3DDATA is supported.
-      * @param        pData Event-specific data, depends on the supplied event type.
-      * @note         Any EMT callback is subsequent. No any other EMT callback can be called until this one processed.
-      * @note         Calls to this and #setMarkAsUnused method are synchronized (from GUI side). */
-    STDMETHOD(Notify3DEvent)(ULONG uType, BYTE *pData);
+      * @param        aData Event-specific data, depends on the supplied event type.
+      * @note         Any EMT callback is subsequent. No any other EMT callback can be called until this one processed.
+      * @note         Calls to this and #setMarkAsUnused method are synchronized (from GUI side). */
+    STDMETHOD(Notify3DEvent)(ULONG uType, ComSafeArrayIn(BYTE, aData));
 
     /** Returns frame-buffer data address. */
Index: /trunk/src/VBox/GuestHost/OpenGL/include/cr_server.h
===================================================================
--- /trunk/src/VBox/GuestHost/OpenGL/include/cr_server.h	(revision 51669)
+++ /trunk/src/VBox/GuestHost/OpenGL/include/cr_server.h	(revision 51670)
@@ -132,5 +132,5 @@
 typedef DECLCALLBACKPTR(void, PFNCR_SERVER_RPW_DATA) (const struct CR_SERVER_RPW_ENTRY* pEntry, void *pvEntryTexData);
 
-typedef DECLCALLBACKPTR(void, PFNCRSERVERNOTIFYEVENT) (int32_t screenId, uint32_t uEvent, void*pvData);
+typedef DECLCALLBACKPTR(void, PFNCRSERVERNOTIFYEVENT) (int32_t screenId, uint32_t uEvent, void* pvData, uint32_t cbData);
 
 typedef struct CR_SERVER_RPW_ENTRY
Index: /trunk/src/VBox/HostServices/SharedOpenGL/crserver/crservice.cpp
===================================================================
--- /trunk/src/VBox/HostServices/SharedOpenGL/crserver/crservice.cpp	(revision 51669)
+++ /trunk/src/VBox/HostServices/SharedOpenGL/crserver/crservice.cpp	(revision 51670)
@@ -32,4 +32,5 @@
 #include <VBox/hgcmsvc.h>
 #include <VBox/log.h>
+#include <VBox/com/array.h>
 #include <VBox/com/ErrorInfo.h>
 #include <VBox/com/VirtualBox.h>
@@ -227,5 +228,5 @@
 }
 
-static DECLCALLBACK(void) svcNotifyEventCB(int32_t screenId, uint32_t uEvent, void*pvData)
+static DECLCALLBACK(void) svcNotifyEventCB(int32_t screenId, uint32_t uEvent, void* pvData, uint32_t cbData)
 {
     ComPtr<IDisplay> pDisplay;
@@ -245,5 +246,9 @@
         return;
 
-    pFramebuffer->Notify3DEvent(uEvent, (BYTE*)pvData);
+    com::SafeArray<BYTE> data(cbData);
+    if (cbData)
+        memcpy(data.raw(), pvData, cbData);
+
+    pFramebuffer->Notify3DEvent(uEvent, ComSafeArrayAsInParam(data));
 }
 
@@ -1231,5 +1236,6 @@
                     do {
                         /* determine if the framebuffer is functional */
-                        rc = pFramebuffer->Notify3DEvent(VBOX3D_NOTIFY_EVENT_TYPE_TEST_FUNCTIONAL, NULL);
+                        com::SafeArray<BYTE> data;
+                        rc = pFramebuffer->Notify3DEvent(VBOX3D_NOTIFY_EVENT_TYPE_TEST_FUNCTIONAL, ComSafeArrayAsInParam(data));
 
                         if (rc == S_OK)
Index: /trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server.h
===================================================================
--- /trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server.h	(revision 51669)
+++ /trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server.h	(revision 51670)
@@ -141,5 +141,5 @@
 void crVBoxServerMuralFbResizeEnd(HCR_FRAMEBUFFER hFb);
 
-void crVBoxServerNotifyEvent(int32_t idScreen, uint32_t uEvent, void*pvData);
+void crVBoxServerNotifyEvent(int32_t idScreen, uint32_t uEvent, void* pvData, uint32_t cbData);
 
 void crServerRedirMuralFbClear(CRMuralInfo *mural);
Index: /trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.c
===================================================================
--- /trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.c	(revision 51669)
+++ /trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.c	(revision 51670)
@@ -2784,5 +2784,5 @@
 }
 
-void crVBoxServerNotifyEvent(int32_t idScreen, uint32_t uEvent, void*pvData)
+void crVBoxServerNotifyEvent(int32_t idScreen, uint32_t uEvent, void* pvData, uint32_t cbData)
 {
     /* this is something unexpected, but just in case */
@@ -2793,5 +2793,5 @@
     }
 
-    cr_server.pfnNotifyEventCB(idScreen, uEvent, pvData);
+    cr_server.pfnNotifyEventCB(idScreen, uEvent, pvData, cbData);
 }
 
Index: /trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_presenter.cpp
===================================================================
--- /trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_presenter.cpp	(revision 51669)
+++ /trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_presenter.cpp	(revision 51670)
@@ -2900,5 +2900,5 @@
         if (mFlags.fNeVisible != fVisible || mFlags.fNeForce)
         {
-            crVBoxServerNotifyEvent(mu32Screen, VBOX3D_NOTIFY_EVENT_TYPE_VISIBLE_3DDATA, fVisible ? (void*)1 : NULL);
+            crVBoxServerNotifyEvent(mu32Screen, VBOX3D_NOTIFY_EVENT_TYPE_VISIBLE_3DDATA, &fVisible, sizeof(fVisible));
             mFlags.fNeVisible = fVisible;
             mFlags.fNeForce = 0;
Index: /trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 51669)
+++ /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 51670)
@@ -15273,5 +15273,5 @@
   <interface
     name="IFramebuffer" extends="$unknown"
-    uuid="c42d2714-6263-473f-a6c4-3d3b38983e74"
+    uuid="16d73cd3-da84-4a11-a607-ebab57d050d0"
     wsmap="managed"
     >
@@ -15344,5 +15344,5 @@
     </attribute>
 
-    <method name="notifyUpdate" wsmap="suppress">
+    <method name="notifyUpdate">
       <desc>
         Informs about an update.
@@ -15497,5 +15497,5 @@
         <desc>event type. Currently only VBOX3D_NOTIFY_EVENT_TYPE_VISIBLE_3DDATA is supported.</desc>
       </param>
-      <param name="data" type="octet" mod="ptr" dir="in">
+      <param name="data" type="octet" dir="in" safearray="yes">
         <desc>event-specific data, depends on the supplied event type</desc>
       </param>
