summaryrefslogtreecommitdiff
path: root/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2014-03-26 19:21:20 +0000
committer <>2014-05-08 15:03:54 +0000
commitfb123f93f9f5ce42c8e5785d2f8e0edaf951740e (patch)
treec2103d76aec5f1f10892cd1d3a38e24f665ae5db /src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp
parent58ed4748338f9466599adfc8a9171280ed99e23f (diff)
downloadVirtualBox-master.tar.gz
Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.3.10.tar.bz2.HEADVirtualBox-4.3.10master
Diffstat (limited to 'src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp')
-rw-r--r--src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp
index 32c7d796..48539199 100644
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestProp.cpp
@@ -4,7 +4,7 @@
*/
/*
- * Copyright (C) 2007 Oracle Corporation
+ * Copyright (C) 2007-2013 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
@@ -783,6 +783,32 @@ VBGLR3DECL(void) VbglR3GuestPropEnumFree(PVBGLR3GUESTPROPENUM pHandle)
/**
+ * Deletes a guest property.
+ *
+ * @returns VBox status code.
+ * @param u32ClientId The client id returned by VbglR3InvsSvcConnect().
+ * @param pszName The property to delete. Utf8
+ */
+VBGLR3DECL(int) VbglR3GuestPropDelete(uint32_t u32ClientId, const char *pszName)
+{
+ AssertPtrReturn(pszName, VERR_INVALID_POINTER);
+
+ DelProperty Msg;
+
+ Msg.hdr.result = VERR_WRONG_ORDER;
+ Msg.hdr.u32ClientID = u32ClientId;
+ Msg.hdr.u32Function = DEL_PROP;
+ Msg.hdr.cParms = 1;
+ VbglHGCMParmPtrSetString(&Msg.name, pszName);
+ int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));
+ if (RT_SUCCESS(rc))
+ rc = Msg.hdr.result;
+
+ return rc;
+}
+
+
+/**
* Deletes a set of keys.
*
* The set is specified in the same way as for VbglR3GuestPropEnum.