VirtualBox

Changeset 68462 in vbox


Ignore:
Timestamp:
Aug 18, 2017 11:23:02 AM (7 years ago)
Author:
vboxsync
Message:

VBoxGuestLib: Use common VbglR3HGCMDisconnect to disconnect.

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VBoxGuestLib.h

    r68436 r68462  
    663663/* General message handling on the guest. */
    664664VBGLR3DECL(int) VbglR3GuestCtrlConnect(uint32_t *pidClient);
    665 VBGLR3DECL(int) VbglR3GuestCtrlDisconnect(uint32_t uClientId);
     665VBGLR3DECL(int) VbglR3GuestCtrlDisconnect(uint32_t idClient);
    666666VBGLR3DECL(int) VbglR3GuestCtrlMsgFilterSet(uint32_t uClientId, uint32_t uValue, uint32_t uMaskAdd, uint32_t uMaskRemove);
    667667VBGLR3DECL(int) VbglR3GuestCtrlMsgFilterUnset(uint32_t uClientId);
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibClipboard.cpp

    r68458 r68462  
    7272VBGLR3DECL(int) VbglR3ClipboardDisconnect(HGCMCLIENTID idClient)
    7373{
    74     VBoxGuestHGCMDisconnectInfo Info;
    75     Info.result = VERR_WRONG_ORDER;
    76     Info.u32ClientID = idClient;
    77 
    78     int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_DISCONNECT, &Info, sizeof(Info));
    79     if (RT_SUCCESS(rc))
    80         rc = Info.result;
    81     return rc;
     74    return VbglR3HGCMDisconnect(idClient);
    8275}
    8376
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibDragAndDrop.cpp

    r68458 r68462  
    13851385{
    13861386    AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
    1387 
    1388     VBoxGuestHGCMDisconnectInfo Info;
    1389     Info.result      = VERR_WRONG_ORDER;
    1390     Info.u32ClientID = pCtx->uClientID;
    1391 
    1392     int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_DISCONNECT, &Info, sizeof(Info));
    1393     if (RT_SUCCESS(rc))
    1394         rc = Info.result;
    1395 
     1387    int rc = VbglR3HGCMDisconnect(pCtx->uClientID);
     1388    if (RT_SUCCESS(rc))
     1389        pCtx->uClientID = 0;
    13961390    return rc;
    13971391}
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestCtrl.cpp

    r68458 r68462  
    4646 *
    4747 * @returns VBox status code
    48  * @param   puClientId    Where to put The client ID on success. The client ID
     48 * @param   pidClient     Where to put The client ID on success. The client ID
    4949 *                        must be passed to all the other calls to the service.
    5050 */
    51 VBGLR3DECL(int) VbglR3GuestCtrlConnect(uint32_t *puClientId)
     51VBGLR3DECL(int) VbglR3GuestCtrlConnect(uint32_t *pidClient)
    5252{
    5353    VBoxGuestHGCMConnectInfo Info;
     
    6363        rc = Info.result;
    6464        if (RT_SUCCESS(rc))
    65             *puClientId = Info.u32ClientID;
     65            *pidClient = Info.u32ClientID;
    6666    }
    6767    return rc;
     
    7373 *
    7474 * @returns VBox status code.
    75  * @param   uClientId     The client ID returned by VbglR3GuestCtrlConnect().
    76  */
    77 VBGLR3DECL(int) VbglR3GuestCtrlDisconnect(uint32_t uClientId)
    78 {
    79     VBoxGuestHGCMDisconnectInfo Info;
    80     Info.result = VERR_WRONG_ORDER;
    81     Info.u32ClientID = uClientId;
    82 
    83     int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_DISCONNECT, &Info, sizeof(Info));
    84     if (RT_SUCCESS(rc))
    85         rc = Info.result;
    86     return rc;
     75 * @param   idClient        The client ID returned by VbglR3GuestCtrlConnect().
     76 */
     77VBGLR3DECL(int) VbglR3GuestCtrlDisconnect(uint32_t idClient)
     78{
     79    return VbglR3HGCMDisconnect(idClient);
    8780}
    8881
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp

    r68458 r68462  
    157157VBGLR3DECL(int) VbglR3GuestPropDisconnect(HGCMCLIENTID idClient)
    158158{
    159     VBoxGuestHGCMDisconnectInfo Info;
    160     Info.result = VERR_WRONG_ORDER;
    161     Info.u32ClientID = idClient;
    162 
    163     int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_DISCONNECT, &Info, sizeof(Info));
    164     if (RT_SUCCESS(rc))
    165         rc = Info.result;
    166     return rc;
     159    return VbglR3HGCMDisconnect(idClient);
    167160}
    168161
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibHostChannel.cpp

    r68458 r68462  
    6060VBGLR3DECL(void) VbglR3HostChannelTerm(uint32_t u32HGCMClientId)
    6161{
    62     VBoxGuestHGCMDisconnectInfo disconnectInfo;
    63     disconnectInfo.result = VERR_WRONG_ORDER;
    64     disconnectInfo.u32ClientID = u32HGCMClientId;
    65 
    66     vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_DISCONNECT, &disconnectInfo, sizeof(disconnectInfo));
     62    VbglR3HGCMDisconnect(u32HGCMClientId);
    6763}
    6864
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibSharedFolders.cpp

    r68458 r68462  
    7575VBGLR3DECL(int) VbglR3SharedFolderDisconnect(HGCMCLIENTID idClient)
    7676{
    77     VBoxGuestHGCMDisconnectInfo Info;
    78     Info.result = VERR_WRONG_ORDER;
    79     Info.u32ClientID = idClient;
    80 
    81     int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_DISCONNECT, &Info, sizeof(Info));
    82     if (RT_SUCCESS(rc))
    83         rc = Info.result;
    84     return rc;
     77    return VbglR3HGCMDisconnect(idClient);
    8578}
    8679
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