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 thes/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 [email protected] +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
