VirtualBox

Changeset 10516 in vbox for trunk/include


Ignore:
Timestamp:
Jul 11, 2008 11:17:48 AM (17 years ago)
Author:
vboxsync
Message:

More IOCTL stuff for R3 guest lib (Windows).

File:
1 edited

Legend:

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

    r10487 r10516  
    11001100
    11011101#if defined(RT_OS_WINDOWS)
    1102 # if 0 /** @todo Andy, enable this locally and make it work (may require changes to WINNT/VBoxGuest and other places that
    1103         * calls it). Then remove all the #else cases in the #ifdef VBOXGUEST_IOCTL_CODE test below and commit. (see #2993) */
     1102# define IOCTL_CODE(DeviceType, Function, Method, Access, DataSize_ignored) \
     1103  ( ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method))
    11041104# define VBOXGUEST_IOCTL_CODE(Function, Size)   IOCTL_CODE(FILE_DEVICE_UNKNOWN, 2048 + (Function), METHOD_BUFFERED, FILE_WRITE_ACCESS, 0)
    11051105# define VBOXGUEST_IOCTL_STRIP_SIZE(Code)       (Code)
    1106 # else
    1107   /* legacy encoding. */
    1108 # define IOCTL_CODE(DeviceType, Function, Method, Access, DataSize_ignored) \
    1109     ( ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method))
    1110 # endif
    11111106
    11121107#elif defined(RT_OS_OS2)
     
    11441139
    11451140/** IOCTL to VBoxGuest to query the VMMDev IO port region start. */
    1146 #ifdef VBOXGUEST_IOCTL_CODE
    11471141# define VBOXGUEST_IOCTL_GETVMMDEVPORT  VBOXGUEST_IOCTL_CODE(1, sizeof(VBoxGuestPortInfo))
    11481142# define IOCTL_VBOXGUEST_GETVMMDEVPORT  VBOXGUEST_IOCTL_GETVMMDEVPORT
    1149 #else
    1150 # define IOCTL_VBOXGUEST_GETVMMDEVPORT IOCTL_CODE(FILE_DEVICE_UNKNOWN, 2048, METHOD_BUFFERED, FILE_WRITE_ACCESS, sizeof(VBoxGuestPortInfo))
    1151 #endif
    11521143
    11531144#pragma pack(4)
     
    11591150
    11601151/** IOCTL to VBoxGuest to wait for a VMMDev host notification */
    1161 #ifdef VBOXGUEST_IOCTL_CODE
    11621152# define VBOXGUEST_IOCTL_WAITEVENT      VBOXGUEST_IOCTL_CODE(2, sizeof(VBoxGuestWaitEventInfo))
    11631153# define IOCTL_VBOXGUEST_WAITEVENT      VBOXGUEST_IOCTL_WAITEVENT
    1164 #else
    1165 # define IOCTL_VBOXGUEST_WAITEVENT IOCTL_CODE(FILE_DEVICE_UNKNOWN, 2049, METHOD_BUFFERED, FILE_WRITE_ACCESS, sizeof(VBoxGuestWaitEventInfo))
    1166 #endif
    11671154
    11681155/** IOCTL to VBoxGuest to interrupt (cancel) any pending WAITEVENTs and return.
    11691156 * Handled inside the guest additions and not seen by the host at all.
    11701157 * @see VBOXGUEST_IOCTL_WAITEVENT */
    1171 #ifdef VBOXGUEST_IOCTL_CODE
    11721158# define VBOXGUEST_IOCTL_CANCEL_ALL_WAITEVENTS    VBOXGUEST_IOCTL_CODE(5, 0)
    1173 #else
    1174 # define VBOXGUEST_IOCTL_CANCEL_ALL_WAITEVENTS    IOCTL_CODE(FILE_DEVICE_UNKNOWN, 2054, METHOD_BUFFERED, FILE_WRITE_ACCESS, 0)
    1175 #endif
    11761159
    11771160/**
     
    12051188 * @remark  The data buffer for this IOCtl has an variable size, keep this in mind
    12061189 *          on systems where this matters. */
    1207 #ifdef VBOXGUEST_IOCTL_CODE
    12081190# define VBOXGUEST_IOCTL_VMMREQUEST(Size)   VBOXGUEST_IOCTL_CODE(3, (Size))
    12091191# define IOCTL_VBOXGUEST_VMMREQUEST         VBOXGUEST_IOCTL_VMMREQUEST(sizeof(VMMDevRequestHeader))
    1210 #else
    1211 # define IOCTL_VBOXGUEST_VMMREQUEST IOCTL_CODE(FILE_DEVICE_UNKNOWN, 2050, METHOD_BUFFERED, FILE_WRITE_ACCESS, sizeof(VMMDevRequestHeader))
    1212 #endif
    12131192
    12141193/** Input and output buffer layout of the IOCTL_VBOXGUEST_CTL_FILTER_MASK. */
     
    12211200
    12221201/** IOCTL to VBoxGuest to control event filter mask. */
    1223 #ifdef VBOXGUEST_IOCTL_CODE
    1224 # define VBOXGUEST_IOCTL_CTL_FILTER_MASK    VBOXGUEST_IOCTL_CODE(4, sizeof(VBoxGuestFilterMaskInfo))
    1225 # define IOCTL_VBOXGUEST_CTL_FILTER_MASK    VBOXGUEST_IOCTL_CTL_FILTER_MASK
    1226 #else
    1227 # define IOCTL_VBOXGUEST_CTL_FILTER_MASK IOCTL_CODE(FILE_DEVICE_UNKNOWN, 2051, METHOD_BUFFERED, FILE_WRITE_ACCESS, sizeof (VBoxGuestFilterMaskInfo))
    1228 #endif
     1202# define VBOXGUEST_IOCTL_CTL_FILTER_MASK            VBOXGUEST_IOCTL_CODE(4, sizeof(VBoxGuestFilterMaskInfo))
     1203# define IOCTL_VBOXGUEST_CTL_FILTER_MASK            VBOXGUEST_IOCTL_CTL_FILTER_MASK
    12291204
    12301205/** IOCTL to VBoxGuest to check memory ballooning. */
    1231 #ifdef VBOXGUEST_IOCTL_CODE
    1232 # define VBOXGUEST_IOCTL_CTL_CHECK_BALLOON_MASK     VBOXGUEST_IOCTL_CODE(4, 100)
     1206# define VBOXGUEST_IOCTL_CTL_CHECK_BALLOON_MASK     VBOXGUEST_IOCTL_CODE(7, 100)
    12331207# define IOCTL_VBOXGUEST_CTL_CHECK_BALLOON          VBOXGUEST_IOCTL_CTL_CHECK_BALLOON_MASK
    1234 #else
    1235 # define IOCTL_VBOXGUEST_CTL_CHECK_BALLOON          IOCTL_CODE(FILE_DEVICE_UNKNOWN, 2052, METHOD_BUFFERED, FILE_WRITE_ACCESS, 0)
    1236 #endif
    12371208
    12381209/** IOCTL to VBoxGuest to perform backdoor logging. */
    1239 #ifdef VBOXGUEST_IOCTL_CODE
    1240 # define VBOXGUEST_IOCTL_LOG(Size)          VBOXGUEST_IOCTL_CODE(6, (Size))
    1241 #else
    1242 # define VBOXGUEST_IOCTL_LOG(Size)          IOCTL_CODE(FILE_DEVICE_UNKNOWN, 2055, METHOD_BUFFERED, FILE_WRITE_ACCESS, (Size))
    1243 #endif
     1210# define VBOXGUEST_IOCTL_LOG(Size)                  VBOXGUEST_IOCTL_CODE(6, (Size))
    12441211
    12451212
     
    12721239#pragma pack()
    12731240
    1274 #ifdef VBOXGUEST_IOCTL_CODE
     1241//#ifdef VBOXGUEST_IOCTL_CODE
    12751242# define VBOXGUEST_IOCTL_HGCM_CONNECT       VBOXGUEST_IOCTL_CODE(16, sizeof(VBoxGuestHGCMConnectInfo))
    12761243# define IOCTL_VBOXGUEST_HGCM_CONNECT       VBOXGUEST_IOCTL_HGCM_CONNECT
     
    12811248# define VBOXGUEST_IOCTL_CLIPBOARD_CONNECT  VBOXGUEST_IOCTL_CODE(19, sizeof(uint32_t))
    12821249# define IOCTL_VBOXGUEST_CLIPBOARD_CONNECT  VBOXGUEST_IOCTL_CLIPBOARD_CONNECT
    1283 #else
     1250/*#else
    12841251# define IOCTL_VBOXGUEST_HGCM_CONNECT      IOCTL_CODE(FILE_DEVICE_UNKNOWN, 3072, METHOD_BUFFERED, FILE_WRITE_ACCESS, sizeof(VBoxGuestHGCMConnectInfo))
    12851252# define IOCTL_VBOXGUEST_HGCM_DISCONNECT   IOCTL_CODE(FILE_DEVICE_UNKNOWN, 3073, METHOD_BUFFERED, FILE_WRITE_ACCESS, sizeof(VBoxGuestHGCMDisconnectInfo))
    12861253# define IOCTL_VBOXGUEST_HGCM_CALL         IOCTL_CODE(FILE_DEVICE_UNKNOWN, 3074, METHOD_BUFFERED, FILE_WRITE_ACCESS, sizeof(VBoxGuestHGCMCallInfo))
    12871254# define IOCTL_VBOXGUEST_CLIPBOARD_CONNECT IOCTL_CODE(FILE_DEVICE_UNKNOWN, 3075, METHOD_BUFFERED, FILE_WRITE_ACCESS, sizeof(uint32_t))
    1288 #endif
     1255#endif*/
    12891256
    12901257#define VBOXGUEST_HGCM_CALL_PARMS(a) ((HGCMFunctionParameter *)((uint8_t *)(a) + sizeof (VBoxGuestHGCMCallInfo)))
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