Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6297ba3d
Commit
6297ba3d
authored
Aug 01, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 01, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: Stub for IRowPosition.
parent
8fcac3b2
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
192 additions
and
1 deletion
+192
-1
Makefile.in
dlls/oledb32/Makefile.in
+2
-1
main.c
dlls/oledb32/main.c
+6
-0
oledb32_classes.idl
dlls/oledb32/oledb32_classes.idl
+12
-0
oledb_private.h
dlls/oledb32/oledb_private.h
+1
-0
rowpos.c
dlls/oledb32/rowpos.c
+155
-0
database.c
dlls/oledb32/tests/database.c
+15
-0
msdaguid.h
include/msdaguid.h
+1
-0
No files found.
dlls/oledb32/Makefile.in
View file @
6297ba3d
...
...
@@ -6,7 +6,8 @@ C_SRCS = \
convert.c
\
datainit.c
\
errorinfo.c
\
main.c
main.c
\
rowpos.c
IDL_I_SRCS
=
convert.idl
...
...
dlls/oledb32/main.c
View file @
6297ba3d
...
...
@@ -129,6 +129,7 @@ static const IClassFactoryVtbl CF_Vtbl =
static
cf
oledb_convert_cf
=
{
{
&
CF_Vtbl
},
create_oledb_convert
};
static
cf
oledb_datainit_cf
=
{
{
&
CF_Vtbl
},
create_data_init
};
static
cf
oledb_errorinfo_cf
=
{
{
&
CF_Vtbl
},
create_error_info
};
static
cf
oledb_rowpos_cf
=
{
{
&
CF_Vtbl
},
create_oledb_rowpos
};
/******************************************************************
* DllGetClassObject
...
...
@@ -152,6 +153,11 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **obj)
*
obj
=
&
oledb_errorinfo_cf
;
return
S_OK
;
}
else
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_OLEDB_ROWPOSITIONLIBRARY
)
)
{
*
obj
=
&
oledb_rowpos_cf
;
return
S_OK
;
}
return
CLASS_E_CLASSNOTAVAILABLE
;
}
...
...
dlls/oledb32/oledb32_classes.idl
View file @
6297ba3d
...
...
@@ -41,3 +41,15 @@ coclass OLEDB_CONVERSIONLIBRARY
coclass
OLEDB_MSDAER
{
}
[
helpstring
(
"OLE DB Row Position Library"
),
threading
(
both
),
progid
(
"RowPosition.RowPosition.1"
),
vi_progid
(
"RowPosition.RowPosition"
),
uuid
(
2048
eee6
-
7
fa2
-
11
d0
-
9
e6a
-
00
a0c9138c29
)
]
coclass
OLEDB_ROWPOSITIONLIBRARY
{
interface
IRowPosition
;
}
dlls/oledb32/oledb_private.h
View file @
6297ba3d
...
...
@@ -20,3 +20,4 @@
HRESULT
create_oledb_convert
(
IUnknown
*
outer
,
void
**
obj
)
DECLSPEC_HIDDEN
;
HRESULT
create_data_init
(
IUnknown
*
outer
,
void
**
obj
)
DECLSPEC_HIDDEN
;
HRESULT
create_error_info
(
IUnknown
*
outer
,
void
**
obj
)
DECLSPEC_HIDDEN
;
HRESULT
create_oledb_rowpos
(
IUnknown
*
outer
,
void
**
obj
)
DECLSPEC_HIDDEN
;
dlls/oledb32/rowpos.c
0 → 100644
View file @
6297ba3d
/* OLE DB Row Position library
*
* Copyright 2013 Nikolay Sivov
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COBJMACROS
#include "windef.h"
#include "ole2.h"
#include "oledb.h"
#include "oledb_private.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
oledb
);
typedef
struct
{
IRowPosition
IRowPosition_iface
;
LONG
ref
;
}
rowpos
;
static
inline
rowpos
*
impl_from_IRowPosition
(
IRowPosition
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
rowpos
,
IRowPosition_iface
);
}
static
HRESULT
WINAPI
rowpos_QueryInterface
(
IRowPosition
*
iface
,
REFIID
riid
,
void
**
obj
)
{
rowpos
*
This
=
impl_from_IRowPosition
(
iface
);
TRACE
(
"(%p)->(%s, %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
obj
);
*
obj
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IRowPosition
))
{
*
obj
=
iface
;
}
else
{
FIXME
(
"interface %s not implemented
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
}
IRowPosition_AddRef
(
iface
);
return
S_OK
;
}
static
ULONG
WINAPI
rowpos_AddRef
(
IRowPosition
*
iface
)
{
rowpos
*
This
=
impl_from_IRowPosition
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(%d)
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
rowpos_Release
(
IRowPosition
*
iface
)
{
rowpos
*
This
=
impl_from_IRowPosition
(
iface
);
LONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(%d)
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
ref
;
}
static
HRESULT
WINAPI
rowpos_ClearRowPosition
(
IRowPosition
*
iface
)
{
rowpos
*
This
=
impl_from_IRowPosition
(
iface
);
FIXME
(
"(%p): stub
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
rowpos_GetRowPosition
(
IRowPosition
*
iface
,
HCHAPTER
*
chapter
,
HROW
*
row
,
DBPOSITIONFLAGS
*
flags
)
{
rowpos
*
This
=
impl_from_IRowPosition
(
iface
);
FIXME
(
"(%p)->(%p %p %p): stub
\n
"
,
This
,
chapter
,
row
,
flags
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
rowpos_GetRowset
(
IRowPosition
*
iface
,
REFIID
riid
,
IUnknown
**
rowset
)
{
rowpos
*
This
=
impl_from_IRowPosition
(
iface
);
FIXME
(
"(%p)->(%s %p): stub
\n
"
,
This
,
debugstr_guid
(
riid
),
rowset
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
rowpos_Initialize
(
IRowPosition
*
iface
,
IUnknown
*
rowset
)
{
rowpos
*
This
=
impl_from_IRowPosition
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
rowset
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
rowpos_SetRowPosition
(
IRowPosition
*
iface
,
HCHAPTER
chapter
,
HROW
row
,
DBPOSITIONFLAGS
flags
)
{
rowpos
*
This
=
impl_from_IRowPosition
(
iface
);
FIXME
(
"(%p)->(%lx %lx %d): stub
\n
"
,
This
,
chapter
,
row
,
flags
);
return
E_NOTIMPL
;
}
static
const
struct
IRowPositionVtbl
rowpos_vtbl
=
{
rowpos_QueryInterface
,
rowpos_AddRef
,
rowpos_Release
,
rowpos_ClearRowPosition
,
rowpos_GetRowPosition
,
rowpos_GetRowset
,
rowpos_Initialize
,
rowpos_SetRowPosition
};
HRESULT
create_oledb_rowpos
(
IUnknown
*
outer
,
void
**
obj
)
{
rowpos
*
This
;
TRACE
(
"(%p, %p)
\n
"
,
outer
,
obj
);
*
obj
=
NULL
;
if
(
outer
)
return
CLASS_E_NOAGGREGATION
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
This
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
IRowPosition_iface
.
lpVtbl
=
&
rowpos_vtbl
;
This
->
ref
=
1
;
*
obj
=
&
This
->
IRowPosition_iface
;
return
S_OK
;
}
dlls/oledb32/tests/database.c
View file @
6297ba3d
...
...
@@ -28,6 +28,7 @@
#include "msdadc.h"
#include "msdasc.h"
#include "shlobj.h"
#include "msdaguid.h"
#include "initguid.h"
#include "wine/test.h"
...
...
@@ -185,6 +186,17 @@ static void test_initializationstring(void)
}
}
static
void
test_rowposition
(
void
)
{
IRowPosition
*
rowpos
;
HRESULT
hr
;
hr
=
CoCreateInstance
(
&
CLSID_OLEDB_ROWPOSITIONLIBRARY
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IRowPosition
,
(
void
**
)
&
rowpos
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
IRowPosition_Release
(
rowpos
);
}
START_TEST
(
database
)
{
OleInitialize
(
NULL
);
...
...
@@ -193,5 +205,8 @@ START_TEST(database)
test_errorinfo
();
test_initializationstring
();
/* row position */
test_rowposition
();
OleUninitialize
();
}
include/msdaguid.h
View file @
6297ba3d
...
...
@@ -22,5 +22,6 @@
DEFINE_GUID
(
CLSID_EXTENDEDERRORINFO
,
0xc8b522cf
,
0x5cf3
,
0x11ce
,
0xad
,
0xe5
,
0x00
,
0xaa
,
0x00
,
0x44
,
0x77
,
0x3d
);
DEFINE_GUID
(
CLSID_OLEDB_ENUMERATOR
,
0xc8b522d0
,
0x5cf3
,
0x11ce
,
0xad
,
0xe5
,
0x00
,
0xaa
,
0x00
,
0x44
,
0x77
,
0x3d
);
DEFINE_GUID
(
CLSID_OLEDB_CONVERSIONLIBRARY
,
0xc8b522d1
,
0x5cf3
,
0x11ce
,
0xad
,
0xe5
,
0x00
,
0xaa
,
0x00
,
0x44
,
0x77
,
0x3d
);
DEFINE_GUID
(
CLSID_OLEDB_ROWPOSITIONLIBRARY
,
0x2048eee6
,
0x7fa2
,
0x11d0
,
0x9e
,
0x6a
,
0x00
,
0xa0
,
0xc9
,
0x13
,
0x8c
,
0x29
);
#endif
/*__WINE_MSDAGUID_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment