VirtualBox

Changeset 67314 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jun 9, 2017 10:06:59 AM (8 years ago)
Author:
vboxsync
Message:

bugref:8533: Additions/x11: fully support VMSVGA
Add VbglR3AcquireGuestCaps() to the R3 guest library.

This change creates a guest library wrapper for the
VBOXGUEST_IOCTL_GUEST_CAPS_ACQUIRE VBoxGuest driver IoCtl which was added to
allow several instances of VBoxTray to run at once for different users in
Windows guests, but only one at a given time to receive display change and
seamless notifications. VBoxClient --vmsvga can use this to prevent the
privileged kernel mode-setting daemon version and the X11 client version
listening for display change notifications at the same time.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibMisc.cpp

    r62521 r67314  
    6969
    7070/**
     71 * Acquire capabilities to report to the host.  The capabilities which can be
     72 * acquired are the same as those reported by @a VbglR3SetGuestCaps, and once
     73 * a capability has been acquired once is is switched to "acquire mode" and can
     74 * no longer be set using @a VbglR3SetGuestCaps.  Capabilities can also be
     75 * switched to acquire mode without actually being acquired.  A client can not
     76 * acquire a capability which has been acquired and not released by another
     77 * client.  Capabilities acquired are automatically released on session
     78 * termination.
     79 *
     80 * @returns IPRT status code
     81 * @returns VERR_RESOURCE_BUSY and acquires nothing if another client has
     82 *          acquired and not released at least one of the @a fOr capabilities
     83 * @param   fOr      Capabilities to acquire or to switch to acquire mode
     84 * @param   fNot     Capabilities to release
     85 * @param   fConfig  if set, capabilities in @a fOr are switched to acquire mode
     86 *                   but not acquired, and @a fNot is ignored.
     87 */
     88VBGLR3DECL(int) VbglR3AcquireGuestCaps(uint32_t fOr, uint32_t fNot, bool fConfig)
     89{
     90    VBoxGuestCapsAquire Info;
     91    int rc;
     92
     93    Info.u32OrMask = fOr;
     94    Info.u32NotMask = fNot;
     95    Info.enmFlags = fConfig ? VBOXGUESTCAPSACQUIRE_FLAGS_CONFIG_ACQUIRE_MODE
     96                            : VBOXGUESTCAPSACQUIRE_FLAGS_NONE;
     97    rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_GUEST_CAPS_ACQUIRE, &Info, sizeof(Info));
     98    if (RT_FAILURE(rc))
     99        return rc;
     100    return Info.rc;
     101}
     102
     103
     104/**
    71105 * Query the session ID of this VM.
    72106 *
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