VirtualBox

source: vbox/trunk/include/VBox/VBoxGuestLib.h@ 68485

Last change on this file since 68485 was 68476, checked in by vboxsync, 7 years ago

VBoxGuestLib/HGCM.cpp: cleanups (this is ring-0 code affecting shared folders only)

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

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