VirtualBox

Ignore:
Timestamp:
Jun 19, 2014 3:12:30 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
94439
Message:

Main,Frontends: use safearray for IFramebuffer::Notify3DEvent

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/crserver/crservice.cpp

    r51524 r51670  
    3232#include <VBox/hgcmsvc.h>
    3333#include <VBox/log.h>
     34#include <VBox/com/array.h>
    3435#include <VBox/com/ErrorInfo.h>
    3536#include <VBox/com/VirtualBox.h>
     
    227228}
    228229
    229 static DECLCALLBACK(void) svcNotifyEventCB(int32_t screenId, uint32_t uEvent, void*pvData)
     230static DECLCALLBACK(void) svcNotifyEventCB(int32_t screenId, uint32_t uEvent, void* pvData, uint32_t cbData)
    230231{
    231232    ComPtr<IDisplay> pDisplay;
     
    245246        return;
    246247
    247     pFramebuffer->Notify3DEvent(uEvent, (BYTE*)pvData);
     248    com::SafeArray<BYTE> data(cbData);
     249    if (cbData)
     250        memcpy(data.raw(), pvData, cbData);
     251
     252    pFramebuffer->Notify3DEvent(uEvent, ComSafeArrayAsInParam(data));
    248253}
    249254
     
    12311236                    do {
    12321237                        /* determine if the framebuffer is functional */
    1233                         rc = pFramebuffer->Notify3DEvent(VBOX3D_NOTIFY_EVENT_TYPE_TEST_FUNCTIONAL, NULL);
     1238                        com::SafeArray<BYTE> data;
     1239                        rc = pFramebuffer->Notify3DEvent(VBOX3D_NOTIFY_EVENT_TYPE_TEST_FUNCTIONAL, ComSafeArrayAsInParam(data));
    12341240
    12351241                        if (rc == S_OK)
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette