Changeset 38133 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Jul 25, 2011 9:02:17 AM (13 years ago)
- Location:
- trunk/src/VBox/Additions/common
- Files:
-
- 1 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3LibGuestCtrl.cpp
r37375 r38133 152 152 if (RT_FAILURE(rc2)) 153 153 rc = rc2; 154 }155 return rc;156 }157 158 159 /**160 * Closes a formerly opened guest directory.161 *162 * @return IPRT status code.163 ** @todo Docs!164 */165 VBGLR3DECL(int) VbglR3GuestCtrlGetCmdDirClose(uint32_t u32ClientId, uint32_t uNumParms,166 uint32_t *puContext, uint32_t *puHandle)167 {168 AssertPtrReturn(puContext, VERR_INVALID_PARAMETER);169 AssertPtrReturn(puHandle, VERR_INVALID_PARAMETER);170 171 VBoxGuestCtrlHGCMMsgDirClose Msg;172 173 Msg.hdr.result = VERR_WRONG_ORDER;174 Msg.hdr.u32ClientID = u32ClientId;175 Msg.hdr.u32Function = GUEST_GET_HOST_MSG;176 Msg.hdr.cParms = uNumParms;177 178 VbglHGCMParmUInt32Set(&Msg.context, 0);179 VbglHGCMParmUInt32Set(&Msg.handle, 0);180 181 int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));182 if (RT_SUCCESS(rc))183 {184 int rc2 = Msg.hdr.result;185 if (RT_FAILURE(rc2))186 {187 rc = rc2;188 }189 else190 {191 Msg.context.GetUInt32(puContext);192 Msg.handle.GetUInt32(puHandle);193 }194 }195 return rc;196 }197 198 199 /**200 * Opens a guest directory for reading.201 *202 * @return IPRT status code.203 ** @todo Docs!204 */205 VBGLR3DECL(int) VbglR3GuestCtrlGetCmdDirOpen(uint32_t u32ClientId, uint32_t uNumParms,206 uint32_t *puContext,207 char *pszDir, uint32_t cbDir,208 char *pszFilter, uint32_t cbFilter,209 uint32_t *puFlags,210 char *pszUser, uint32_t cbUser,211 char *pszPassword, uint32_t cbPassword)212 {213 AssertPtrReturn(pszDir, VERR_INVALID_PARAMETER);214 AssertPtrReturn(pszFilter, VERR_INVALID_PARAMETER);215 AssertPtrReturn(puFlags, VERR_INVALID_PARAMETER);216 AssertPtrReturn(pszUser, VERR_INVALID_PARAMETER);217 AssertPtrReturn(pszPassword, VERR_INVALID_PARAMETER);218 219 VBoxGuestCtrlHGCMMsgDirOpen Msg;220 221 Msg.hdr.result = VERR_WRONG_ORDER;222 Msg.hdr.u32ClientID = u32ClientId;223 Msg.hdr.u32Function = GUEST_GET_HOST_MSG;224 Msg.hdr.cParms = uNumParms;225 226 VbglHGCMParmUInt32Set(&Msg.context, 0);227 VbglHGCMParmPtrSet(&Msg.directory, pszDir, cbDir);228 VbglHGCMParmPtrSet(&Msg.filter, pszFilter, cbFilter);229 VbglHGCMParmUInt32Set(&Msg.flags, 0);230 VbglHGCMParmPtrSet(&Msg.username, pszUser, cbUser);231 VbglHGCMParmPtrSet(&Msg.password, pszPassword, cbPassword);232 233 int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));234 if (RT_SUCCESS(rc))235 {236 int rc2 = Msg.hdr.result;237 if (RT_FAILURE(rc2))238 {239 rc = rc2;240 }241 else242 {243 Msg.context.GetUInt32(puContext);244 Msg.flags.GetUInt32(puFlags);245 }246 }247 return rc;248 }249 250 251 /**252 * Opens a guest directory for reading.253 *254 * @return IPRT status code.255 ** @todo Docs!256 */257 VBGLR3DECL(int) VbglR3GuestCtrlGetCmdDirRead(uint32_t u32ClientId, uint32_t uNumParms,258 uint32_t *puContext, uint32_t *puHandle)259 {260 AssertPtrReturn(puContext, VERR_INVALID_PARAMETER);261 AssertPtrReturn(puHandle, VERR_INVALID_PARAMETER);262 263 VBoxGuestCtrlHGCMMsgDirRead Msg;264 265 Msg.hdr.result = VERR_WRONG_ORDER;266 Msg.hdr.u32ClientID = u32ClientId;267 Msg.hdr.u32Function = GUEST_GET_HOST_MSG;268 Msg.hdr.cParms = uNumParms;269 270 VbglHGCMParmUInt32Set(&Msg.context, 0);271 VbglHGCMParmUInt32Set(&Msg.handle, 0);272 273 int rc = vbglR3DoIOCtl(VBOXGUEST_IOCTL_HGCM_CALL(sizeof(Msg)), &Msg, sizeof(Msg));274 if (RT_SUCCESS(rc))275 {276 int rc2 = Msg.hdr.result;277 if (RT_FAILURE(rc2))278 {279 rc = rc2;280 }281 else282 {283 Msg.context.GetUInt32(puContext);284 Msg.handle.GetUInt32(puHandle);285 }286 154 } 287 155 return rc; -
trunk/src/VBox/Additions/common/VBoxService/Makefile.kmk
r37375 r38133 69 69 VBoxService_SOURCES += \ 70 70 VBoxServiceControl.cpp \ 71 VBoxServiceControlDir.cpp \72 71 VBoxServiceControlExec.cpp \ 73 72 VBoxServiceControlExecThread.cpp \ -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControl.cpp
r37375 r38133 162 162 case HOST_EXEC_GET_OUTPUT: 163 163 rc = VBoxServiceControlExecHandleCmdGetOutput(g_GuestControlSvcClientID, uNumParms); 164 break;165 166 case HOST_DIR_CLOSE:167 rc = VBoxServiceGCtrlDirClose(g_GuestControlSvcClientID, uNumParms);168 break;169 170 case HOST_DIR_OPEN:171 rc = VBoxServiceGCtrlDirOpen(g_GuestControlSvcClientID, uNumParms);172 break;173 174 case HOST_DIR_READ:175 rc = VBoxServiceGCtrlDirRead(g_GuestControlSvcClientID, uNumParms);176 164 break; 177 165
Note:
See TracChangeset
for help on using the changeset viewer.