Changeset 6246 in vbox
- Timestamp:
- Jan 4, 2008 7:18:18 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxGuest.h
r6241 r6246 1359 1359 # endif 1360 1360 VBGLR3DECL(int) VbglR3InterruptEventWaits(void); 1361 1362 /* Shared clipboard */ 1363 1361 VBGLR3DECL(int) VbglR3WriteLog(const char *pch, size_t cb); 1362 1363 /** @name Shared clipboard 1364 * @{ */ 1364 1365 VBGLR3DECL(int) VbglR3ClipboardConnect(uint32_t *pu32ClientId); 1365 1366 VBGLR3DECL(int) VbglR3ClipboardDisconnect(uint32_t u32ClientId); … … 1368 1369 VBGLR3DECL(int) VbglR3ClipboardReportFormats(uint32_t u32ClientId, uint32_t fFormats); 1369 1370 VBGLR3DECL(int) VbglR3ClipboardWriteData(uint32_t u32ClientId, uint32_t fFormat, void *pv, uint32_t cb); 1370 1371 /* Seamless mode */ 1372 1373 VBGLR3DECL(int) VbglR3SeamlessSetCap(bool bState); 1371 /** @} */ 1372 1373 /** @name Seamless mode 1374 * @{ */ 1375 VBGLR3DECL(int) VbglR3SeamlessSetCap(bool fState); 1374 1376 VBGLR3DECL(int) VbglR3SeamlessWaitEvent(VMMDevSeamlessMode *pMode); 1375 1377 VBGLR3DECL(int) VbglR3SeamlessSendRects(uint32_t cRects, PRTRECT pRects); 1376 1377 /* Mouse */ 1378 1379 VBGLR3DECL(int) VbglR3GetMouseStatus(uint32_t *pu32Features, uint32_t *pu32PointerX, uint32_t *pu32PointerY); 1380 VBGLR3DECL(int) VbglR3SetMouseStatus(uint32_t u32Features); 1381 1382 /* Backdoor logging */ 1383 1384 VBGLR3DECL(int) VbglR3WriteLog(const char *pch, size_t cb); 1378 /** @} */ 1379 1380 /** @name Mouse 1381 * @{ */ 1382 VBGLR3DECL(int) VbglR3GetMouseStatus(uint32_t *pfFeatures, uint32_t *px, uint32_t *py); 1383 VBGLR3DECL(int) VbglR3SetMouseStatus(uint32_t fFeatures); 1384 /** @} */ 1385 1385 1386 1386 1387 __END_DECLS -
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3Lib.cpp
r6241 r6246 24 24 # define INCL_ERRORS 25 25 # include <os2.h> 26 #endif 26 #endif 27 27 28 28 #include <iprt/time.h> … … 49 49 #if defined(RT_OS_OS2) 50 50 /* 51 * We might wish to compile this with Watcom, so stick to 52 * the OS/2 APIs all the way. And in any case we have to use 51 * We might wish to compile this with Watcom, so stick to 52 * the OS/2 APIs all the way. And in any case we have to use 53 53 * DosDevIOCtl for the requests, why not use Dos* for everything. 54 54 */ … … 107 107 g_File = File; 108 108 109 #endif 109 #endif 110 110 111 111 return VINF_SUCCESS; … … 131 131 /** 132 132 * Internal wrapper around various OS specific ioctl implemenations. 133 * 133 * 134 134 * @returns VBox status code as returned by VBoxGuestCommonIOCtl, or 135 135 * an failure returned by the OS specific ioctl APIs. 136 * 136 * 137 137 * @param iFunction The requested function. 138 138 * @param pvData The input and output data buffer. 139 139 * @param cbData The size of the buffer. 140 * 140 * 141 141 * @remark Exactly how the VBoxGuestCommonIOCtl is ferried back 142 * here is OS specific. On BSD and Darwin we can use errno, 142 * here is OS specific. On BSD and Darwin we can use errno, 143 143 * while on OS/2 we use the 2nd buffer of the IOCtl. 144 144 */ … … 149 149 int32_t vrc = VERR_INTERNAL_ERROR; 150 150 ULONG cbOS2Data = sizeof(vrc); 151 APIRET rc = DosDevIOCtl(g_File, VBOXGUEST_IOCTL_CATEGORY, iFunction, 151 APIRET rc = DosDevIOCtl(g_File, VBOXGUEST_IOCTL_CATEGORY, iFunction, 152 152 pvData, cbData, &cbOS2Parm, 153 153 &vrc, sizeof(vrc), &cbOS2Data); … … 157 157 158 158 /* PORTME */ 159 #else 159 #else 160 160 /* Defalut implementation (linux, solaris). */ 161 161 int rc2 = VERR_INTERNAL_ERROR; … … 173 173 174 174 AssertPtrReturn(ppReq, VERR_INVALID_PARAMETER); 175 AssertMsgReturn(cb >= sizeof(VMMDevRequestHeader), ("%#x vs %#zx\n", cb, sizeof(VMMDevRequestHeader)), 175 AssertMsgReturn(cb >= sizeof(VMMDevRequestHeader), ("%#x vs %#zx\n", cb, sizeof(VMMDevRequestHeader)), 176 176 VERR_INVALID_PARAMETER); 177 177 … … 217 217 218 218 219 VBGLR3DECL(int) VbglR3GetMouseStatus(uint32_t *p u32Features, uint32_t *pu32PointerX, uint32_t *pu32PointerY)219 VBGLR3DECL(int) VbglR3GetMouseStatus(uint32_t *pfFeatures, uint32_t *px, uint32_t *py) 220 220 { 221 221 VMMDevReqMouseStatus Req; … … 227 227 if (RT_SUCCESS(rc)) 228 228 { 229 if (p u32Features)230 *p u32Features = Req.mouseFeatures;231 if (p u32PointerX)232 *p u32PointerX= Req.pointerXPos;233 if (p u32PointerY)234 *p u32PointerY= Req.pointerYPos;229 if (pfFeatures) 230 *pfFeatures = Req.mouseFeatures; 231 if (px) 232 *px = Req.pointerXPos; 233 if (py) 234 *py = Req.pointerYPos; 235 235 } 236 236 return rc; … … 238 238 239 239 240 VBGLR3DECL(int) VbglR3SetMouseStatus(uint32_t u32Features)240 VBGLR3DECL(int) VbglR3SetMouseStatus(uint32_t fFeatures) 241 241 { 242 242 VMMDevReqMouseStatus Req; 243 243 vmmdevInitRequest(&Req.header, VMMDevReq_SetMouseStatus); 244 Req.mouseFeatures = u32Features;244 Req.mouseFeatures = fFeatures; 245 245 Req.pointerXPos = 0; 246 246 Req.pointerYPos = 0; … … 250 250 251 251 /** 252 * Cause any pending WaitEvent calls (VBOXGUEST_IOCTL_WAITEVENT) to return 252 * Cause any pending WaitEvent calls (VBOXGUEST_IOCTL_WAITEVENT) to return 253 253 * with a VERR_INTERRUPTED status. 254 * 255 * Can be used in combination with a termination flag variable for interrupting 254 * 255 * Can be used in combination with a termination flag variable for interrupting 256 256 * event loops. Avoiding race conditions is the responsibility of the caller. 257 257 * … … 266 266 /** 267 267 * Write to the backdoor logger from ring 3 guest code. 268 * 268 * 269 269 * @returns IPRT status code 270 * 270 * 271 271 * @remakes This currently does not accept more than 255 bytes of data at 272 272 * one time. It should probably be rewritten to use pass a pointer … … 275 275 VBGLR3DECL(int) VbglR3WriteLog(const char *pch, size_t cb) 276 276 { 277 /* 277 /* 278 278 * Solaris does not accept more than 255 bytes of data per ioctl request, 279 279 * so split large string into 128 byte chunks to prevent truncation.
Note:
See TracChangeset
for help on using the changeset viewer.