Re: [PATCH 3/6] vbox: Add glue layer for MSCOM on Windows

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

 



On 12/17/2010 11:56 AM, Matthias Bolte wrote:
> Don't require dlopen, but link to ole32 and oleaut32 on Windows.
> 
> Don't expose g_pVBoxFuncs anymore. It was only used to get the
> version of the API. Make VBoxCGlueInit return the version instead.
> This simplifies the implementation of the MSCOM glue layer.
> 
> Get the VirtualBox version from the registry.
> 
> Add a dummy implementation of the nsIEventQueue to the MSCOM glue
> as there seems to be no direct equivalent with MSCOM. It might be
> implemented using the normal window message loop. This requires
> additional investigation.
> ---
>  configure.ac               |   15 +-
>  po/POTFILES.in             |    1 +
>  src/Makefile.am            |    9 +-
>  src/vbox/vbox_MSCOMGlue.c  |  649 ++++++++++++++++++++++++++++++++++++++++++++
>  src/vbox/vbox_MSCOMGlue.h  |   33 +++
>  src/vbox/vbox_XPCOMCGlue.c |   46 ++--
>  src/vbox/vbox_XPCOMCGlue.h |    4 +-
>  src/vbox/vbox_driver.c     |    6 +-
>  src/vbox/vbox_glue.c       |   29 ++
>  src/vbox/vbox_glue.h       |   32 +++
>  src/vbox/vbox_tmpl.c       |   12 +-
>  11 files changed, 798 insertions(+), 38 deletions(-)
>  create mode 100644 src/vbox/vbox_MSCOMGlue.c
>  create mode 100644 src/vbox/vbox_MSCOMGlue.h
>  create mode 100644 src/vbox/vbox_glue.c
>  create mode 100644 src/vbox/vbox_glue.h
> 
> +
> +    case "$host" in
> +      *-*-mingw* | *-*-msvc*) MSCOM_LIBS="-lole32 -loleaut32" ;;
> +      *) MSCOM_LIBS= ;;
> +    esac
> +    AC_SUBST([MSCOM_LIBS])

Should we also modify the tail end of ./configure output to display what
values were set in $MSCOM_LIBS, as is done for various other libraries?
 But that's a minor nit.

> +
> +PFNVBOXGETXPCOMCFUNCTIONS g_pfnGetFunctions = NULL;
> +
> +static unsigned long vboxVersion;
> +static IVirtualBox *vboxVirtualBox = NULL;
> +static ISession *vboxSession = NULL;

Is the explicit NULL initialization needed here, or are you okay relying
on C-mandated 0-initialization of .bss variables?

At any rate, 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]