Re: [PATCH 4/6] vbox: Handle different array representations of XPCOM and MSCOM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/17/2010 11:56 AM, Matthias Bolte wrote:
> Add a vboxArray to hide the details from the general driver code.
> ---
>  src/vbox/vbox_MSCOMGlue.c  |  107 +++++++++++
>  src/vbox/vbox_MSCOMGlue.h  |   15 ++
>  src/vbox/vbox_XPCOMCGlue.c |  115 ++++++++++++
>  src/vbox/vbox_XPCOMCGlue.h |   14 ++
>  src/vbox/vbox_tmpl.c       |  445 +++++++++++++++++++-------------------------
>  5 files changed, 447 insertions(+), 249 deletions(-)
> 
> diff --git a/src/vbox/vbox_MSCOMGlue.c b/src/vbox/vbox_MSCOMGlue.c
> index 81a2c99..ded1275 100644
> --- a/src/vbox/vbox_MSCOMGlue.c
> +++ b/src/vbox/vbox_MSCOMGlue.c
> @@ -647,3 +647,110 @@ void
>  VBoxCGlueTerm(void)
>  {
>  }
> +
> +
> +
> +/*
> + * In MSCOM an array is represented by a SAFEARRAY pointer. To access the items
> + * in the array the SafeArrayAccessData function is used to lock the array and
> + * get its contents. When the items aren't needed anymore the
> + * SafeArrayUnaccessData function is used to unlock the array. The pointer
> + * retuned by SafeArrayAccessData function get's invalid. Finally the

s/get's/becomes/

> + * SafeArrayDestroy function is called to destroy the array, it also releases
> + * or frees all items in the array according to their type.
> + */
> +
> +typedef HRESULT __stdcall (*SaveArrayGetter)(void *self, SAFEARRAY **array);
> +typedef HRESULT __stdcall (*SaveArrayGetterWithArg)(void *self, void *arg, SAFEARRAY **array);

Perhaps s/SaveArrayGetter/SafeArrayGetter/g?

But it looks like a good wrapper, as well as a mechanical change to
implement its use.

ACK.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]