Changeset 10094 in vbox
- Timestamp:
- Jul 2, 2008 11:23:06 AM (17 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/VBoxControl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxControl/Makefile.kmk
r10008 r10094 34 34 35 35 # VBoxControl.cpp uses VBOX_SVN_REV. 36 VBoxControl.cpp_DEFS += VBOX_SVN_REV=$(VBOX_SVN_REV) VBOX_HGCM36 VBoxControl.cpp_DEFS += VBOX_SVN_REV=$(VBOX_SVN_REV) 37 37 VBoxControl.cpp_DEPS = $(VBOX_SVN_REV_KMK) 38 VBoxControl_DEFS += \ 39 $(if $(VBOX_WITH_INFO_SVC),VBOX_WITH_INFO_SVC VBOX_HGCM,) 38 40 39 41 include $(KBUILD_PATH)/subfooter.kmk -
trunk/src/VBox/Additions/WINNT/VBoxControl/VBoxControl.cpp
r10008 r10094 783 783 784 784 785 #ifdef VBOX_WITH_INFO_SVC 785 786 /** 786 787 * Open the VirtualBox guest device. … … 919 920 rc = Msg.hdr.result; 920 921 uint32_t cbActual; 921 if (RT_SUCCESS(rc) )922 rc = VbglHGCMParmUInt32Get(&Msg.size, &cbActual);923 if (RT_SUCCESS(rc))924 {925 if (pcbActual != NULL)926 *pcbActual = cbActual;927 if (cbActual > cbValue)928 rc = VINF_BUFFER_OVERFLOW;922 if (RT_SUCCESS(rc) || (VERR_BUFFER_OVERFLOW == rc)) 923 { 924 int rc2 = VbglHGCMParmUInt32Get(&Msg.size, &cbActual); 925 if (RT_SUCCESS(rc2)) 926 { 927 if (pcbActual != NULL) 928 *pcbActual = cbActual; 929 } 929 930 else 930 rc = Msg.hdr.result; 931 if ((cbValue > 0) && (0 == cbActual)) /* No such property */ 932 pszValue[0] = 0; 933 931 rc = rc2; 934 932 } 935 933 return rc; … … 1037 1035 rc = hgcmInfoSvcGetProp(hDevice, u32ClientID, argv[0], szValue, 1038 1036 sizeof(szValue), NULL); 1039 if (!RT_SUCCESS(rc) )1037 if (!RT_SUCCESS(rc) && (rc != VERR_NOT_FOUND)) 1040 1038 printf("Failed to retrieve the property value, RT error %d\n", rc); 1041 1039 } 1042 if (RT_SUCCESS(rc) )1043 { 1044 if ( strlen(szValue) > 0)1040 if (RT_SUCCESS(rc) || (VERR_NOT_FOUND == rc)) 1041 { 1042 if (RT_SUCCESS(rc)) 1045 1043 printf("Value: %s\n", szValue); 1046 1044 else … … 1097 1095 return rc; 1098 1096 } 1097 #endif /* VBOX_WITH_INFO_SVC */ 1099 1098 1100 1099 … … 1144 1143 handleSetVideoMode(argc - 2, &argv[2]); 1145 1144 } 1145 #ifdef VBOX_WITH_INFO_SVC 1146 1146 else if (stricmp(argv[1], "getguestproperty") == 0) 1147 1147 { … … 1153 1153 handleSetGuestProperty(argc - 2, &argv[2]); 1154 1154 } 1155 #endif /* VBOX_WITH_INFO_SVC */ 1155 1156 else 1156 1157 {
Note:
See TracChangeset
for help on using the changeset viewer.