From c53e746cfbc295aa72e12e1286d7ed7d0b13617a Mon Sep 17 00:00:00 2001 From: Javier Date: Wed, 20 Apr 2022 23:50:37 +0200 Subject: implement seek_end fn in vbsf not used from DOS, as far as I can see, but windows may use it --- vboxshfl.h | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'vboxshfl.h') diff --git a/vboxshfl.h b/vboxshfl.h index 9be37c8..097d522 100644 --- a/vboxshfl.h +++ b/vboxshfl.h @@ -356,7 +356,7 @@ static vboxerr vbox_shfl_info(LPVBOXCOMM vb, hgcm_client_id_t client_id, SHFLROO // arg 3 inout uint32 "size" vbox_hgcm_set_parameter_uint32(req, 3, *size); - // arg 4 in void "buffer" + // arg 4 inout void "buffer" vbox_hgcm_set_parameter_pointer(req, 4, *size, buffer); if ((err = vbox_hgcm_do_call_sync(vb, req)) < 0) @@ -461,4 +461,27 @@ static vboxerr vbox_shfl_query_map_info(LPVBOXCOMM vb, hgcm_client_id_t client_i return req->header.result; } +static vboxerr vbox_shfl_set_file_size(LPVBOXCOMM vb, hgcm_client_id_t client_id, + SHFLROOT root, SHFLHANDLE handle, unsigned long size) +{ + VMMDevHGCMCall __far *req = (void __far *) vb->buf; + vboxerr err; + + vbox_hgcm_init_call(req, client_id, SHFL_FN_SET_FILE_SIZE, 3); + + // arg 0 in uint32 "root" + vbox_hgcm_set_parameter_shflroot(req, 0, root); + + // arg 1 in uint64 "handle" + vbox_hgcm_set_parameter_shflhandle(req, 1, handle); + + // arg 2 in uint64 "new_size" + vbox_hgcm_set_parameter_uint32(req, 2, size); + + if ((err = vbox_hgcm_do_call_sync(vb, req)) < 0) + return err; + + return req->header.result; +} + #endif // VBOXSHFL_H -- cgit v1.2.3