Changeset 30758 in vbox for trunk/src/VBox/Additions/WINNT/VBoxGuest/Helper.cpp
- Timestamp:
- Jul 9, 2010 12:30:12 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxGuest/Helper.cpp
r29619 r30758 191 191 } 192 192 193 /** @todo maybe we should drop this routine entirely later because we detecting 194 * the running OS via VBoxService in ring 3 using guest properties since a while. */ 193 /** @todo Maybe we should drop this routine entirely later because we detecting 194 * the running OS via VBoxService in ring 3 using guest properties since a while. 195 * 196 * @todo Consider of using vboxGuestInitReportGuestInfo in the ..\common\Helper.cpp 197 * module to have a common base and less redundant code. 198 */ 195 199 NTSTATUS hlpVBoxReportGuestInfo (PVBOXGUESTDEVEXT pDevExt) 196 200 { … … 234 238 if (RT_FAILURE(rc)) 235 239 { 236 dprintf(("VBoxGuest::hlpVBoxReportGuestInfo: error reporting guest info to VMMDev. "240 dprintf(("VBoxGuest::hlpVBoxReportGuestInfo: Error reporting guest info to VMMDev. " 237 241 "rc = %Rrc\n", rc)); 238 242 } … … 258 262 if (RT_FAILURE(rc)) 259 263 { 260 dprintf(("VBoxGuest::hlpVBoxReportGuestInfo: error reporting guest info to VMMDev. "264 dprintf(("VBoxGuest::hlpVBoxReportGuestInfo: Error reporting guest info to VMMDev. " 261 265 "rc = %Rrc\n", rc)); 262 266 } 263 if (rc == VERR_NOT_IMPLEMENTED) 267 if (rc == VERR_NOT_IMPLEMENTED) /* Compatibility with older hosts. */ 264 268 rc = VINF_SUCCESS; 265 266 269 VbglGRFree (&pReq2->header); 267 270 } 268 271 272 /* 273 * Report guest status to host. Because the host set the "Guest Additions active" flag as soon 274 * as he received the VMMDevReportGuestInfo above to make sure all is compatible with older Guest 275 * Additions we now have to disable that flag again here (too early, VBoxService and friends need 276 * to start up first). 277 */ 278 VMMDevReportGuestStatus *pReq3; 279 rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq3, sizeof(*pReq3), VMMDevReq_ReportGuestStatus); 280 if (RT_SUCCESS(rc)) 281 { 282 pReq3->guestStatus.facility = VBoxGuestStatusFacility_VBoxGuestDriver; 283 pReq3->guestStatus.status = VBoxGuestStatusCurrent_Active; /** @todo Are we actually *really* active at this point? */ 284 pReq3->guestStatus.flags = 0; 285 rc = VbglGRPerform(&pReq3->header); 286 if (RT_FAILURE(rc)) 287 dprintf(("VBoxGuest::hlpVBoxReportGuestInfo: Reporting guest status failed with rc=%Rrc\n", rc)); 288 if (rc == VERR_NOT_IMPLEMENTED) /* Compatibility with older hosts. */ 289 rc = VINF_SUCCESS; 290 VbglGRFree(&pReq3->header); 291 } 292 269 293 return RT_FAILURE(rc) ? STATUS_UNSUCCESSFUL : STATUS_SUCCESS; 270 294 }
Note:
See TracChangeset
for help on using the changeset viewer.