[libvirt] [PATCH 3/6] vbox: Add glue layer for MSCOM on Windows
Matthias Bolte
matthias.bolte at googlemail.com
Fri Dec 17 22:23:29 UTC 2010
2010/12/17 Eric Blake <eblake at redhat.com>:
> 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.
Yes, good idea. I'll fold this in.
@@ -2430,6 +2430,11 @@ AC_MSG_NOTICE([ nl: $LIBNL_CFLAGS $LIBNL_LIBS])
else
AC_MSG_NOTICE([ nl: no])
fi
+if test "$with_vbox" = "yes" && test -n "$MSCOM_LIBS" ; then
+AC_MSG_NOTICE([ mscom: $MSCOM_LIBS])
+else
+AC_MSG_NOTICE([ mscom: no])
+fi
AC_MSG_NOTICE([])
AC_MSG_NOTICE([Test suite])
AC_MSG_NOTICE([])
>> +
>> +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?
Sure, no problem. I'll remove the NULL initialization.
> At any rate, ACK.
>
Thanks, pushed.
Matthias
More information about the libvir-list
mailing list