[NTOSKRNL] Drop the useless Timestamp field
[reactos.git] / dll / win32 / pstorec / pstorec.c
index 6dac3d6..02cd803 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
 #include <stdarg.h>
 
 #define COBJMACROS
-#include <windef.h>
-#include <winbase.h>
-//#include "winuser.h"
-#include <ole2.h>
-#include <pstore.h>
+#include "windef.h"
+#include "winbase.h"
+#include "winuser.h"
+#include "initguid.h"
+#include "ole2.h"
+#include "pstore.h"
 
-#include <wine/debug.h>
+#include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(pstores);
 
@@ -71,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)
@@ -298,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;
 }
 
@@ -368,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;
 }