Changeset 10007 in vbox for trunk/src/VBox/Main/ConsoleImpl.cpp
- Timestamp:
- Jun 27, 2008 9:42:47 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ConsoleImpl.cpp
r10000 r10007 2537 2537 VBOXHGCMSVCPARM parm[2]; 2538 2538 Utf8Str Utf8Key = aKey; 2539 Utf8Str Utf8Value = aValue;2539 int rc = VINF_SUCCESS; 2540 2540 2541 2541 parm[0].type = VBOX_HGCM_SVC_PARM_PTR; … … 2544 2544 /* The + 1 is the null terminator */ 2545 2545 parm[0].u.pointer.size = Utf8Key.length() + 1; 2546 parm[1].type = VBOX_HGCM_SVC_PARM_PTR; 2547 /* To save doing a const cast, we use the mutableRaw() member. */ 2548 parm[1].u.pointer.addr = Utf8Value.mutableRaw(); 2549 if (parm[1].u.pointer.addr != NULL) 2546 if (aValue != NULL) 2547 { 2548 Utf8Str Utf8Value = aValue; 2549 parm[1].type = VBOX_HGCM_SVC_PARM_PTR; 2550 /* To save doing a const cast, we use the mutableRaw() member. */ 2551 parm[1].u.pointer.addr = Utf8Value.mutableRaw(); 2550 2552 /* The + 1 is the null terminator */ 2551 2553 parm[1].u.pointer.size = Utf8Value.length() + 1; 2554 rc = mVMMDev->hgcmHostCall ("VBoxSharedInfoSvc", SET_CONFIG_KEY_HOST, 2, &parm[0]); 2555 } 2552 2556 else 2553 parm[1].u.pointer.size = 0; 2554 int rc = mVMMDev->hgcmHostCall ("VBoxSharedInfoSvc", SET_CONFIG_KEY_HOST, 2, &parm[0]); 2557 rc = mVMMDev->hgcmHostCall ("VBoxSharedInfoSvc", DEL_CONFIG_KEY_HOST, 1, &parm[0]); 2555 2558 if (RT_SUCCESS(rc)) 2556 2559 hrc = S_OK;
Note:
See TracChangeset
for help on using the changeset viewer.