From 7b953918ebc9e5dd6812dcb55a3bf272cfa8a530 Mon Sep 17 00:00:00 2001 From: Fridrich Štrba Date: Thu, 25 Mar 2010 17:08:46 +0100 Subject: [win32] Fix on-the-fly UUID creation and change names of functions and variables so that they look more like what we do in Evolution --- modules/windows-sens/evolution-windows-sens.cxx | 33 ++++++++++++++++++------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/modules/windows-sens/evolution-windows-sens.cxx b/modules/windows-sens/evolution-windows-sens.cxx index 848c893365..6433516544 100644 --- a/modules/windows-sens/evolution-windows-sens.cxx +++ b/modules/windows-sens/evolution-windows-sens.cxx @@ -40,6 +40,21 @@ _mb2wchar (const char* a) return b; } +static const char* add_curly_braces_to_uuid (const char* string_uuid) +{ + static char curly_braced_uuid_string[64]; + unsigned i; + if (!string_uuid) + return NULL; + curly_braced_uuid_string[0]='{'; + for (i=0; iput_SubscriptionID (_mb2wchar ((char*)subid)))) { - RpcStringFree(&subid); + UuidToString(&tmp_uuid, &subids[i]); + if ((res=pIEventSubscription->put_SubscriptionID (_mb2wchar (add_curly_braces_to_uuid ((char*)subids[i]))))) { + RpcStringFree (&subids[i]); break; } - RpcStringFree(&subid); + RpcStringFree (&subids[i]); if ((res=pIEventSubscription->put_SubscriptionName (_mb2wchar (names[i])))) break; if ((res=pIEventSubscription->put_MethodName (_mb2wchar (methods[i])))) @@ -230,7 +245,7 @@ windows_sens_constructed (GObject *object) * is logged on to the same computer as the publisher. This makes this module * work with normal user account without administrative privileges. */ - if ((res=pIEventSubscription->put_PerUser(TRUE))) + if ((res=pIEventSubscription->put_PerUser (TRUE))) break; if ((res=pIEventSystem->Store ((BSTR)PROGID_EventSubscription, (IUnknown*)pIEventSubscription))) -- cgit