diff options
author | Javier <dev.git@javispedro.com> | 2022-04-20 23:50:37 +0200 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2022-04-20 23:50:37 +0200 |
commit | c53e746cfbc295aa72e12e1286d7ed7d0b13617a (patch) | |
tree | a34f46d728d9cb10be96d69f13372e4165eb4f47 /vboxshfl.h | |
parent | c32d96aa6b92216d822933eaeb78aaef258dd92f (diff) | |
download | vbados-c53e746cfbc295aa72e12e1286d7ed7d0b13617a.tar.gz vbados-c53e746cfbc295aa72e12e1286d7ed7d0b13617a.zip |
implement seek_end fn in vbsf
not used from DOS, as far as I can see, but windows may use it
Diffstat (limited to 'vboxshfl.h')
-rw-r--r-- | vboxshfl.h | 25 |
1 files changed, 24 insertions, 1 deletions
@@ -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 |