Commit 0e2e8386 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

oledb32: Implement IRowPosition::Initialize().

parent 6297ba3d
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "ole2.h" #include "ole2.h"
#include "oledb.h" #include "oledb.h"
#include "oledberr.h"
#include "oledb_private.h" #include "oledb_private.h"
#include "wine/debug.h" #include "wine/debug.h"
...@@ -33,6 +34,8 @@ typedef struct ...@@ -33,6 +34,8 @@ typedef struct
{ {
IRowPosition IRowPosition_iface; IRowPosition IRowPosition_iface;
LONG ref; LONG ref;
IRowset *rowset;
} rowpos; } rowpos;
static inline rowpos *impl_from_IRowPosition(IRowPosition *iface) static inline rowpos *impl_from_IRowPosition(IRowPosition *iface)
...@@ -79,7 +82,10 @@ static ULONG WINAPI rowpos_Release(IRowPosition* iface) ...@@ -79,7 +82,10 @@ static ULONG WINAPI rowpos_Release(IRowPosition* iface)
TRACE("(%p)->(%d)\n", This, ref); TRACE("(%p)->(%d)\n", This, ref);
if (ref == 0) if (ref == 0)
{
if (This->rowset) IRowset_Release(This->rowset);
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, This);
}
return ref; return ref;
} }
...@@ -109,8 +115,12 @@ static HRESULT WINAPI rowpos_GetRowset(IRowPosition *iface, REFIID riid, IUnknow ...@@ -109,8 +115,12 @@ static HRESULT WINAPI rowpos_GetRowset(IRowPosition *iface, REFIID riid, IUnknow
static HRESULT WINAPI rowpos_Initialize(IRowPosition *iface, IUnknown *rowset) static HRESULT WINAPI rowpos_Initialize(IRowPosition *iface, IUnknown *rowset)
{ {
rowpos *This = impl_from_IRowPosition(iface); rowpos *This = impl_from_IRowPosition(iface);
FIXME("(%p)->(%p): stub\n", This, rowset);
return E_NOTIMPL; TRACE("(%p)->(%p)\n", This, rowset);
if (This->rowset) return DB_E_ALREADYINITIALIZED;
return IUnknown_QueryInterface(rowset, &IID_IRowset, (void**)&This->rowset);
} }
static HRESULT WINAPI rowpos_SetRowPosition(IRowPosition *iface, HCHAPTER chapter, static HRESULT WINAPI rowpos_SetRowPosition(IRowPosition *iface, HCHAPTER chapter,
...@@ -148,6 +158,7 @@ HRESULT create_oledb_rowpos(IUnknown *outer, void **obj) ...@@ -148,6 +158,7 @@ HRESULT create_oledb_rowpos(IUnknown *outer, void **obj)
This->IRowPosition_iface.lpVtbl = &rowpos_vtbl; This->IRowPosition_iface.lpVtbl = &rowpos_vtbl;
This->ref = 1; This->ref = 1;
This->rowset = NULL;
*obj = &This->IRowPosition_iface; *obj = &This->IRowPosition_iface;
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#define DB_E_BADPROPERTYVALUE 0x80040e44 #define DB_E_BADPROPERTYVALUE 0x80040e44
#define DB_E_INVALID 0x80040e45 #define DB_E_INVALID 0x80040e45
#define DB_E_ALREADYINITIALIZED 0x80040e52
#define DB_E_DATAOVERFLOW 0x80040e57 #define DB_E_DATAOVERFLOW 0x80040e57
#define DB_E_MISMATCHEDPROVIDER 0x80040e75 #define DB_E_MISMATCHEDPROVIDER 0x80040e75
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment