VirtualBox

Changeset 10552 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 11, 2008 8:05:12 PM (16 years ago)
Author:
vboxsync
Message:

More IOCTLs.

Location:
trunk/src/VBox/Additions
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/OpenGL/VBoxOGL.cpp

    r10541 r10552  
    257257
    258258    if (DeviceIoControl (vboxOGLCtx.hGuestDrv,
    259                          VBOXGUEST_IOCTL_HGCM_CALL,
     259                         VBOXGUEST_IOCTL_HGCM_CALL(cbData),
    260260                         pvData, cbData,
    261261                         pvData, cbData,
  • trunk/src/VBox/Additions/WINNT/VBoxControl/VBoxControl.cpp

    r10541 r10552  
    883883
    884884    if (DeviceIoControl (hDevice,
    885                          VBOXGUEST_IOCTL_HGCM_CALL,
     885                         VBOXGUEST_IOCTL_HGCM_CALL(cbMsg),
    886886                         pMsg, cbMsg,
    887887                         pMsg, cbMsg,
  • trunk/src/VBox/Additions/WINNT/VBoxGINA/Helper.cpp

    r10541 r10552  
    6868    vmmreqCredentials.u32Flags |= VMMDEV_CREDENTIALS_QUERYPRESENCE;
    6969    DWORD cbReturned;
    70     if (!DeviceIoControl(vboxDriver, VBOXGUEST_IOCTL_VMMREQUEST, &vmmreqCredentials, sizeof(vmmreqCredentials),
     70    if (!DeviceIoControl(vboxDriver, VBOXGUEST_IOCTL_VMMREQUEST(sizeof(vmmreqCredentials)), &vmmreqCredentials, sizeof(vmmreqCredentials),
    7171                         &vmmreqCredentials, sizeof(vmmreqCredentials), &cbReturned, NULL))
    7272    {
     
    9696    vmmreqCredentials.u32Flags |= VMMDEV_CREDENTIALS_CLEAR;
    9797    DWORD cbReturned;
    98     if (!DeviceIoControl(vboxDriver, VBOXGUEST_IOCTL_VMMREQUEST, &vmmreqCredentials, sizeof(vmmreqCredentials),
     98    if (!DeviceIoControl(vboxDriver, VBOXGUEST_IOCTL_VMMREQUEST(sizeof(vmmreqCredentials)), &vmmreqCredentials, sizeof(vmmreqCredentials),
    9999                         &vmmreqCredentials, sizeof(vmmreqCredentials), &cbReturned, NULL))
    100100    {
  • trunk/src/VBox/Additions/WINNT/VBoxGuest/VBoxGuest.cpp

    r10541 r10552  
    797797        }
    798798
    799         case VBOXGUEST_IOCTL_VMMREQUEST:
     799        case VBOXGUEST_IOCTL_VMMREQUEST(sizeof(VMMDevRequestHeader)):
    800800        {
    801801            dprintf(("VBoxGuest::VBoxGuestDeviceControl: VBOXGUEST_IOCTL_VMMREQUEST\n"));
     
    972972        } break;
    973973
    974         case VBOXGUEST_IOCTL_HGCM_CALL:
     974        case VBOXGUEST_IOCTL_HGCM_CALL(sizeof(VBoxGuestHGCMCallInfo)):
    975975        {
    976976            dprintf(("VBoxGuest::VBoxGuestDeviceControl: VBOXGUEST_IOCTL_HGCM_CALL\n"));
  • trunk/src/VBox/Additions/WINNT/VBoxHook/VBoxHook.cpp

    r10541 r10552  
    135135{
    136136    DWORD cbReturned;
    137     DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_VMMREQUEST, pReq, pReq->size,
     137    DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_VMMREQUEST(pReq->size), pReq, pReq->size,
    138138                    pReq, pReq->size, &cbReturned, NULL);
    139139    return VINF_SUCCESS;
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxClipboard.cpp

    r10541 r10552  
    162162
    163163    if (DeviceIoControl (hDriver,
    164                          VBOXGUEST_IOCTL_HGCM_CALL,
     164                         VBOXGUEST_IOCTL_HGCM_CALL(cbData),
    165165                         pvData, cbData,
    166166                         pvData, cbData,
     
    815815
    816816        if (!DeviceIoControl (hDriver,
    817                               VBOXGUEST_IOCTL_HGCM_CALL,
     817                              VBOXGUEST_IOCTL_HGCM_CALL(sizeof (parms)),
    818818                              &parms, sizeof (parms),
    819819                              &parms, sizeof (parms),
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDisplay.cpp

    r10541 r10552  
    409409                    displayChangeRequest.header.requestType = VMMDevReq_GetDisplayChangeRequest2;
    410410                    displayChangeRequest.eventAck           = VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST;
    411                     BOOL fDisplayChangeQueried = DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_VMMREQUEST, &displayChangeRequest, sizeof(VMMDevDisplayChangeRequest2),
     411                    BOOL fDisplayChangeQueried = DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_VMMREQUEST(sizeof(VMMDevDisplayChangeRequest2)), &displayChangeRequest, sizeof(VMMDevDisplayChangeRequest2),
    412412                                                                 &displayChangeRequest, sizeof(VMMDevDisplayChangeRequest2), &cbReturned, NULL);
    413413                    if (!fDisplayChangeQueried)
     
    418418                        displayChangeRequest.header.requestType = VMMDevReq_GetDisplayChangeRequest;
    419419                        displayChangeRequest.eventAck           = VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST;
    420                         fDisplayChangeQueried = DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_VMMREQUEST, &displayChangeRequest, sizeof(VMMDevDisplayChangeRequest),
     420                        fDisplayChangeQueried = DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_VMMREQUEST(sizeof(VMMDevDisplayChangeRequest)), &displayChangeRequest, sizeof(VMMDevDisplayChangeRequest),
    421421                                                                 &displayChangeRequest, sizeof(VMMDevDisplayChangeRequest), &cbReturned, NULL);
    422422                        displayChangeRequest.display = 0;
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxSeamless.cpp

    r10541 r10552  
    8585
    8686        DWORD cbReturned;
    87         if (!DeviceIoControl(pEnv->hDriver, VBOXGUEST_IOCTL_VMMREQUEST, &vmmreqGuestCaps, sizeof(vmmreqGuestCaps),
     87        if (!DeviceIoControl(pEnv->hDriver, VBOXGUEST_IOCTL_VMMREQUEST(sizeof(vmmreqGuestCaps)), &vmmreqGuestCaps, sizeof(vmmreqGuestCaps),
    8888                             &vmmreqGuestCaps, sizeof(vmmreqGuestCaps), &cbReturned, NULL))
    8989        {
     
    115115
    116116    DWORD cbReturned;
    117     if (!DeviceIoControl(pEnv->hDriver, VBOXGUEST_IOCTL_VMMREQUEST, &vmmreqGuestCaps, sizeof(vmmreqGuestCaps),
     117    if (!DeviceIoControl(pEnv->hDriver, VBOXGUEST_IOCTL_VMMREQUEST(sizeof(vmmreqGuestCaps)), &vmmreqGuestCaps, sizeof(vmmreqGuestCaps),
    118118                         &vmmreqGuestCaps, sizeof(vmmreqGuestCaps), &cbReturned, NULL))
    119119    {
     
    337337                    seamlessChangeRequest.eventAck = VMMDEV_EVENT_SEAMLESS_MODE_CHANGE_REQUEST;
    338338
    339                     BOOL fSeamlessChangeQueried = DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_VMMREQUEST, &seamlessChangeRequest, sizeof(seamlessChangeRequest),
     339                    BOOL fSeamlessChangeQueried = DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_VMMREQUEST(sizeof(seamlessChangeRequest)), &seamlessChangeRequest, sizeof(seamlessChangeRequest),
    340340                                                                 &seamlessChangeRequest, sizeof(seamlessChangeRequest), &cbReturned, NULL);
    341341                    if (fSeamlessChangeQueried)
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxStatistics.cpp

    r10541 r10552  
    6969    req.eventAck = 0;
    7070
    71     if (DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_VMMREQUEST, &req, req.header.size, &req, req.header.size, &cbReturned, NULL))
     71    if (DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_VMMREQUEST(req.header.size), &req, req.header.size, &req, req.header.size, &cbReturned, NULL))
    7272    {
    7373        dprintf(("VBoxStatsInit: new statistics interval %d seconds\n", req.u32StatInterval));
     
    225225        req.guestStats.u32CpuId = i;
    226226
    227         if (DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_VMMREQUEST, &req, req.header.size, &req, req.header.size, &cbReturned, NULL))
     227        if (DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_VMMREQUEST(req.header.size), &req, req.header.size, &req, req.header.size, &cbReturned, NULL))
    228228        {
    229229            dprintf(("VBoxStatsReportStatistics: new statistics reported successfully!\n"));
     
    283283                req.eventAck = VMMDEV_EVENT_STATISTICS_INTERVAL_CHANGE_REQUEST;
    284284
    285                 if (DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_VMMREQUEST, &req, req.header.size, &req, req.header.size, &cbReturned, NULL))
     285                if (DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_VMMREQUEST(req.header.size), &req, req.header.size, &req, req.header.size, &cbReturned, NULL))
    286286                {
    287287                    dprintf(("VBoxStatsThread: new statistics interval %d seconds\n", req.u32StatInterval));
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxTray.cpp

    r10541 r10552  
    8484    }
    8585
    86     DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_VMMREQUEST, pReq, pReq->header.size,
     86    DeviceIoControl(gVBoxDriver, VBOXGUEST_IOCTL_VMMREQUEST(pReq->header.size), pReq, pReq->header.size,
    8787                    pReq, pReq->header.size, &cbReturned, NULL);
    8888
  • trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxVRDP.cpp

    r10541 r10552  
    360360               
    361361                if (DeviceIoControl (gVBoxDriver,
    362                                      VBOXGUEST_IOCTL_VMMREQUEST,
     362                                     VBOXGUEST_IOCTL_VMMREQUEST(sizeof(VMMDevVRDPChangeRequest)),
    363363                                     &vrdpChangeRequest,
    364364                                     sizeof(VMMDevVRDPChangeRequest),
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp

    r10545 r10552  
    12151215     */
    12161216    int rc = VINF_SUCCESS;
    1217     if (VBOXGUEST_IOCTL_STRIP_SIZE(iFunction) == VBOXGUEST_IOCTL_STRIP_SIZE(VBOXGUEST_IOCTL_VMMREQUEST))
     1217    if (VBOXGUEST_IOCTL_STRIP_SIZE(iFunction) == VBOXGUEST_IOCTL_STRIP_SIZE(VBOXGUEST_IOCTL_VMMREQUEST(0)))
    12181218    {
    12191219        CHECKRET_MIN_SIZE("VMMREQUEST", sizeof(VMMDevRequestHeader));
     
    12241224     * This one is tricky and can be done later.
    12251225     */
    1226     else if (VBOXGUEST_IOCTL_STRIP_SIZE(iFunction) == VBOXGUEST_IOCTL_STRIP_SIZE(VBOXGUEST_IOCTL_HGCM_CALL))
     1226    else if (VBOXGUEST_IOCTL_STRIP_SIZE(iFunction) == VBOXGUEST_IOCTL_STRIP_SIZE(VBOXGUEST_IOCTL_HGCM_CALL(0)))
    12271227    {
    12281228        CHECKRET_MIN_SIZE("HGCM_CALL", sizeof(VBoxGuestHGCMCallInfo));
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibClipboard.cpp

    r10543 r10552  
    100100    VbglHGCMParmUInt32Set(&Msg.formats, 0);
    101101
    102     int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL, &Msg, sizeof(Msg));
     102    int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
    103103    if (RT_SUCCESS(rc))
    104104    {
     
    150150    VbglHGCMParmUInt32Set(&Msg.size, 0);
    151151
    152     int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL, &Msg, sizeof(Msg));
     152    int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
    153153    if (RT_SUCCESS(rc))
    154154    {
     
    188188    VbglHGCMParmUInt32Set(&Msg.formats, fFormats);
    189189
    190     int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL, &Msg, sizeof(Msg));
     190    int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
    191191    if (RT_SUCCESS(rc))
    192192        rc = Msg.hdr.result;
     
    217217    VbglHGCMParmPtrSet(&Msg.ptr, pv, cb);
    218218
    219     int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL, &Msg, sizeof(Msg));
    220     if (RT_SUCCESS(rc))
    221         rc = Msg.hdr.result;
    222     return rc;
    223 }
    224 
     219    int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
     220    if (RT_SUCCESS(rc))
     221        rc = Msg.hdr.result;
     222    return rc;
     223}
     224
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibInfoSvc.cpp

    r10543 r10552  
    103103        VbglHGCMParmPtrSet(&Msg.key, pszKey, strlen(pszKey) + 1);
    104104        VbglHGCMParmPtrSet(&Msg.value, pszValue, strlen(pszValue) + 1);
    105         rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL, &Msg, sizeof(Msg));
     105        rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
    106106        if (RT_SUCCESS(rc))
    107107            rc = Msg.hdr.result;
     
    116116        Msg.hdr.cParms = 1;
    117117        VbglHGCMParmPtrSet(&Msg.key, pszKey, strlen(pszKey) + 1);
    118         rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL, &Msg, sizeof(Msg));
     118        rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
    119119        if (RT_SUCCESS(rc))
    120120            rc = Msg.hdr.result;
     
    155155    VbglHGCMParmUInt32Set(&Msg.size, 0);
    156156
    157     int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL, &Msg, sizeof(Msg));
     157    int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
    158158    if (RT_SUCCESS(rc))
    159159        rc = Msg.hdr.result;
  • trunk/src/VBox/Additions/linux/module/vboxmod.c

    r10545 r10552  
    435435                IOCTL_LOG_EXIT(arg);
    436436        }
    437         else if (   VBOXGUEST_IOCTL_STRIP_SIZE(VBOXGUEST_IOCTL_VMMREQUEST)
     437        else if (   VBOXGUEST_IOCTL_STRIP_SIZE(VBOXGUEST_IOCTL_VMMREQUEST(0))
    438438            == VBOXGUEST_IOCTL_STRIP_SIZE(cmd))  {
    439439            VMMDevRequestHeader reqHeader;
     
    525525            IOCTL_VMM_EXIT(arg);
    526526        }
    527         else if (   (   VBOXGUEST_IOCTL_STRIP_SIZE(VBOXGUEST_IOCTL_HGCM_CALL)
     527        else if (   (   VBOXGUEST_IOCTL_STRIP_SIZE(VBOXGUEST_IOCTL_HGCM_CALL(0))
    528528                == VBOXGUEST_IOCTL_STRIP_SIZE(cmd))
    529529            || (cmd == VBOXGUEST_IOCTL_HGCM_CALL))
Note: See TracChangeset for help on using the changeset viewer.

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