Jacek Caban : msident: Added CLSID_UserIdentityManager object stub implementation.
Alexandre Julliard
julliard at winehq.org
Mon Mar 12 12:00:00 CDT 2012
Module: wine
Branch: master
Commit: 06a9f864e8f1a0fdc2a3d02cab2953911d31921e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=06a9f864e8f1a0fdc2a3d02cab2953911d31921e
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Mar 12 13:02:17 2012 +0100
msident: Added CLSID_UserIdentityManager object stub implementation.
---
dlls/msident/msident.c | 137 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 137 insertions(+), 0 deletions(-)
diff --git a/dlls/msident/msident.c b/dlls/msident/msident.c
index 69ef459..4c688b8 100644
--- a/dlls/msident/msident.c
+++ b/dlls/msident/msident.c
@@ -19,6 +19,7 @@
#define COBJMACROS
#include "windows.h"
+#include "initguid.h"
#include "msident.h"
#include "rpcproxy.h"
@@ -28,6 +29,137 @@ WINE_DEFAULT_DEBUG_CHANNEL(msident);
static HINSTANCE msident_instance;
+static HRESULT WINAPI UserIdentityManager_QueryInterface(IUserIdentityManager *iface, REFIID riid, void **ppv)
+{
+ if(IsEqualGUID(&IID_IUnknown, riid)) {
+ TRACE("(IID_IUnknown %p)\n", ppv);
+ *ppv = iface;
+ }else if(IsEqualGUID(&IID_IUserIdentityManager, riid)) {
+ TRACE("(IID_IUserIdentityManager %p)\n", ppv);
+ *ppv = iface;
+ }else {
+ WARN("(%s %p)\n", debugstr_guid(riid), ppv);
+ *ppv = NULL;
+ return E_NOINTERFACE;
+ }
+
+ IUnknown_AddRef((IUnknown*)*ppv);
+ return S_OK;
+}
+
+static ULONG WINAPI UserIdentityManager_AddRef(IUserIdentityManager *iface)
+{
+ TRACE("\n");
+ return 2;
+}
+
+static ULONG WINAPI UserIdentityManager_Release(IUserIdentityManager *iface)
+{
+ TRACE("\n");
+ return 1;
+}
+
+static HRESULT WINAPI UserIdentityManager_EnumIdentities(IUserIdentityManager *iface, IEnumUserIdentity **ppEnumUser)
+{
+ FIXME("(%p)\n", ppEnumUser);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI UserIdentityManager_ManageIdentities(IUserIdentityManager *iface, HWND hwndParent, DWORD dwFlags)
+{
+ FIXME("(%p %x)\n", hwndParent, dwFlags);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI UserIdentityManager_Logon(IUserIdentityManager *iface, HWND hwndParent,
+ DWORD dwFlags, IUserIdentity **ppIdentity)
+{
+ FIXME("(%p %x %p)\n", hwndParent, dwFlags, ppIdentity);
+ return E_USER_CANCELLED;
+}
+
+static HRESULT WINAPI UserIdentityManager_Logoff(IUserIdentityManager *iface, HWND hwndParent)
+{
+ FIXME("(%p)\n", hwndParent);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI UserIdentityManager_GetIdentityByCookie(IUserIdentityManager *iface, GUID *uidCookie,
+ IUserIdentity **ppIdentity)
+{
+ FIXME("(%p %p)\n", uidCookie, ppIdentity);
+ return E_NOTIMPL;
+}
+
+static const IUserIdentityManagerVtbl UserIdentityManagerVtbl = {
+ UserIdentityManager_QueryInterface,
+ UserIdentityManager_AddRef,
+ UserIdentityManager_Release,
+ UserIdentityManager_EnumIdentities,
+ UserIdentityManager_ManageIdentities,
+ UserIdentityManager_Logon,
+ UserIdentityManager_Logoff,
+ UserIdentityManager_GetIdentityByCookie
+};
+
+static IUserIdentityManager UserIdentityManager = { &UserIdentityManagerVtbl };
+
+static HRESULT WINAPI UserIdentityManager_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
+{
+ TRACE("\n");
+
+ return IUserIdentityManager_QueryInterface(&UserIdentityManager, riid, ppv);
+}
+
+static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
+{
+ *ppv = NULL;
+
+ if(IsEqualGUID(&IID_IUnknown, riid)) {
+ TRACE("(%p)->(IID_IUnknown %p)\n", iface, ppv);
+ *ppv = iface;
+ }else if(IsEqualGUID(&IID_IClassFactory, riid)) {
+ TRACE("(%p)->(IID_IClassFactory %p)\n", iface, ppv);
+ *ppv = iface;
+ }
+
+ if(*ppv) {
+ IUnknown_AddRef((IUnknown*)*ppv);
+ return S_OK;
+ }
+
+ FIXME("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv);
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
+{
+ TRACE("(%p)\n", iface);
+ return 2;
+}
+
+static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
+{
+ TRACE("(%p)\n", iface);
+ return 1;
+}
+
+static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
+{
+ TRACE("(%p)->(%x)\n", iface, fLock);
+ return S_OK;
+}
+
+static const IClassFactoryVtbl UserIdentityManagerCFVtbl = {
+ ClassFactory_QueryInterface,
+ ClassFactory_AddRef,
+ ClassFactory_Release,
+ UserIdentityManager_CreateInstance,
+ ClassFactory_LockServer
+};
+
+static IClassFactory UserIdentityManagerCF = { &UserIdentityManagerCFVtbl };
+
/******************************************************************
* DllMain (msident.@)
*/
@@ -53,6 +185,11 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
*/
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
+ if(IsEqualGUID(&CLSID_UserIdentityManager, rclsid)) {
+ TRACE("CLSID_UserIdentityManager\n");
+ return IClassFactory_QueryInterface(&UserIdentityManagerCF, riid, ppv);
+ }
+
FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
return CLASS_E_CLASSNOTAVAILABLE;
}
More information about the wine-cvs
mailing list