Changeset 10861 in vbox for trunk/src/VBox/Additions/common
- Timestamp:
- Jul 24, 2008 5:15:02 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 33677
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp
r10860 r10861 131 131 * 132 132 * @returns VBox status code. 133 * 133 134 * @param u32ClientId The client id returned by VbglR3InvsSvcConnect(). 134 * @param pszName The property to save to. Utf8 135 * @param pszValue The value to store. Utf8. If this is NULL then 136 * the property will be removed. 135 * @param pszName The property to save to. Must be valid UTF-8. 136 * @param pszValue The value to store. Must be valid UTF-8. 137 * If this is NULL then the property will be removed. 138 * 137 139 * @note if the property already exists and pszValue is not NULL then the 138 140 * property's flags field will be left unchanged … … 169 171 rc = Msg.hdr.result; 170 172 } 173 return rc; 174 } 175 176 177 /** 178 * Write a property value where the value is in RTStrPrintfV fashion. 179 * 180 * @returns The same as VbglR3GuestPropWriteValue with the addition of VERR_NO_STR_MEMORY. 181 * 182 * @param u32ClientId The client ID returned by VbglR3InvsSvcConnect(). 183 * @param pszName The property to save to. Must be valid UTF-8. 184 * @param pszValueFormat The value format. This must be valid UTF-8 when fully formatted. 185 * @param va The format arguments. 186 */ 187 VBGLR3DECL(int) VbglR3GuestPropWriteValueV(uint32_t u32ClientId, const char *pszName, const char *pszValueFormat, va_list va) 188 { 189 /* 190 * Format the value and pass it on to the setter. 191 */ 192 int rc = VERR_NO_STR_MEMORY; 193 char *pszValue; 194 if (RTStrAPrintfV(&pszValue, pszValueFormat, va) < 0) 195 { 196 rc = VbglR3GuestPropWriteValue(u32ClientId, pszName, pszValue); 197 RTStrFree(pszValue); 198 } 199 return rc; 200 } 201 202 203 /** 204 * Write a property value where the value is in RTStrPrintf fashion. 205 * 206 * @returns The same as VbglR3GuestPropWriteValue with the addition of VERR_NO_STR_MEMORY. 207 * 208 * @param u32ClientId The client ID returned by VbglR3InvsSvcConnect(). 209 * @param pszName The property to save to. Must be valid UTF-8. 210 * @param pszValueFormat The value format. This must be valid UTF-8 when fully formatted. 211 * @param ... The format arguments. 212 */ 213 VBGLR3DECL(int) VbglR3GuestPropWriteValueF(uint32_t u32ClientId, const char *pszName, const char *pszValueFormat, ...) 214 { 215 va_list va; 216 va_start(va, pszValueFormat); 217 int rc = VbglR3GuestPropWriteValueV(u32ClientId, pszName, pszValueFormat, va); 218 va_end(va); 171 219 return rc; 172 220 }
Note:
See TracChangeset
for help on using the changeset viewer.