Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
05a807af
Commit
05a807af
authored
Sep 30, 2013
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Oct 01, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: Implement IDataSourceLocator get/put hWnd.
parent
b3475549
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
4 deletions
+58
-4
dslocator.c
dlls/oledb32/dslocator.c
+10
-4
database.c
dlls/oledb32/tests/database.c
+48
-0
No files found.
dlls/oledb32/dslocator.c
View file @
05a807af
...
...
@@ -42,6 +42,7 @@ typedef struct DSLocatorImpl
IDataSourceLocator
IDataSourceLocator_iface
;
LONG
ref
;
HWND
hwnd
;
}
DSLocatorImpl
;
static
inline
DSLocatorImpl
*
impl_from_IDataSourceLocator
(
IDataSourceLocator
*
iface
)
...
...
@@ -139,18 +140,22 @@ static HRESULT WINAPI dslocator_get_hWnd(IDataSourceLocator *iface, COMPATIBLE_L
{
DSLocatorImpl
*
This
=
impl_from_IDataSourceLocator
(
iface
);
FIXM
E
(
"(%p)->(%p)
\n
"
,
This
,
phwndParent
);
TRAC
E
(
"(%p)->(%p)
\n
"
,
This
,
phwndParent
);
return
E_NOTIMPL
;
*
phwndParent
=
(
COMPATIBLE_LONG
)
This
->
hwnd
;
return
S_OK
;
}
static
HRESULT
WINAPI
dslocator_put_hWnd
(
IDataSourceLocator
*
iface
,
COMPATIBLE_LONG
hwndParent
)
{
DSLocatorImpl
*
This
=
impl_from_IDataSourceLocator
(
iface
);
FIXM
E
(
"(%p)->(%p)
\n
"
,
This
,
(
HWND
)
hwndParent
);
TRAC
E
(
"(%p)->(%p)
\n
"
,
This
,
(
HWND
)
hwndParent
);
return
E_NOTIMPL
;
This
->
hwnd
=
(
HWND
)
hwndParent
;
return
S_OK
;
}
static
HRESULT
WINAPI
dslocator_PromptNew
(
IDataSourceLocator
*
iface
,
IDispatch
**
ppADOConnection
)
...
...
@@ -201,6 +206,7 @@ HRESULT create_dslocator(IUnknown *outer, void **obj)
This
->
IDataSourceLocator_iface
.
lpVtbl
=
&
DSLocatorVtbl
;
This
->
ref
=
1
;
This
->
hwnd
=
0
;
*
obj
=
&
This
->
IDataSourceLocator_iface
;
...
...
dlls/oledb32/tests/database.c
View file @
05a807af
...
...
@@ -547,6 +547,53 @@ static void test_rowpos_setrowposition(void)
IRowPosition_Release
(
rowpos
);
}
static
void
test_dslocator
(
void
)
{
IDataSourceLocator
*
dslocator
=
NULL
;
HRESULT
hr
;
hr
=
CoCreateInstance
(
&
CLSID_DataLinks
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDataSourceLocator
,(
void
**
)
&
dslocator
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
COMPATIBLE_LONG
hwnd
=
0
;
/* Crashes under Window 7
hr = IDataSourceLocator_get_hWnd(dslocator, NULL);
ok(hr == E_INVALIDARG, "got %08x\n", hr);
*/
hr
=
IDataSourceLocator_get_hWnd
(
dslocator
,
&
hwnd
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hwnd
==
0
,
"got %p
\n
"
,
(
HWND
)
hwnd
);
hwnd
=
0xDEADBEEF
;
hr
=
IDataSourceLocator_get_hWnd
(
dslocator
,
&
hwnd
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hwnd
==
0
,
"got %p
\n
"
,
(
HWND
)
hwnd
);
hwnd
=
0xDEADBEEF
;
hr
=
IDataSourceLocator_put_hWnd
(
dslocator
,
hwnd
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hwnd
=
0xDEADBEEF
;
hr
=
IDataSourceLocator_get_hWnd
(
dslocator
,
&
hwnd
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hwnd
==
0xDEADBEEF
,
"got %p
\n
"
,
(
HWND
)
hwnd
);
hwnd
=
0
;
hr
=
IDataSourceLocator_put_hWnd
(
dslocator
,
hwnd
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hwnd
=
0xDEADBEEF
;
hr
=
IDataSourceLocator_get_hWnd
(
dslocator
,
&
hwnd
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hwnd
==
0
,
"got %p
\n
"
,
(
HWND
)
hwnd
);
IDataSourceLocator_Release
(
dslocator
);
}
}
START_TEST
(
database
)
{
OleInitialize
(
NULL
);
...
...
@@ -554,6 +601,7 @@ START_TEST(database)
test_database
();
test_errorinfo
();
test_initializationstring
();
test_dslocator
();
/* row position */
test_rowposition
();
...
...
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