[NTOSKRNL] Drop the useless Timestamp field
[reactos.git] / dll / win32 / pstorec / pstorec.c
index 0a6a6c1..02cd803 100644 (file)
@@ -24,6 +24,7 @@
 #include "windef.h"
 #include "winbase.h"
 #include "winuser.h"
+#include "initguid.h"
 #include "ole2.h"
 #include "pstore.h"
 
@@ -53,8 +54,6 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD fdwReason, LPVOID fImpLoad)
     case DLL_PROCESS_ATTACH:
         DisableThreadLibraryCalls(hinst);
         break;
-    case DLL_PROCESS_DETACH:
-        break;
     }
     return TRUE;
 }
@@ -69,13 +68,13 @@ static HRESULT WINAPI PStore_fnQueryInterface(
 {
     PStore_impl *This = impl_from_IPStore(iface);
 
-    TRACE("%p %s\n",This,debugstr_guid(riid));
+    TRACE("%p %s %p\n", This, debugstr_guid(riid), ppvObj);
 
     *ppvObj = NULL;
 
-    if (IsEqualIID(riid, &IID_IUnknown))
+    if (IsEqualIID(riid, &IID_IPStore) || IsEqualIID(riid, &IID_IUnknown))
     {
-        *ppvObj = This;
+        *ppvObj = &This->IPStore_iface;
     }
 
     if (*ppvObj)
@@ -296,10 +295,10 @@ static HRESULT WINAPI PStore_fnWriteItem( IPStore* This, PST_KEY Key,
  */
 static HRESULT WINAPI PStore_fnOpenItem( IPStore* This, PST_KEY Key,
     const GUID* pItemType, const GUID* pItemSubtype, LPCWSTR szItemName,
-    PST_ACCESSMODE ModeFlags, PPST_PROMPTINFO pProomptInfo, DWORD dwFlags )
+    PST_ACCESSMODE ModeFlags, PPST_PROMPTINFO pPromptInfo, DWORD dwFlags )
 {
     FIXME("(%p,%08x,%s,%s,%s,%08x,%p,%08x) stub\n", This, Key, debugstr_guid(pItemType),
-           debugstr_guid(pItemSubtype), debugstr_w(szItemName), ModeFlags, pProomptInfo, dwFlags);
+           debugstr_guid(pItemSubtype), debugstr_w(szItemName), ModeFlags, pPromptInfo, dwFlags);
     return E_NOTIMPL;
 }
 
@@ -366,7 +365,7 @@ HRESULT WINAPI PStoreCreateInstance( IPStore** ppProvider,
     ips->IPStore_iface.lpVtbl = &pstores_vtbl;
     ips->ref = 1;
 
-    *ppProvider = (IPStore*) ips;
+    *ppProvider = &ips->IPStore_iface;
 
     return S_OK;
 }
@@ -394,5 +393,5 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
 
 HRESULT WINAPI DllCanUnloadNow(void)
 {
-    return S_OK;
+    return S_FALSE;
 }