[1] | 1 | /** @file
|
---|
[21211] | 2 | * VBoxGuestLib - VirtualBox Guest Additions Library.
|
---|
[1] | 3 | */
|
---|
| 4 |
|
---|
| 5 | /*
|
---|
[71364] | 6 | * Copyright (C) 2006-2018 Oracle Corporation
|
---|
[1] | 7 | *
|
---|
[72627] | 8 | * Permission is hereby granted, free of charge, to any person
|
---|
| 9 | * obtaining a copy of this software and associated documentation
|
---|
| 10 | * files (the "Software"), to deal in the Software without
|
---|
| 11 | * restriction, including without limitation the rights to use,
|
---|
| 12 | * copy, modify, merge, publish, distribute, sublicense, and/or sell
|
---|
| 13 | * copies of the Software, and to permit persons to whom the
|
---|
| 14 | * Software is furnished to do so, subject to the following
|
---|
| 15 | * conditions:
|
---|
[5999] | 16 | *
|
---|
[72627] | 17 | * The above copyright notice and this permission notice shall be
|
---|
| 18 | * included in all copies or substantial portions of the Software.
|
---|
[5999] | 19 | *
|
---|
[72627] | 20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
---|
| 21 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
---|
| 22 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
---|
| 23 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
---|
| 24 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
---|
| 25 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
---|
| 26 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
---|
| 27 | * OTHER DEALINGS IN THE SOFTWARE.
|
---|
[1] | 28 | */
|
---|
| 29 |
|
---|
[3632] | 30 | #ifndef ___VBox_VBoxGuestLib_h
|
---|
| 31 | #define ___VBox_VBoxGuestLib_h
|
---|
[1] | 32 |
|
---|
[21227] | 33 | #include <VBox/types.h>
|
---|
[72352] | 34 | #include <VBox/VMMDev.h>
|
---|
[68630] | 35 | #include <VBox/VBoxGuestCoreTypes.h>
|
---|
[1] | 36 |
|
---|
[58111] | 37 | /** @defgroup grp_vboxguest_lib VirtualBox Guest Additions Library
|
---|
| 38 | * @ingroup grp_vboxguest
|
---|
[1] | 39 | * @{
|
---|
| 40 | */
|
---|
| 41 |
|
---|
| 42 | /** @page pg_guest_lib VirtualBox Guest Library
|
---|
| 43 | *
|
---|
[21211] | 44 | * This is a library for abstracting the additions driver interface. There are
|
---|
| 45 | * multiple versions of the library depending on the context. The main
|
---|
| 46 | * distinction is between kernel and user mode where the interfaces are very
|
---|
| 47 | * different.
|
---|
[1] | 48 | *
|
---|
| 49 | *
|
---|
[21211] | 50 | * @section sec_guest_lib_ring0 Ring-0
|
---|
[1] | 51 | *
|
---|
[21211] | 52 | * In ring-0 there are two version:
|
---|
| 53 | * - VBOX_LIB_VBGL_R0_BASE / VBoxGuestR0LibBase for the VBoxGuest main driver,
|
---|
| 54 | * who is responsible for managing the VMMDev virtual hardware.
|
---|
| 55 | * - VBOX_LIB_VBGL_R0 / VBoxGuestR0Lib for other (client) guest drivers.
|
---|
[1] | 56 | *
|
---|
| 57 | *
|
---|
[21211] | 58 | * The library source code and the header have a define VBGL_VBOXGUEST, which is
|
---|
| 59 | * defined for VBoxGuest and undefined for other drivers. Drivers must choose
|
---|
| 60 | * right library in their makefiles and set VBGL_VBOXGUEST accordingly.
|
---|
| 61 | *
|
---|
| 62 | * The libraries consists of:
|
---|
| 63 | * - common code to be used by both VBoxGuest and other drivers;
|
---|
| 64 | * - VBoxGuest specific code;
|
---|
| 65 | * - code for other drivers which communicate with VBoxGuest via an IOCTL.
|
---|
| 66 | *
|
---|
| 67 | *
|
---|
| 68 | * @section sec_guest_lib_ring3 Ring-3
|
---|
| 69 | *
|
---|
| 70 | * There are more variants of the library here:
|
---|
| 71 | * - VBOX_LIB_VBGL_R3 / VBoxGuestR3Lib for programs.
|
---|
| 72 | * - VBOX_LIB_VBGL_R3_XFREE86 / VBoxGuestR3LibXFree86 for old style XFree
|
---|
| 73 | * drivers which uses special loader and or symbol resolving strategy.
|
---|
| 74 | * - VBOX_LIB_VBGL_R3_SHARED / VBoxGuestR3LibShared for shared objects / DLLs /
|
---|
| 75 | * Dylibs.
|
---|
| 76 | *
|
---|
[1] | 77 | */
|
---|
| 78 |
|
---|
[21211] | 79 | RT_C_DECLS_BEGIN
|
---|
[1] | 80 |
|
---|
[58183] | 81 | /** HGCM client ID.
|
---|
| 82 | * @todo Promote to VBox/types.h */
|
---|
| 83 | typedef uint32_t HGCMCLIENTID;
|
---|
| 84 |
|
---|
| 85 |
|
---|
[58111] | 86 | /** @defgroup grp_vboxguest_lib_r0 Ring-0 interface.
|
---|
[21211] | 87 | * @{
|
---|
| 88 | */
|
---|
[68670] | 89 | #ifdef IN_RING0
|
---|
[21260] | 90 | /** @def DECLR0VBGL
|
---|
| 91 | * Declare a VBGL ring-0 API with the right calling convention and visibilitiy.
|
---|
| 92 | * @param type Return type. */
|
---|
[45249] | 93 | # ifdef RT_OS_DARWIN /** @todo probably apply to all, but don't want a forest fire on our hands right now. */
|
---|
| 94 | # define DECLR0VBGL(type) DECLHIDDEN(type) VBOXCALL
|
---|
| 95 | # else
|
---|
| 96 | # define DECLR0VBGL(type) type VBOXCALL
|
---|
| 97 | # endif
|
---|
[21260] | 98 | # define DECLVBGL(type) DECLR0VBGL(type)
|
---|
[1] | 99 |
|
---|
| 100 |
|
---|
| 101 | /**
|
---|
[68550] | 102 | * The library initialization function to be used by the main VBoxGuest driver.
|
---|
[1] | 103 | *
|
---|
| 104 | * @return VBox status code.
|
---|
| 105 | */
|
---|
[68654] | 106 | DECLR0VBGL(int) VbglR0InitPrimary(RTIOPORT portVMMDev, struct VMMDevMemory *pVMMDevMemory);
|
---|
[1] | 107 |
|
---|
[68550] | 108 | /**
|
---|
| 109 | * The library termination function to be used by the main VBoxGuest driver.
|
---|
| 110 | *
|
---|
| 111 | * @author bird (2017-08-23)
|
---|
| 112 | */
|
---|
[68654] | 113 | DECLR0VBGL(void) VbglR0TerminatePrimary(void);
|
---|
[1] | 114 |
|
---|
| 115 | /**
|
---|
| 116 | * The library initialization function to be used by all drivers
|
---|
| 117 | * other than the main VBoxGuest system driver.
|
---|
| 118 | *
|
---|
| 119 | * @return VBox status code.
|
---|
| 120 | */
|
---|
[68654] | 121 | DECLR0VBGL(int) VbglR0InitClient(void);
|
---|
[1] | 122 |
|
---|
| 123 | /**
|
---|
| 124 | * The library termination function.
|
---|
| 125 | */
|
---|
[68654] | 126 | DECLR0VBGL(void) VbglR0TerminateClient(void);
|
---|
[1] | 127 |
|
---|
[21211] | 128 |
|
---|
[68550] | 129 | /** @name The IDC Client Interface
|
---|
| 130 | * @{
|
---|
| 131 | */
|
---|
| 132 |
|
---|
| 133 | /**
|
---|
| 134 | * Inter-Driver Communication Handle.
|
---|
| 135 | */
|
---|
| 136 | typedef union VBGLIDCHANDLE
|
---|
| 137 | {
|
---|
| 138 | /** Padding for opaque usage.
|
---|
| 139 | * Must be greater or equal in size than the private struct. */
|
---|
| 140 | void *apvPadding[4];
|
---|
| 141 | #ifdef VBGLIDCHANDLEPRIVATE_DECLARED
|
---|
| 142 | /** The private view. */
|
---|
| 143 | struct VBGLIDCHANDLEPRIVATE s;
|
---|
| 144 | #endif
|
---|
| 145 | } VBGLIDCHANDLE;
|
---|
| 146 | /** Pointer to a handle. */
|
---|
| 147 | typedef VBGLIDCHANDLE *PVBGLIDCHANDLE;
|
---|
| 148 |
|
---|
| 149 | DECLR0VBGL(int) VbglR0IdcOpen(PVBGLIDCHANDLE pHandle, uint32_t uReqVersion, uint32_t uMinVersion,
|
---|
| 150 | uint32_t *puSessionVersion, uint32_t *puDriverVersion, uint32_t *puDriverRevision);
|
---|
[68630] | 151 | struct VBGLREQHDR;
|
---|
| 152 | DECLR0VBGL(int) VbglR0IdcCallRaw(PVBGLIDCHANDLE pHandle, uintptr_t uReq, struct VBGLREQHDR *pReqHdr, uint32_t cbReq);
|
---|
| 153 | DECLR0VBGL(int) VbglR0IdcCall(PVBGLIDCHANDLE pHandle, uintptr_t uReq, struct VBGLREQHDR *pReqHdr, uint32_t cbReq);
|
---|
[68550] | 154 | DECLR0VBGL(int) VbglR0IdcClose(PVBGLIDCHANDLE pHandle);
|
---|
| 155 |
|
---|
| 156 | /** @} */
|
---|
| 157 |
|
---|
| 158 |
|
---|
[1] | 159 | /** @name Generic request functions.
|
---|
| 160 | * @{
|
---|
| 161 | */
|
---|
| 162 |
|
---|
| 163 | /**
|
---|
| 164 | * Allocate memory for generic request and initialize the request header.
|
---|
| 165 | *
|
---|
[58178] | 166 | * @returns VBox status code.
|
---|
| 167 | * @param ppReq Where to return the pointer to the allocated memory.
|
---|
| 168 | * @param cbReq Size of memory block required for the request.
|
---|
| 169 | * @param enmReqType the generic request type.
|
---|
[1] | 170 | */
|
---|
[68630] | 171 | # if defined(___VBox_VMMDev_h) || defined(DOXYGEN_RUNNING)
|
---|
[68654] | 172 | DECLR0VBGL(int) VbglR0GRAlloc(struct VMMDevRequestHeader **ppReq, size_t cbReq, VMMDevRequestType enmReqType);
|
---|
[68630] | 173 | # else
|
---|
[68654] | 174 | DECLR0VBGL(int) VbglR0GRAlloc(struct VMMDevRequestHeader **ppReq, size_t cbReq, int32_t enmReqType);
|
---|
[68630] | 175 | # endif
|
---|
[1] | 176 |
|
---|
| 177 | /**
|
---|
| 178 | * Perform the generic request.
|
---|
| 179 | *
|
---|
| 180 | * @param pReq pointer the request structure.
|
---|
| 181 | *
|
---|
| 182 | * @return VBox status code.
|
---|
| 183 | */
|
---|
[68654] | 184 | DECLR0VBGL(int) VbglR0GRPerform(struct VMMDevRequestHeader *pReq);
|
---|
[1] | 185 |
|
---|
| 186 | /**
|
---|
| 187 | * Free the generic request memory.
|
---|
| 188 | *
|
---|
| 189 | * @param pReq pointer the request structure.
|
---|
| 190 | *
|
---|
| 191 | * @return VBox status code.
|
---|
| 192 | */
|
---|
[68654] | 193 | DECLR0VBGL(void) VbglR0GRFree(struct VMMDevRequestHeader *pReq);
|
---|
[23916] | 194 |
|
---|
| 195 | /**
|
---|
| 196 | * Verify the generic request header.
|
---|
| 197 | *
|
---|
| 198 | * @param pReq pointer the request header structure.
|
---|
| 199 | * @param cbReq size of the request memory block. It should be equal to the request size
|
---|
| 200 | * for fixed size requests. It can be greater than the request size for
|
---|
| 201 | * variable size requests.
|
---|
| 202 | *
|
---|
| 203 | * @return VBox status code.
|
---|
| 204 | */
|
---|
[68654] | 205 | DECLR0VBGL(int) VbglGR0Verify(const struct VMMDevRequestHeader *pReq, size_t cbReq);
|
---|
[68630] | 206 |
|
---|
[1] | 207 | /** @} */
|
---|
| 208 |
|
---|
[21211] | 209 | # ifdef VBOX_WITH_HGCM
|
---|
[68630] | 210 | struct VBGLIOCHGCMCALL;
|
---|
[1] | 211 |
|
---|
[21211] | 212 | # ifdef VBGL_VBOXGUEST
|
---|
[1] | 213 |
|
---|
| 214 | /**
|
---|
| 215 | * Callback function called from HGCM helpers when a wait for request
|
---|
| 216 | * completion IRQ is required.
|
---|
| 217 | *
|
---|
[21506] | 218 | * @returns VINF_SUCCESS, VERR_INTERRUPT or VERR_TIMEOUT.
|
---|
| 219 | * @param pvData VBoxGuest pointer to be passed to callback.
|
---|
| 220 | * @param u32Data VBoxGuest 32 bit value to be passed to callback.
|
---|
[1] | 221 | */
|
---|
[45369] | 222 | typedef DECLCALLBACK(int) FNVBGLHGCMCALLBACK(VMMDevHGCMRequestHeader *pHeader, void *pvData, uint32_t u32Data);
|
---|
[21506] | 223 | /** Pointer to a FNVBGLHGCMCALLBACK. */
|
---|
| 224 | typedef FNVBGLHGCMCALLBACK *PFNVBGLHGCMCALLBACK;
|
---|
[1] | 225 |
|
---|
| 226 | /**
|
---|
[68550] | 227 | * Perform a connect request.
|
---|
[1] | 228 | *
|
---|
[68550] | 229 | * That is locate required service and obtain a client identifier for future
|
---|
| 230 | * access.
|
---|
| 231 | *
|
---|
[8700] | 232 | * @note This function can NOT handle cancelled requests!
|
---|
| 233 | *
|
---|
[68550] | 234 | * @param pLoc The service to connect to.
|
---|
[70873] | 235 | * @param fRequestor VMMDEV_REQUESTOR_XXX.
|
---|
[68550] | 236 | * @param pidClient Where to return the client ID on success.
|
---|
[21506] | 237 | * @param pfnAsyncCallback Required pointer to function that is calledwhen
|
---|
| 238 | * host returns VINF_HGCM_ASYNC_EXECUTE. VBoxGuest
|
---|
| 239 | * implements waiting for an IRQ in this function.
|
---|
| 240 | * @param pvAsyncData An arbitrary VBoxGuest pointer to be passed to callback.
|
---|
| 241 | * @param u32AsyncData An arbitrary VBoxGuest 32 bit value to be passed to callback.
|
---|
[1] | 242 | *
|
---|
[21506] | 243 | * @return VBox status code.
|
---|
[1] | 244 | */
|
---|
[70873] | 245 | DECLR0VBGL(int) VbglR0HGCMInternalConnect(HGCMServiceLocation const *pLoc, uint32_t fRequestor, HGCMCLIENTID *pidClient,
|
---|
[68550] | 246 | PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
|
---|
[1] | 247 |
|
---|
| 248 |
|
---|
| 249 | /**
|
---|
[68550] | 250 | * Perform a disconnect request.
|
---|
[1] | 251 | *
|
---|
[68550] | 252 | * That is tell the host that the client will not call the service anymore.
|
---|
| 253 | *
|
---|
[8700] | 254 | * @note This function can NOT handle cancelled requests!
|
---|
| 255 | *
|
---|
[68550] | 256 | * @param idClient The client ID to disconnect.
|
---|
[70873] | 257 | * @param fRequestor VMMDEV_REQUESTOR_XXX.
|
---|
[21506] | 258 | * @param pfnAsyncCallback Required pointer to function that is called when
|
---|
| 259 | * host returns VINF_HGCM_ASYNC_EXECUTE. VBoxGuest
|
---|
| 260 | * implements waiting for an IRQ in this function.
|
---|
| 261 | * @param pvAsyncData An arbitrary VBoxGuest pointer to be passed to callback.
|
---|
| 262 | * @param u32AsyncData An arbitrary VBoxGuest 32 bit value to be passed to
|
---|
| 263 | * callback.
|
---|
[1] | 264 | *
|
---|
[21506] | 265 | * @return VBox status code.
|
---|
[1] | 266 | */
|
---|
| 267 |
|
---|
[70873] | 268 | DECLR0VBGL(int) VbglR0HGCMInternalDisconnect(HGCMCLIENTID idClient, uint32_t fRequestor,
|
---|
[68550] | 269 | PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
|
---|
[1] | 270 |
|
---|
[8700] | 271 | /** Call a HGCM service.
|
---|
[1] | 272 | *
|
---|
[8700] | 273 | * @note This function can deal with cancelled requests.
|
---|
| 274 | *
|
---|
[21506] | 275 | * @param pCallInfo The request data.
|
---|
| 276 | * @param fFlags Flags, see VBGLR0_HGCMCALL_F_XXX.
|
---|
[70873] | 277 | * @param fRequestor VMMDEV_REQUESTOR_XXX.
|
---|
[21506] | 278 | * @param pfnAsyncCallback Required pointer to function that is called when
|
---|
| 279 | * host returns VINF_HGCM_ASYNC_EXECUTE. VBoxGuest
|
---|
| 280 | * implements waiting for an IRQ in this function.
|
---|
| 281 | * @param pvAsyncData An arbitrary VBoxGuest pointer to be passed to callback.
|
---|
| 282 | * @param u32AsyncData An arbitrary VBoxGuest 32 bit value to be passed to callback.
|
---|
[1] | 283 | *
|
---|
| 284 | * @return VBox status code.
|
---|
| 285 | */
|
---|
[70873] | 286 | DECLR0VBGL(int) VbglR0HGCMInternalCall(struct VBGLIOCHGCMCALL *pCallInfo, uint32_t cbCallInfo, uint32_t fFlags, uint32_t fRequestor,
|
---|
[68550] | 287 | PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
|
---|
[1] | 288 |
|
---|
[15704] | 289 | /** Call a HGCM service. (32 bits packet structure in a 64 bits guest)
|
---|
| 290 | *
|
---|
| 291 | * @note This function can deal with cancelled requests.
|
---|
| 292 | *
|
---|
[21506] | 293 | * @param pCallInfo The request data.
|
---|
| 294 | * @param fFlags Flags, see VBGLR0_HGCMCALL_F_XXX.
|
---|
[70873] | 295 | * @param fRequestor VMMDEV_REQUESTOR_XXX.
|
---|
[21506] | 296 | * @param pfnAsyncCallback Required pointer to function that is called when
|
---|
| 297 | * host returns VINF_HGCM_ASYNC_EXECUTE. VBoxGuest
|
---|
| 298 | * implements waiting for an IRQ in this function.
|
---|
| 299 | * @param pvAsyncData An arbitrary VBoxGuest pointer to be passed to callback.
|
---|
| 300 | * @param u32AsyncData An arbitrary VBoxGuest 32 bit value to be passed to callback.
|
---|
[15704] | 301 | *
|
---|
[21506] | 302 | * @return VBox status code.
|
---|
[15704] | 303 | */
|
---|
[70873] | 304 | DECLR0VBGL(int) VbglR0HGCMInternalCall32(struct VBGLIOCHGCMCALL *pCallInfo, uint32_t cbCallInfo, uint32_t fFlags, uint32_t fRequestor,
|
---|
[68550] | 305 | PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData);
|
---|
[15704] | 306 |
|
---|
[21260] | 307 | /** @name VbglR0HGCMInternalCall flags
|
---|
| 308 | * @{ */
|
---|
| 309 | /** User mode request.
|
---|
| 310 | * Indicates that only user mode addresses are permitted as parameters. */
|
---|
| 311 | #define VBGLR0_HGCMCALL_F_USER UINT32_C(0)
|
---|
| 312 | /** Kernel mode request.
|
---|
| 313 | * Indicates that kernel mode addresses are permitted as parameters. Whether or
|
---|
| 314 | * not user mode addresses are permitted is, unfortunately, OS specific. The
|
---|
| 315 | * following OSes allows user mode addresses: Windows, TODO.
|
---|
| 316 | */
|
---|
| 317 | #define VBGLR0_HGCMCALL_F_KERNEL UINT32_C(1)
|
---|
| 318 | /** Mode mask. */
|
---|
| 319 | #define VBGLR0_HGCMCALL_F_MODE_MASK UINT32_C(1)
|
---|
| 320 | /** @} */
|
---|
| 321 |
|
---|
[21211] | 322 | # else /* !VBGL_VBOXGUEST */
|
---|
[1] | 323 |
|
---|
| 324 | struct VBGLHGCMHANDLEDATA;
|
---|
| 325 | typedef struct VBGLHGCMHANDLEDATA *VBGLHGCMHANDLE;
|
---|
| 326 |
|
---|
| 327 | /** @name HGCM functions
|
---|
| 328 | * @{
|
---|
| 329 | */
|
---|
| 330 |
|
---|
| 331 | /**
|
---|
[68103] | 332 | * Initializes HGCM in the R0 guest library. Must be called before any HGCM
|
---|
| 333 | * connections are made. Is called by VbglInitClient().
|
---|
| 334 | *
|
---|
| 335 | * @return VBox status code.
|
---|
| 336 | */
|
---|
[68654] | 337 | DECLR0VBGL(int) VbglR0HGCMInit(void);
|
---|
[68103] | 338 |
|
---|
| 339 | /**
|
---|
| 340 | * Terminates HGCM in the R0 guest library. Is called by VbglTerminate().
|
---|
| 341 | *
|
---|
| 342 | * @return VBox status code.
|
---|
| 343 | */
|
---|
[68654] | 344 | DECLR0VBGL(int) VbglR0HGCMTerminate(void);
|
---|
[68103] | 345 |
|
---|
| 346 | /**
|
---|
[1] | 347 | * Connect to a service.
|
---|
| 348 | *
|
---|
[68476] | 349 | * @param pHandle Pointer to variable that will hold a handle to be used
|
---|
| 350 | * further in VbglHGCMCall and VbglHGCMClose.
|
---|
| 351 | * @param pszServiceName The service to connect to.
|
---|
| 352 | * @param pidClient Where to return the client ID for the connection.
|
---|
[1] | 353 | *
|
---|
| 354 | * @return VBox status code.
|
---|
[68476] | 355 | *
|
---|
| 356 | * @todo consider baking the client Id into the handle.
|
---|
[1] | 357 | */
|
---|
[68654] | 358 | DECLR0VBGL(int) VbglR0HGCMConnect(VBGLHGCMHANDLE *pHandle, const char *pszServiceName, HGCMCLIENTID *pidClient);
|
---|
[1] | 359 |
|
---|
| 360 | /**
|
---|
| 361 | * Connect to a service.
|
---|
| 362 | *
|
---|
| 363 | * @param handle Handle of the connection.
|
---|
[68476] | 364 | * @param idClient The ID of the client connection.
|
---|
[1] | 365 | *
|
---|
| 366 | * @return VBox status code.
|
---|
[68476] | 367 | *
|
---|
| 368 | * @todo consider baking the client Id into the handle.
|
---|
[1] | 369 | */
|
---|
[68654] | 370 | DECLR0VBGL(int) VbglR0HGCMDisconnect(VBGLHGCMHANDLE handle, HGCMCLIENTID idClient);
|
---|
[1] | 371 |
|
---|
| 372 | /**
|
---|
[68550] | 373 | * Call to a service, returning only the I/O control status code.
|
---|
[1] | 374 | *
|
---|
| 375 | * @param handle Handle of the connection.
|
---|
| 376 | * @param pData Call request information structure, including function parameters.
|
---|
| 377 | * @param cbData Length in bytes of data.
|
---|
| 378 | *
|
---|
| 379 | * @return VBox status code.
|
---|
| 380 | */
|
---|
[68654] | 381 | DECLR0VBGL(int) VbglR0HGCMCallRaw(VBGLHGCMHANDLE handle, struct VBGLIOCHGCMCALL*pData, uint32_t cbData);
|
---|
[14207] | 382 |
|
---|
| 383 | /**
|
---|
[68550] | 384 | * Call to a service, returning the HGCM status code.
|
---|
[40483] | 385 | *
|
---|
| 386 | * @param handle Handle of the connection.
|
---|
| 387 | * @param pData Call request information structure, including function parameters.
|
---|
| 388 | * @param cbData Length in bytes of data.
|
---|
| 389 | *
|
---|
[68550] | 390 | * @return VBox status code. Either the I/O control status code if that failed,
|
---|
| 391 | * or the HGCM status code (pData->Hdr.rc).
|
---|
[40483] | 392 | */
|
---|
[68654] | 393 | DECLR0VBGL(int) VbglR0HGCMCall(VBGLHGCMHANDLE handle, struct VBGLIOCHGCMCALL*pData, uint32_t cbData);
|
---|
[40483] | 394 |
|
---|
| 395 | /**
|
---|
[68550] | 396 | * Call to a service with user-mode data received by the calling driver from the User-Mode process.
|
---|
| 397 | * The call must be done in the context of a calling process.
|
---|
[14207] | 398 | *
|
---|
| 399 | * @param handle Handle of the connection.
|
---|
| 400 | * @param pData Call request information structure, including function parameters.
|
---|
| 401 | * @param cbData Length in bytes of data.
|
---|
| 402 | *
|
---|
| 403 | * @return VBox status code.
|
---|
| 404 | */
|
---|
[68654] | 405 | DECLR0VBGL(int) VbglR0HGCMCallUserDataRaw(VBGLHGCMHANDLE handle, struct VBGLIOCHGCMCALL*pData, uint32_t cbData);
|
---|
[68550] | 406 |
|
---|
[1] | 407 | /** @} */
|
---|
| 408 |
|
---|
[58181] | 409 | /** @name Undocumented helpers for talking to the Chromium OpenGL Host Service
|
---|
| 410 | * @{ */
|
---|
[58184] | 411 | typedef VBGLHGCMHANDLE VBGLCRCTLHANDLE;
|
---|
[68654] | 412 | DECLR0VBGL(int) VbglR0CrCtlCreate(VBGLCRCTLHANDLE *phCtl);
|
---|
| 413 | DECLR0VBGL(int) VbglR0CrCtlDestroy(VBGLCRCTLHANDLE hCtl);
|
---|
| 414 | DECLR0VBGL(int) VbglR0CrCtlConConnect(VBGLCRCTLHANDLE hCtl, HGCMCLIENTID *pidClient);
|
---|
| 415 | DECLR0VBGL(int) VbglR0CrCtlConDisconnect(VBGLCRCTLHANDLE hCtl, HGCMCLIENTID idClient);
|
---|
[68630] | 416 | struct VBGLIOCHGCMCALL;
|
---|
[68654] | 417 | DECLR0VBGL(int) VbglR0CrCtlConCallRaw(VBGLCRCTLHANDLE hCtl, struct VBGLIOCHGCMCALL *pCallInfo, int cbCallInfo);
|
---|
| 418 | DECLR0VBGL(int) VbglR0CrCtlConCall(VBGLCRCTLHANDLE hCtl, struct VBGLIOCHGCMCALL *pCallInfo, int cbCallInfo);
|
---|
| 419 | DECLR0VBGL(int) VbglR0CrCtlConCallUserDataRaw(VBGLCRCTLHANDLE hCtl, struct VBGLIOCHGCMCALL *pCallInfo, int cbCallInfo);
|
---|
[58181] | 420 | /** @} */
|
---|
| 421 |
|
---|
[21211] | 422 | # endif /* !VBGL_VBOXGUEST */
|
---|
[1] | 423 |
|
---|
[21211] | 424 | # endif /* VBOX_WITH_HGCM */
|
---|
[1] | 425 |
|
---|
| 426 |
|
---|
| 427 | /**
|
---|
| 428 | * Initialize the heap.
|
---|
| 429 | *
|
---|
[58154] | 430 | * @returns VBox status code.
|
---|
[1] | 431 | */
|
---|
[68654] | 432 | DECLR0VBGL(int) VbglR0PhysHeapInit(void);
|
---|
[1] | 433 |
|
---|
| 434 | /**
|
---|
| 435 | * Shutdown the heap.
|
---|
| 436 | */
|
---|
[68654] | 437 | DECLR0VBGL(void) VbglR0PhysHeapTerminate(void);
|
---|
[1] | 438 |
|
---|
| 439 | /**
|
---|
| 440 | * Allocate a memory block.
|
---|
| 441 | *
|
---|
[58154] | 442 | * @returns Virtual address of the allocated memory block.
|
---|
[58212] | 443 | * @param cbSize Size of block to be allocated.
|
---|
[1] | 444 | */
|
---|
[68654] | 445 | DECLR0VBGL(void *) VbglR0PhysHeapAlloc(uint32_t cbSize);
|
---|
[1] | 446 |
|
---|
| 447 | /**
|
---|
[58154] | 448 | * Get physical address of memory block pointed by the virtual address.
|
---|
[1] | 449 | *
|
---|
| 450 | * @note WARNING!
|
---|
| 451 | * The function does not acquire the Heap mutex!
|
---|
[58154] | 452 | * When calling the function make sure that the pointer is a valid one and
|
---|
| 453 | * is not being deallocated. This function can NOT be used for verifying
|
---|
| 454 | * if the given pointer is a valid one allocated from the heap.
|
---|
[1] | 455 | *
|
---|
[58154] | 456 | * @param pv Virtual address of memory block.
|
---|
| 457 | * @returns Physical address of the memory block.
|
---|
[1] | 458 | */
|
---|
[68654] | 459 | DECLR0VBGL(uint32_t) VbglR0PhysHeapGetPhysAddr(void *pv);
|
---|
[1] | 460 |
|
---|
| 461 | /**
|
---|
| 462 | * Free a memory block.
|
---|
| 463 | *
|
---|
[58154] | 464 | * @param pv Virtual address of memory block.
|
---|
[1] | 465 | */
|
---|
[68654] | 466 | DECLR0VBGL(void) VbglR0PhysHeapFree(void *pv);
|
---|
[1] | 467 |
|
---|
[68654] | 468 | DECLR0VBGL(int) VbglR0QueryVMMDevMemory(struct VMMDevMemory **ppVMMDevMemory);
|
---|
[68630] | 469 | DECLR0VBGL(bool) VbglR0CanUsePhysPageList(void);
|
---|
[1] | 470 |
|
---|
[41852] | 471 | # ifndef VBOX_GUEST
|
---|
| 472 | /** @name Mouse
|
---|
| 473 | * @{ */
|
---|
[68654] | 474 | DECLR0VBGL(int) VbglR0SetMouseNotifyCallback(PFNVBOXGUESTMOUSENOTIFY pfnNotify, void *pvUser);
|
---|
| 475 | DECLR0VBGL(int) VbglR0GetMouseStatus(uint32_t *pfFeatures, uint32_t *px, uint32_t *py);
|
---|
| 476 | DECLR0VBGL(int) VbglR0SetMouseStatus(uint32_t fFeatures);
|
---|
[41852] | 477 | /** @} */
|
---|
| 478 | # endif /* VBOX_GUEST */
|
---|
| 479 |
|
---|
[68670] | 480 | #endif /* IN_RING0 */
|
---|
[58181] | 481 |
|
---|
[21211] | 482 | /** @} */
|
---|
| 483 |
|
---|
| 484 |
|
---|
[58111] | 485 | /** @defgroup grp_vboxguest_lib_r3 Ring-3 interface.
|
---|
[21211] | 486 | * @{
|
---|
| 487 | */
|
---|
| 488 | #ifdef IN_RING3
|
---|
| 489 |
|
---|
| 490 | /** @def VBGLR3DECL
|
---|
| 491 | * Ring 3 VBGL declaration.
|
---|
| 492 | * @param type The return type of the function declaration.
|
---|
| 493 | */
|
---|
[59163] | 494 | # define VBGLR3DECL(type) DECLHIDDEN(type) VBOXCALL
|
---|
[21211] | 495 |
|
---|
| 496 | /** @name General-purpose functions
|
---|
| 497 | * @{ */
|
---|
| 498 | VBGLR3DECL(int) VbglR3Init(void);
|
---|
| 499 | VBGLR3DECL(int) VbglR3InitUser(void);
|
---|
| 500 | VBGLR3DECL(void) VbglR3Term(void);
|
---|
| 501 | # ifdef ___iprt_time_h
|
---|
| 502 | VBGLR3DECL(int) VbglR3GetHostTime(PRTTIMESPEC pTime);
|
---|
| 503 | # endif
|
---|
| 504 | VBGLR3DECL(int) VbglR3InterruptEventWaits(void);
|
---|
[27083] | 505 | VBGLR3DECL(int) VbglR3WriteLog(const char *pch, size_t cch);
|
---|
[21211] | 506 | VBGLR3DECL(int) VbglR3CtlFilterMask(uint32_t fOr, uint32_t fNot);
|
---|
[54010] | 507 | VBGLR3DECL(int) VbglR3Daemonize(bool fNoChDir, bool fNoClose, bool fRespawn, unsigned *pcRespawn);
|
---|
[21211] | 508 | VBGLR3DECL(int) VbglR3PidFile(const char *pszPath, PRTFILE phFile);
|
---|
| 509 | VBGLR3DECL(void) VbglR3ClosePidFile(const char *pszPath, RTFILE hFile);
|
---|
| 510 | VBGLR3DECL(int) VbglR3SetGuestCaps(uint32_t fOr, uint32_t fNot);
|
---|
[67314] | 511 | VBGLR3DECL(int) VbglR3AcquireGuestCaps(uint32_t fOr, uint32_t fNot, bool fConfig);
|
---|
[21978] | 512 | VBGLR3DECL(int) VbglR3WaitEvent(uint32_t fMask, uint32_t cMillies, uint32_t *pfEvents);
|
---|
[30758] | 513 |
|
---|
[58154] | 514 | VBGLR3DECL(int) VbglR3ReportAdditionsStatus(VBoxGuestFacilityType Facility, VBoxGuestFacilityStatus StatusCurrent,
|
---|
| 515 | uint32_t fFlags);
|
---|
[37019] | 516 | VBGLR3DECL(int) VbglR3GetAdditionsVersion(char **ppszVer, char **ppszVerEx, char **ppszRev);
|
---|
[24686] | 517 | VBGLR3DECL(int) VbglR3GetAdditionsInstallationPath(char **ppszPath);
|
---|
[30668] | 518 | VBGLR3DECL(int) VbglR3GetSessionId(uint64_t *pu64IdSession);
|
---|
| 519 |
|
---|
[21211] | 520 | /** @} */
|
---|
| 521 |
|
---|
| 522 | /** @name Shared clipboard
|
---|
| 523 | * @{ */
|
---|
[58183] | 524 | VBGLR3DECL(int) VbglR3ClipboardConnect(HGCMCLIENTID *pidClient);
|
---|
| 525 | VBGLR3DECL(int) VbglR3ClipboardDisconnect(HGCMCLIENTID idClient);
|
---|
| 526 | VBGLR3DECL(int) VbglR3ClipboardGetHostMsg(HGCMCLIENTID idClient, uint32_t *pMsg, uint32_t *pfFormats);
|
---|
| 527 | VBGLR3DECL(int) VbglR3ClipboardReadData(HGCMCLIENTID idClient, uint32_t fFormat, void *pv, uint32_t cb, uint32_t *pcb);
|
---|
| 528 | VBGLR3DECL(int) VbglR3ClipboardReportFormats(HGCMCLIENTID idClient, uint32_t fFormats);
|
---|
| 529 | VBGLR3DECL(int) VbglR3ClipboardWriteData(HGCMCLIENTID idClient, uint32_t fFormat, void *pv, uint32_t cb);
|
---|
[21211] | 530 | /** @} */
|
---|
| 531 |
|
---|
| 532 | /** @name Seamless mode
|
---|
| 533 | * @{ */
|
---|
| 534 | VBGLR3DECL(int) VbglR3SeamlessSetCap(bool fState);
|
---|
| 535 | VBGLR3DECL(int) VbglR3SeamlessWaitEvent(VMMDevSeamlessMode *pMode);
|
---|
| 536 | VBGLR3DECL(int) VbglR3SeamlessSendRects(uint32_t cRects, PRTRECT pRects);
|
---|
[27314] | 537 | VBGLR3DECL(int) VbglR3SeamlessGetLastEvent(VMMDevSeamlessMode *pMode);
|
---|
| 538 |
|
---|
[21211] | 539 | /** @} */
|
---|
| 540 |
|
---|
| 541 | /** @name Mouse
|
---|
| 542 | * @{ */
|
---|
| 543 | VBGLR3DECL(int) VbglR3GetMouseStatus(uint32_t *pfFeatures, uint32_t *px, uint32_t *py);
|
---|
| 544 | VBGLR3DECL(int) VbglR3SetMouseStatus(uint32_t fFeatures);
|
---|
| 545 | /** @} */
|
---|
| 546 |
|
---|
| 547 | /** @name Video
|
---|
| 548 | * @{ */
|
---|
| 549 | VBGLR3DECL(int) VbglR3VideoAccelEnable(bool fEnable);
|
---|
| 550 | VBGLR3DECL(int) VbglR3VideoAccelFlush(void);
|
---|
[58154] | 551 | VBGLR3DECL(int) VbglR3SetPointerShape(uint32_t fFlags, uint32_t xHot, uint32_t yHot, uint32_t cx, uint32_t cy,
|
---|
| 552 | const void *pvImg, size_t cbImg);
|
---|
[21227] | 553 | VBGLR3DECL(int) VbglR3SetPointerShapeReq(struct VMMDevReqMousePointer *pReq);
|
---|
[21211] | 554 | /** @} */
|
---|
| 555 |
|
---|
| 556 | /** @name Display
|
---|
| 557 | * @{ */
|
---|
[52893] | 558 | /** The folder for the video mode hint unix domain socket on Unix-like guests.
|
---|
[58154] | 559 | * @note This can be safely changed as all users are rebuilt in lock-step. */
|
---|
[68628] | 560 | #define VBGLR3HOSTDISPSOCKETPATH "/tmp/.VBoxService"
|
---|
[52893] | 561 | /** The path to the video mode hint unix domain socket on Unix-like guests. */
|
---|
[58154] | 562 | #define VBGLR3HOSTDISPSOCKET VBGLR3VIDEOMODEHINTSOCKETPATH "/VideoModeHint"
|
---|
[52893] | 563 |
|
---|
[52956] | 564 | /** The folder for saving video mode hints to between sessions. */
|
---|
| 565 | #define VBGLR3HOSTDISPSAVEDMODEPATH "/var/lib/VBoxGuestAdditions"
|
---|
| 566 | /** The path to the file for saving video mode hints to between sessions. */
|
---|
[58154] | 567 | #define VBGLR3HOSTDISPSAVEDMODE VBGLR3HOSTDISPSAVEDMODEPATH "/SavedVideoModes"
|
---|
[52956] | 568 |
|
---|
[58154] | 569 | VBGLR3DECL(int) VbglR3GetDisplayChangeRequest(uint32_t *pcx, uint32_t *pcy, uint32_t *pcBits, uint32_t *piDisplay,
|
---|
| 570 | uint32_t *pdx, uint32_t *pdy, bool *pfEnabled, bool *pfChangeOrigin, bool fAck);
|
---|
[72352] | 571 | VBGLR3DECL(int) VbglR3GetDisplayChangeRequestMulti(uint32_t cDisplaysIn, uint32_t *pcDisplaysOut,
|
---|
| 572 | VMMDevDisplayDef *paDisplays, bool fAck);
|
---|
[21211] | 573 | VBGLR3DECL(bool) VbglR3HostLikesVideoMode(uint32_t cx, uint32_t cy, uint32_t cBits);
|
---|
[52189] | 574 | VBGLR3DECL(int) VbglR3VideoModeGetHighestSavedScreen(unsigned *pcScreen);
|
---|
[58154] | 575 | VBGLR3DECL(int) VbglR3SaveVideoMode(unsigned cScreen, unsigned cx, unsigned cy, unsigned cBits,
|
---|
| 576 | unsigned x, unsigned y, bool fEnabled);
|
---|
| 577 | VBGLR3DECL(int) VbglR3RetrieveVideoMode(unsigned cScreen, unsigned *pcx, unsigned *pcy, unsigned *pcBits,
|
---|
| 578 | unsigned *px, unsigned *py, bool *pfEnabled);
|
---|
[68550] | 579 | /** @} */
|
---|
[21211] | 580 |
|
---|
[68436] | 581 | /** @name VRDP
|
---|
| 582 | * @{ */
|
---|
| 583 | VBGLR3DECL(int) VbglR3VrdpGetChangeRequest(bool *pfActive, uint32_t *puExperienceLevel);
|
---|
| 584 | /** @} */
|
---|
| 585 |
|
---|
[26325] | 586 | /** @name VM Statistics
|
---|
| 587 | * @{ */
|
---|
[27080] | 588 | VBGLR3DECL(int) VbglR3StatQueryInterval(uint32_t *pu32Interval);
|
---|
[68630] | 589 | # if defined(___VBox_VMMDev_h) || defined(DOXYGEN_RUNNING)
|
---|
[27080] | 590 | VBGLR3DECL(int) VbglR3StatReport(VMMDevReportGuestStats *pReq);
|
---|
[68630] | 591 | # endif
|
---|
[26325] | 592 | /** @} */
|
---|
| 593 |
|
---|
| 594 | /** @name Memory ballooning
|
---|
| 595 | * @{ */
|
---|
[27080] | 596 | VBGLR3DECL(int) VbglR3MemBalloonRefresh(uint32_t *pcChunks, bool *pfHandleInR3);
|
---|
| 597 | VBGLR3DECL(int) VbglR3MemBalloonChange(void *pv, bool fInflate);
|
---|
[26325] | 598 | /** @} */
|
---|
| 599 |
|
---|
[32574] | 600 | /** @name Core Dump
|
---|
| 601 | * @{ */
|
---|
| 602 | VBGLR3DECL(int) VbglR3WriteCoreDump(void);
|
---|
| 603 |
|
---|
| 604 | /** @} */
|
---|
| 605 |
|
---|
[21211] | 606 | # ifdef VBOX_WITH_GUEST_PROPS
|
---|
| 607 | /** @name Guest properties
|
---|
| 608 | * @{ */
|
---|
| 609 | /** @todo Docs. */
|
---|
| 610 | typedef struct VBGLR3GUESTPROPENUM VBGLR3GUESTPROPENUM;
|
---|
| 611 | /** @todo Docs. */
|
---|
| 612 | typedef VBGLR3GUESTPROPENUM *PVBGLR3GUESTPROPENUM;
|
---|
[58154] | 613 | VBGLR3DECL(int) VbglR3GuestPropConnect(uint32_t *pidClient);
|
---|
[58183] | 614 | VBGLR3DECL(int) VbglR3GuestPropDisconnect(HGCMCLIENTID idClient);
|
---|
| 615 | VBGLR3DECL(int) VbglR3GuestPropWrite(HGCMCLIENTID idClient, const char *pszName, const char *pszValue, const char *pszFlags);
|
---|
| 616 | VBGLR3DECL(int) VbglR3GuestPropWriteValue(HGCMCLIENTID idClient, const char *pszName, const char *pszValue);
|
---|
| 617 | VBGLR3DECL(int) VbglR3GuestPropWriteValueV(HGCMCLIENTID idClient, const char *pszName,
|
---|
[57006] | 618 | const char *pszValueFormat, va_list va) RT_IPRT_FORMAT_ATTR(3, 0);
|
---|
[58183] | 619 | VBGLR3DECL(int) VbglR3GuestPropWriteValueF(HGCMCLIENTID idClient, const char *pszName,
|
---|
[57006] | 620 | const char *pszValueFormat, ...) RT_IPRT_FORMAT_ATTR(3, 4);
|
---|
[58183] | 621 | VBGLR3DECL(int) VbglR3GuestPropRead(HGCMCLIENTID idClient, const char *pszName, void *pvBuf, uint32_t cbBuf, char **ppszValue,
|
---|
[58154] | 622 | uint64_t *pu64Timestamp, char **ppszFlags, uint32_t *pcbBufActual);
|
---|
| 623 | VBGLR3DECL(int) VbglR3GuestPropReadValue(uint32_t ClientId, const char *pszName, char *pszValue, uint32_t cchValue,
|
---|
| 624 | uint32_t *pcchValueActual);
|
---|
[58183] | 625 | VBGLR3DECL(int) VbglR3GuestPropReadValueAlloc(HGCMCLIENTID idClient, const char *pszName, char **ppszValue);
|
---|
[21211] | 626 | VBGLR3DECL(void) VbglR3GuestPropReadValueFree(char *pszValue);
|
---|
[58183] | 627 | VBGLR3DECL(int) VbglR3GuestPropEnumRaw(HGCMCLIENTID idClient, const char *paszPatterns, char *pcBuf, uint32_t cbBuf,
|
---|
[58154] | 628 | uint32_t *pcbBufActual);
|
---|
[58183] | 629 | VBGLR3DECL(int) VbglR3GuestPropEnum(HGCMCLIENTID idClient, char const * const *ppaszPatterns, uint32_t cPatterns,
|
---|
[58154] | 630 | PVBGLR3GUESTPROPENUM *ppHandle, char const **ppszName, char const **ppszValue,
|
---|
| 631 | uint64_t *pu64Timestamp, char const **ppszFlags);
|
---|
| 632 | VBGLR3DECL(int) VbglR3GuestPropEnumNext(PVBGLR3GUESTPROPENUM pHandle, char const **ppszName, char const **ppszValue,
|
---|
| 633 | uint64_t *pu64Timestamp, char const **ppszFlags);
|
---|
[21211] | 634 | VBGLR3DECL(void) VbglR3GuestPropEnumFree(PVBGLR3GUESTPROPENUM pHandle);
|
---|
[58183] | 635 | VBGLR3DECL(int) VbglR3GuestPropDelete(HGCMCLIENTID idClient, const char *pszName);
|
---|
| 636 | VBGLR3DECL(int) VbglR3GuestPropDelSet(HGCMCLIENTID idClient, char const * const *papszPatterns, uint32_t cPatterns);
|
---|
| 637 | VBGLR3DECL(int) VbglR3GuestPropWait(HGCMCLIENTID idClient, const char *pszPatterns, void *pvBuf, uint32_t cbBuf,
|
---|
[58154] | 638 | uint64_t u64Timestamp, uint32_t cMillies, char ** ppszName, char **ppszValue,
|
---|
| 639 | uint64_t *pu64Timestamp, char **ppszFlags, uint32_t *pcbBufActual);
|
---|
[21211] | 640 | /** @} */
|
---|
[23856] | 641 |
|
---|
[47294] | 642 | /** @name Guest user handling / reporting.
|
---|
| 643 | * @{ */
|
---|
[58154] | 644 | VBGLR3DECL(int) VbglR3GuestUserReportState(const char *pszUser, const char *pszDomain, VBoxGuestUserState enmState,
|
---|
| 645 | uint8_t *pbDetails, uint32_t cbDetails);
|
---|
[47294] | 646 | /** @} */
|
---|
| 647 |
|
---|
[23856] | 648 | /** @name Host version handling
|
---|
| 649 | * @{ */
|
---|
[58183] | 650 | VBGLR3DECL(int) VbglR3HostVersionCheckForUpdate(HGCMCLIENTID idClient, bool *pfUpdate, char **ppszHostVersion,
|
---|
[58154] | 651 | char **ppszGuestVersion);
|
---|
[58183] | 652 | VBGLR3DECL(int) VbglR3HostVersionLastCheckedLoad(HGCMCLIENTID idClient, char **ppszVer);
|
---|
| 653 | VBGLR3DECL(int) VbglR3HostVersionLastCheckedStore(HGCMCLIENTID idClient, const char *pszVer);
|
---|
[23856] | 654 | /** @} */
|
---|
[21211] | 655 | # endif /* VBOX_WITH_GUEST_PROPS defined */
|
---|
| 656 |
|
---|
[31002] | 657 | # ifdef VBOX_WITH_SHARED_FOLDERS
|
---|
| 658 | /** @name Shared folders
|
---|
| 659 | * @{ */
|
---|
| 660 | /**
|
---|
| 661 | * Structure containing mapping information for a shared folder.
|
---|
| 662 | */
|
---|
[31025] | 663 | typedef struct VBGLR3SHAREDFOLDERMAPPING
|
---|
[31002] | 664 | {
|
---|
| 665 | /** Mapping status. */
|
---|
| 666 | uint32_t u32Status;
|
---|
| 667 | /** Root handle. */
|
---|
| 668 | uint32_t u32Root;
|
---|
[31025] | 669 | } VBGLR3SHAREDFOLDERMAPPING;
|
---|
[58029] | 670 | /** Pointer to a shared folder mapping information structure. */
|
---|
[31002] | 671 | typedef VBGLR3SHAREDFOLDERMAPPING *PVBGLR3SHAREDFOLDERMAPPING;
|
---|
[58029] | 672 | /** Pointer to a const shared folder mapping information structure. */
|
---|
| 673 | typedef VBGLR3SHAREDFOLDERMAPPING const *PCVBGLR3SHAREDFOLDERMAPPING;
|
---|
[31025] | 674 |
|
---|
[58154] | 675 | VBGLR3DECL(int) VbglR3SharedFolderConnect(uint32_t *pidClient);
|
---|
[58183] | 676 | VBGLR3DECL(int) VbglR3SharedFolderDisconnect(HGCMCLIENTID idClient);
|
---|
| 677 | VBGLR3DECL(bool) VbglR3SharedFolderExists(HGCMCLIENTID idClient, const char *pszShareName);
|
---|
| 678 | VBGLR3DECL(int) VbglR3SharedFolderGetMappings(HGCMCLIENTID idClient, bool fAutoMountOnly,
|
---|
[31052] | 679 | PVBGLR3SHAREDFOLDERMAPPING *ppaMappings, uint32_t *pcMappings);
|
---|
| 680 | VBGLR3DECL(void) VbglR3SharedFolderFreeMappings(PVBGLR3SHAREDFOLDERMAPPING paMappings);
|
---|
[58183] | 681 | VBGLR3DECL(int) VbglR3SharedFolderGetName(HGCMCLIENTID idClient,uint32_t u32Root, char **ppszName);
|
---|
[31355] | 682 | VBGLR3DECL(int) VbglR3SharedFolderGetMountPrefix(char **ppszPrefix);
|
---|
[35016] | 683 | VBGLR3DECL(int) VbglR3SharedFolderGetMountDir(char **ppszDir);
|
---|
[31002] | 684 | /** @} */
|
---|
| 685 | # endif /* VBOX_WITH_SHARED_FOLDERS defined */
|
---|
| 686 |
|
---|
[27703] | 687 | # ifdef VBOX_WITH_GUEST_CONTROL
|
---|
[26698] | 688 | /** @name Guest control
|
---|
| 689 | * @{ */
|
---|
[44863] | 690 |
|
---|
| 691 | /**
|
---|
[45109] | 692 | * Structure containing the context required for
|
---|
| 693 | * either retrieving or sending a HGCM guest control
|
---|
[55422] | 694 | * commands from or to the host.
|
---|
[45109] | 695 | *
|
---|
| 696 | * Note: Do not change parameter order without also
|
---|
| 697 | * adapting all structure initializers.
|
---|
[44863] | 698 | */
|
---|
[45109] | 699 | typedef struct VBGLR3GUESTCTRLCMDCTX
|
---|
[44863] | 700 | {
|
---|
[47556] | 701 | /** @todo This struct could be handy if we want to implement
|
---|
| 702 | * a second communication channel, e.g. via TCP/IP.
|
---|
| 703 | * Use a union for the HGCM stuff then. */
|
---|
| 704 |
|
---|
[45109] | 705 | /** IN: HGCM client ID to use for
|
---|
| 706 | * communication. */
|
---|
[44863] | 707 | uint32_t uClientID;
|
---|
[45109] | 708 | /** IN/OUT: Context ID to retrieve
|
---|
| 709 | * or to use. */
|
---|
| 710 | uint32_t uContextID;
|
---|
[44863] | 711 | /** IN: Protocol version to use. */
|
---|
| 712 | uint32_t uProtocol;
|
---|
[45109] | 713 | /** OUT: Number of parameters retrieved. */
|
---|
[44863] | 714 | uint32_t uNumParms;
|
---|
[45109] | 715 | } VBGLR3GUESTCTRLCMDCTX, *PVBGLR3GUESTCTRLCMDCTX;
|
---|
[44863] | 716 |
|
---|
| 717 | /* General message handling on the guest. */
|
---|
[58154] | 718 | VBGLR3DECL(int) VbglR3GuestCtrlConnect(uint32_t *pidClient);
|
---|
[68462] | 719 | VBGLR3DECL(int) VbglR3GuestCtrlDisconnect(uint32_t idClient);
|
---|
[47697] | 720 | VBGLR3DECL(int) VbglR3GuestCtrlMsgFilterSet(uint32_t uClientId, uint32_t uValue, uint32_t uMaskAdd, uint32_t uMaskRemove);
|
---|
[47620] | 721 | VBGLR3DECL(int) VbglR3GuestCtrlMsgFilterUnset(uint32_t uClientId);
|
---|
[49349] | 722 | VBGLR3DECL(int) VbglR3GuestCtrlMsgReply(PVBGLR3GUESTCTRLCMDCTX pCtx, int rc);
|
---|
[58154] | 723 | VBGLR3DECL(int) VbglR3GuestCtrlMsgReplyEx(PVBGLR3GUESTCTRLCMDCTX pCtx, int rc, uint32_t uType,
|
---|
| 724 | void *pvPayload, uint32_t cbPayload);
|
---|
[49349] | 725 | VBGLR3DECL(int) VbglR3GuestCtrlMsgSkip(uint32_t uClientId);
|
---|
[44863] | 726 | VBGLR3DECL(int) VbglR3GuestCtrlMsgWaitFor(uint32_t uClientId, uint32_t *puMsg, uint32_t *puNumParms);
|
---|
[58183] | 727 | VBGLR3DECL(int) VbglR3GuestCtrlCancelPendingWaits(HGCMCLIENTID idClient);
|
---|
[44863] | 728 | /* Guest session handling. */
|
---|
[58154] | 729 | VBGLR3DECL(int) VbglR3GuestCtrlSessionClose(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t fFlags);
|
---|
[45109] | 730 | VBGLR3DECL(int) VbglR3GuestCtrlSessionNotify(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uType, uint32_t uResult);
|
---|
[58154] | 731 | VBGLR3DECL(int) VbglR3GuestCtrlSessionGetOpen(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puProtocol, char *pszUser, uint32_t cbUser,
|
---|
| 732 | char *pszPassword, uint32_t cbPassword, char *pszDomain, uint32_t cbDomain,
|
---|
[58204] | 733 | uint32_t *pfFlags, uint32_t *pidSession);
|
---|
| 734 | VBGLR3DECL(int) VbglR3GuestCtrlSessionGetClose(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *pfFlags, uint32_t *pidSession);
|
---|
[49349] | 735 | /* Guest path handling. */
|
---|
[58154] | 736 | VBGLR3DECL(int) VbglR3GuestCtrlPathGetRename(PVBGLR3GUESTCTRLCMDCTX pCtx, char *pszSource, uint32_t cbSource, char *pszDest,
|
---|
| 737 | uint32_t cbDest, uint32_t *pfFlags);
|
---|
[71364] | 738 | VBGLR3DECL(int) VbglR3GuestCtrlPathGetUserDocuments(PVBGLR3GUESTCTRLCMDCTX pCtx);
|
---|
| 739 | VBGLR3DECL(int) VbglR3GuestCtrlPathGetUserHome(PVBGLR3GUESTCTRLCMDCTX pCtx);
|
---|
[44863] | 740 | /* Guest process execution. */
|
---|
[58154] | 741 | VBGLR3DECL(int) VbglR3GuestCtrlProcGetStart(PVBGLR3GUESTCTRLCMDCTX pCtx, char *pszCmd, uint32_t cbCmd, uint32_t *pfFlags,
|
---|
| 742 | char *pszArgs, uint32_t cbArgs, uint32_t *puNumArgs, char *pszEnv, uint32_t *pcbEnv,
|
---|
| 743 | uint32_t *puNumEnvVars, char *pszUser, uint32_t cbUser, char *pszPassword,
|
---|
| 744 | uint32_t cbPassword, uint32_t *puTimeoutMS, uint32_t *puPriority,
|
---|
| 745 | uint64_t *puAffinity, uint32_t cbAffinity, uint32_t *pcAffinity);
|
---|
[45109] | 746 | VBGLR3DECL(int) VbglR3GuestCtrlProcGetTerminate(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puPID);
|
---|
[58154] | 747 | VBGLR3DECL(int) VbglR3GuestCtrlProcGetInput(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puPID, uint32_t *pfFlags, void *pvData,
|
---|
| 748 | uint32_t cbData, uint32_t *pcbSize);
|
---|
| 749 | VBGLR3DECL(int) VbglR3GuestCtrlProcGetOutput(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puPID, uint32_t *puHandle, uint32_t *pfFlags);
|
---|
| 750 | VBGLR3DECL(int) VbglR3GuestCtrlProcGetWaitFor(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puPID, uint32_t *puWaitFlags,
|
---|
| 751 | uint32_t *puTimeoutMS);
|
---|
[49349] | 752 | /* Guest native directory handling. */
|
---|
[58154] | 753 | VBGLR3DECL(int) VbglR3GuestCtrlDirGetRemove(PVBGLR3GUESTCTRLCMDCTX pCtx, char *pszPath, uint32_t cbPath, uint32_t *pfFlags);
|
---|
[44863] | 754 | /* Guest native file handling. */
|
---|
[58154] | 755 | VBGLR3DECL(int) VbglR3GuestCtrlFileGetOpen(PVBGLR3GUESTCTRLCMDCTX pCtx, char *pszFileName, uint32_t cbFileName, char *pszOpenMode,
|
---|
| 756 | uint32_t cbOpenMode, char *pszDisposition, uint32_t cbDisposition, char *pszSharing,
|
---|
| 757 | uint32_t cbSharing, uint32_t *puCreationMode, uint64_t *puOffset);
|
---|
[45109] | 758 | VBGLR3DECL(int) VbglR3GuestCtrlFileGetClose(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle);
|
---|
| 759 | VBGLR3DECL(int) VbglR3GuestCtrlFileGetRead(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle, uint32_t *puToRead);
|
---|
[58154] | 760 | VBGLR3DECL(int) VbglR3GuestCtrlFileGetReadAt(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle,
|
---|
| 761 | uint32_t *puToRead, uint64_t *poffRead);
|
---|
| 762 | VBGLR3DECL(int) VbglR3GuestCtrlFileGetWrite(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle,
|
---|
| 763 | void *pvData, uint32_t cbData, uint32_t *pcbActual);
|
---|
| 764 | VBGLR3DECL(int) VbglR3GuestCtrlFileGetWriteAt(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle, void *pvData, uint32_t cbData,
|
---|
| 765 | uint32_t *pcbActual, uint64_t *poffWrite);
|
---|
| 766 | VBGLR3DECL(int) VbglR3GuestCtrlFileGetSeek(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle,
|
---|
| 767 | uint32_t *puSeekMethod, uint64_t *poffSeek);
|
---|
[45109] | 768 | VBGLR3DECL(int) VbglR3GuestCtrlFileGetTell(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle);
|
---|
[44863] | 769 | /* Guest -> Host. */
|
---|
[45109] | 770 | VBGLR3DECL(int) VbglR3GuestCtrlFileCbOpen(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, uint32_t uFileHandle);
|
---|
| 771 | VBGLR3DECL(int) VbglR3GuestCtrlFileCbClose(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc);
|
---|
[47817] | 772 | VBGLR3DECL(int) VbglR3GuestCtrlFileCbError(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc);
|
---|
[45109] | 773 | VBGLR3DECL(int) VbglR3GuestCtrlFileCbRead(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, void *pvData, uint32_t cbData);
|
---|
| 774 | VBGLR3DECL(int) VbglR3GuestCtrlFileCbWrite(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, uint32_t uWritten);
|
---|
| 775 | VBGLR3DECL(int) VbglR3GuestCtrlFileCbSeek(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, uint64_t uOffActual);
|
---|
| 776 | VBGLR3DECL(int) VbglR3GuestCtrlFileCbTell(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, uint64_t uOffActual);
|
---|
[58154] | 777 | VBGLR3DECL(int) VbglR3GuestCtrlProcCbStatus(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uPID, uint32_t uStatus, uint32_t fFlags,
|
---|
| 778 | void *pvData, uint32_t cbData);
|
---|
| 779 | VBGLR3DECL(int) VbglR3GuestCtrlProcCbOutput(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uPID, uint32_t uHandle, uint32_t fFlags,
|
---|
| 780 | void *pvData, uint32_t cbData);
|
---|
| 781 | VBGLR3DECL(int) VbglR3GuestCtrlProcCbStatusInput(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t u32PID, uint32_t uStatus,
|
---|
| 782 | uint32_t fFlags, uint32_t cbWritten);
|
---|
[44863] | 783 |
|
---|
[26698] | 784 | /** @} */
|
---|
[27703] | 785 | # endif /* VBOX_WITH_GUEST_CONTROL defined */
|
---|
[26698] | 786 |
|
---|
[40211] | 787 | /** @name Auto-logon handling
|
---|
| 788 | * @{ */
|
---|
| 789 | VBGLR3DECL(int) VbglR3AutoLogonReportStatus(VBoxGuestFacilityStatus enmStatus);
|
---|
| 790 | VBGLR3DECL(bool) VbglR3AutoLogonIsRemoteSession(void);
|
---|
| 791 | /** @} */
|
---|
| 792 |
|
---|
[24259] | 793 | /** @name User credentials handling
|
---|
| 794 | * @{ */
|
---|
[26380] | 795 | VBGLR3DECL(int) VbglR3CredentialsQueryAvailability(void);
|
---|
[24259] | 796 | VBGLR3DECL(int) VbglR3CredentialsRetrieve(char **ppszUser, char **ppszPassword, char **ppszDomain);
|
---|
[40211] | 797 | VBGLR3DECL(int) VbglR3CredentialsRetrieveUtf16(PRTUTF16 *ppwszUser, PRTUTF16 *ppwszPassword, PRTUTF16 *ppwszDomain);
|
---|
[26243] | 798 | VBGLR3DECL(void) VbglR3CredentialsDestroy(char *pszUser, char *pszPassword, char *pszDomain, uint32_t cPasses);
|
---|
[40211] | 799 | VBGLR3DECL(void) VbglR3CredentialsDestroyUtf16(PRTUTF16 pwszUser, PRTUTF16 pwszPassword, PRTUTF16 pwszDomain,
|
---|
| 800 | uint32_t cPasses);
|
---|
[24259] | 801 | /** @} */
|
---|
| 802 |
|
---|
[25975] | 803 | /** @name CPU hotplug monitor
|
---|
| 804 | * @{ */
|
---|
[26061] | 805 | VBGLR3DECL(int) VbglR3CpuHotPlugInit(void);
|
---|
| 806 | VBGLR3DECL(int) VbglR3CpuHotPlugTerm(void);
|
---|
| 807 | VBGLR3DECL(int) VbglR3CpuHotPlugWaitForEvent(VMMDevCpuEventType *penmEventType, uint32_t *pidCpuCore, uint32_t *pidCpuPackage);
|
---|
[25975] | 808 | /** @} */
|
---|
| 809 |
|
---|
[28404] | 810 | /** @name Page sharing
|
---|
| 811 | * @{ */
|
---|
[68630] | 812 | struct VMMDEVSHAREDREGIONDESC;
|
---|
[58154] | 813 | VBGLR3DECL(int) VbglR3RegisterSharedModule(char *pszModuleName, char *pszVersion, RTGCPTR64 GCBaseAddr, uint32_t cbModule,
|
---|
[68630] | 814 | unsigned cRegions, struct VMMDEVSHAREDREGIONDESC *pRegions);
|
---|
[28408] | 815 | VBGLR3DECL(int) VbglR3UnregisterSharedModule(char *pszModuleName, char *pszVersion, RTGCPTR64 GCBaseAddr, uint32_t cbModule);
|
---|
[28441] | 816 | VBGLR3DECL(int) VbglR3CheckSharedModules(void);
|
---|
[29307] | 817 | VBGLR3DECL(bool) VbglR3PageSharingIsEnabled(void);
|
---|
[30061] | 818 | VBGLR3DECL(int) VbglR3PageIsShared(RTGCPTR pPage, bool *pfShared, uint64_t *puPageFlags);
|
---|
[28404] | 819 | /** @} */
|
---|
| 820 |
|
---|
[39454] | 821 | # ifdef VBOX_WITH_DRAG_AND_DROP
|
---|
| 822 | /** @name Drag and Drop
|
---|
| 823 | * @{ */
|
---|
[55422] | 824 | /**
|
---|
| 825 | * Structure containing the context required for
|
---|
| 826 | * either retrieving or sending a HGCM guest drag'n drop
|
---|
| 827 | * commands from or to the host.
|
---|
| 828 | *
|
---|
| 829 | * Note: Do not change parameter order without also
|
---|
| 830 | * adapting all structure initializers.
|
---|
| 831 | */
|
---|
| 832 | typedef struct VBGLR3GUESTDNDCMDCTX
|
---|
| 833 | {
|
---|
| 834 | /** @todo This struct could be handy if we want to implement
|
---|
| 835 | * a second communication channel, e.g. via TCP/IP.
|
---|
| 836 | * Use a union for the HGCM stuff then. */
|
---|
| 837 |
|
---|
[58371] | 838 | /** HGCM client ID to use for communication. */
|
---|
[55422] | 839 | uint32_t uClientID;
|
---|
[58371] | 840 | /** The VM's current session ID. */
|
---|
| 841 | uint64_t uSessionID;
|
---|
| 842 | /** Protocol version to use. */
|
---|
[55422] | 843 | uint32_t uProtocol;
|
---|
[58371] | 844 | /** Number of parameters retrieved for the current command. */
|
---|
[55422] | 845 | uint32_t uNumParms;
|
---|
[58371] | 846 | /** Max chunk size (in bytes) for data transfers. */
|
---|
[58212] | 847 | uint32_t cbMaxChunkSize;
|
---|
[55422] | 848 | } VBGLR3GUESTDNDCMDCTX, *PVBGLR3GUESTDNDCMDCTX;
|
---|
| 849 |
|
---|
[39454] | 850 | typedef struct VBGLR3DNDHGCMEVENT
|
---|
| 851 | {
|
---|
[55422] | 852 | uint32_t uType; /** The event type this struct contains. */
|
---|
| 853 | uint32_t uScreenId; /** Screen ID this request belongs to. */
|
---|
| 854 | char *pszFormats; /** Format list (\r\n separated). */
|
---|
[58212] | 855 | uint32_t cbFormats; /** Size (in bytes) of pszFormats (\0 included). */
|
---|
[39454] | 856 | union
|
---|
| 857 | {
|
---|
| 858 | struct
|
---|
| 859 | {
|
---|
[55422] | 860 | uint32_t uXpos; /** X position of guest screen. */
|
---|
| 861 | uint32_t uYpos; /** Y position of guest screen. */
|
---|
| 862 | uint32_t uDefAction; /** Proposed DnD action. */
|
---|
| 863 | uint32_t uAllActions; /** Allowed DnD actions. */
|
---|
| 864 | } a; /** Values used in init, move and drop event type. */
|
---|
[39454] | 865 | struct
|
---|
| 866 | {
|
---|
[55422] | 867 | void *pvData; /** Data request. */
|
---|
[58212] | 868 | uint32_t cbData; /** Size (in bytes) of pvData. */
|
---|
[55422] | 869 | } b; /** Values used in drop data event type. */
|
---|
| 870 | } u;
|
---|
[39454] | 871 | } VBGLR3DNDHGCMEVENT;
|
---|
| 872 | typedef VBGLR3DNDHGCMEVENT *PVBGLR3DNDHGCMEVENT;
|
---|
| 873 | typedef const PVBGLR3DNDHGCMEVENT CPVBGLR3DNDHGCMEVENT;
|
---|
[55422] | 874 | VBGLR3DECL(int) VbglR3DnDConnect(PVBGLR3GUESTDNDCMDCTX pCtx);
|
---|
| 875 | VBGLR3DECL(int) VbglR3DnDDisconnect(PVBGLR3GUESTDNDCMDCTX pCtx);
|
---|
[39454] | 876 |
|
---|
[58212] | 877 | VBGLR3DECL(int) VbglR3DnDRecvNextMsg(PVBGLR3GUESTDNDCMDCTX pCtx, CPVBGLR3DNDHGCMEVENT pEvent);
|
---|
[39454] | 878 |
|
---|
[58212] | 879 | VBGLR3DECL(int) VbglR3DnDHGSendAckOp(PVBGLR3GUESTDNDCMDCTX pCtx, uint32_t uAction);
|
---|
| 880 | VBGLR3DECL(int) VbglR3DnDHGSendReqData(PVBGLR3GUESTDNDCMDCTX pCtx, const char *pcszFormat);
|
---|
| 881 | VBGLR3DECL(int) VbglR3DnDHGSendProgress(PVBGLR3GUESTDNDCMDCTX pCtx, uint32_t uStatus, uint8_t uPercent, int rcErr);
|
---|
[42261] | 882 | # ifdef VBOX_WITH_DRAG_AND_DROP_GH
|
---|
[58212] | 883 | VBGLR3DECL(int) VbglR3DnDGHSendAckPending(PVBGLR3GUESTDNDCMDCTX pCtx, uint32_t uDefAction, uint32_t uAllActions, const char* pcszFormats, uint32_t cbFormats);
|
---|
[55422] | 884 | VBGLR3DECL(int) VbglR3DnDGHSendData(PVBGLR3GUESTDNDCMDCTX pCtx, const char *pszFormat, void *pvData, uint32_t cbData);
|
---|
| 885 | VBGLR3DECL(int) VbglR3DnDGHSendError(PVBGLR3GUESTDNDCMDCTX pCtx, int rcOp);
|
---|
[42261] | 886 | # endif /* VBOX_WITH_DRAG_AND_DROP_GH */
|
---|
[39454] | 887 | /** @} */
|
---|
| 888 | # endif /* VBOX_WITH_DRAG_AND_DROP */
|
---|
| 889 |
|
---|
[43346] | 890 | /* Generic Host Channel Service. */
|
---|
[68550] | 891 | VBGLR3DECL(int) VbglR3HostChannelInit(uint32_t *pidClient);
|
---|
| 892 | VBGLR3DECL(void) VbglR3HostChannelTerm(uint32_t idClient);
|
---|
[43346] | 893 | VBGLR3DECL(int) VbglR3HostChannelAttach(uint32_t *pu32ChannelHandle, uint32_t u32HGCMClientId,
|
---|
| 894 | const char *pszName, uint32_t u32Flags);
|
---|
| 895 | VBGLR3DECL(void) VbglR3HostChannelDetach(uint32_t u32ChannelHandle, uint32_t u32HGCMClientId);
|
---|
| 896 | VBGLR3DECL(int) VbglR3HostChannelSend(uint32_t u32ChannelHandle, uint32_t u32HGCMClientId,
|
---|
| 897 | void *pvData, uint32_t cbData);
|
---|
| 898 | VBGLR3DECL(int) VbglR3HostChannelRecv(uint32_t u32ChannelHandle, uint32_t u32HGCMClientId,
|
---|
| 899 | void *pvData, uint32_t cbData,
|
---|
| 900 | uint32_t *pu32SizeReceived, uint32_t *pu32SizeRemaining);
|
---|
| 901 | VBGLR3DECL(int) VbglR3HostChannelControl(uint32_t u32ChannelHandle, uint32_t u32HGCMClientId,
|
---|
| 902 | uint32_t u32Code, void *pvParm, uint32_t cbParm,
|
---|
| 903 | void *pvData, uint32_t cbData, uint32_t *pu32SizeDataReturned);
|
---|
| 904 | VBGLR3DECL(int) VbglR3HostChannelEventWait(uint32_t *pu32ChannelHandle, uint32_t u32HGCMClientId,
|
---|
| 905 | uint32_t *pu32EventId, void *pvParm, uint32_t cbParm,
|
---|
| 906 | uint32_t *pu32SizeReturned);
|
---|
| 907 | VBGLR3DECL(int) VbglR3HostChannelEventCancel(uint32_t u32ChannelHandle, uint32_t u32HGCMClientId);
|
---|
[43462] | 908 | VBGLR3DECL(int) VbglR3HostChannelQuery(const char *pszName, uint32_t u32HGCMClientId, uint32_t u32Code,
|
---|
| 909 | void *pvParm, uint32_t cbParm, void *pvData, uint32_t cbData,
|
---|
| 910 | uint32_t *pu32SizeDataReturned);
|
---|
[43346] | 911 |
|
---|
[52178] | 912 | /** @name Mode hint storage
|
---|
| 913 | * @{ */
|
---|
| 914 | VBGLR3DECL(int) VbglR3ReadVideoMode(unsigned cDisplay, unsigned *cx,
|
---|
| 915 | unsigned *cy, unsigned *cBPP, unsigned *x,
|
---|
| 916 | unsigned *y, unsigned *fEnabled);
|
---|
| 917 | VBGLR3DECL(int) VbglR3WriteVideoMode(unsigned cDisplay, unsigned cx,
|
---|
| 918 | unsigned cy, unsigned cBPP, unsigned x,
|
---|
| 919 | unsigned y, unsigned fEnabled);
|
---|
| 920 | /** @} */
|
---|
| 921 |
|
---|
[58993] | 922 | /** @name Generic HGCM
|
---|
| 923 | * @{ */
|
---|
| 924 | VBGLR3DECL(int) VbglR3HGCMConnect(const char *pszServiceName, HGCMCLIENTID *pidClient);
|
---|
| 925 | VBGLR3DECL(int) VbglR3HGCMDisconnect(HGCMCLIENTID idClient);
|
---|
[68550] | 926 | struct VBGLIOCHGCMCALL;
|
---|
| 927 | VBGLR3DECL(int) VbglR3HGCMCall(struct VBGLIOCHGCMCALL *pInfo, size_t cbInfo);
|
---|
[58993] | 928 | /** @} */
|
---|
| 929 |
|
---|
[21211] | 930 | #endif /* IN_RING3 */
|
---|
| 931 | /** @} */
|
---|
| 932 |
|
---|
[20374] | 933 | RT_C_DECLS_END
|
---|
[1] | 934 |
|
---|
| 935 | /** @} */
|
---|
| 936 |
|
---|
[3633] | 937 | #endif
|
---|
[21211] | 938 |
|
---|