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
44cc7bef
Commit
44cc7bef
authored
Jun 07, 2020
by
Gijs Vermeulen
Committed by
Alexandre Julliard
Jun 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msado15: Improve _Connection_Open/Close stubs.
Signed-off-by:
Gijs Vermeulen
<
gijsvrm@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
79228f64
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
4 deletions
+46
-4
connection.c
dlls/msado15/connection.c
+14
-3
msado15.c
dlls/msado15/tests/msado15.c
+26
-1
msado15_backcompat.idl
include/msado15_backcompat.idl
+6
-0
No files found.
dlls/msado15/connection.c
View file @
44cc7bef
...
...
@@ -221,8 +221,14 @@ static HRESULT WINAPI connection_get_Version( _Connection *iface, BSTR *str )
static
HRESULT
WINAPI
connection_Close
(
_Connection
*
iface
)
{
FIXME
(
"%p
\n
"
,
iface
);
return
E_NOTIMPL
;
struct
connection
*
connection
=
impl_from_Connection
(
iface
);
TRACE
(
"%p
\n
"
,
connection
);
if
(
connection
->
state
==
adStateClosed
)
return
MAKE_ADO_HRESULT
(
adErrObjectClosed
);
connection
->
state
=
adStateClosed
;
return
S_OK
;
}
static
HRESULT
WINAPI
connection_Execute
(
_Connection
*
iface
,
BSTR
command
,
VARIANT
*
records_affected
,
...
...
@@ -253,9 +259,14 @@ static HRESULT WINAPI connection_RollbackTrans( _Connection *iface )
static
HRESULT
WINAPI
connection_Open
(
_Connection
*
iface
,
BSTR
connect_str
,
BSTR
userid
,
BSTR
password
,
LONG
options
)
{
struct
connection
*
connection
=
impl_from_Connection
(
iface
);
FIXME
(
"%p, %s, %s, %p, %08x
\n
"
,
iface
,
debugstr_w
(
connect_str
),
debugstr_w
(
userid
),
password
,
options
);
return
E_NOTIMPL
;
if
(
connection
->
state
==
adStateOpen
)
return
MAKE_ADO_HRESULT
(
adErrObjectOpen
);
connection
->
state
=
adStateOpen
;
return
S_OK
;
}
static
HRESULT
WINAPI
connection_get_Errors
(
_Connection
*
iface
,
Errors
**
obj
)
...
...
dlls/msado15/tests/msado15.c
View file @
44cc7bef
...
...
@@ -674,7 +674,7 @@ static void test_Connection(void)
ISupportErrorInfo
*
errorinfo
;
IConnectionPointContainer
*
pointcontainer
;
LONG
state
,
timeout
;
BSTR
str
,
str2
;
BSTR
str
,
str2
,
str3
;
hr
=
CoCreateInstance
(
&
CLSID_Connection
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID__Connection
,
(
void
**
)
&
connection
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
...
...
@@ -702,6 +702,9 @@ if (0) /* Crashes on windows */
ok
(
hr
==
S_OK
,
"Failed to get state, hr 0x%08x
\n
"
,
hr
);
ok
(
state
==
adStateClosed
,
"Unexpected state value 0x%08x
\n
"
,
state
);
hr
=
_Connection_Close
(
connection
);
ok
(
hr
==
MAKE_ADO_HRESULT
(
adErrObjectClosed
),
"got %08x
\n
"
,
hr
);
timeout
=
0
;
hr
=
_Connection_get_CommandTimeout
(
connection
,
&
timeout
);
ok
(
hr
==
S_OK
,
"Failed to get state, hr 0x%08x
\n
"
,
hr
);
...
...
@@ -734,8 +737,30 @@ if (0) /* Crashes on windows */
hr
=
_Connection_get_ConnectionString
(
connection
,
&
str2
);
ok
(
hr
==
S_OK
,
"Failed, hr 0x%08x
\n
"
,
hr
);
ok
(
!
wcscmp
(
str
,
str2
),
"wrong string %s
\n
"
,
wine_dbgstr_w
(
str2
));
hr
=
_Connection_Open
(
connection
,
NULL
,
NULL
,
NULL
,
0
);
todo_wine
ok
(
hr
==
E_FAIL
,
"Failed, hr 0x%08x
\n
"
,
hr
);
/* Open adds trailing ; if it's missing */
str3
=
SysAllocString
(
L"Provider=MSDASQL.1;Persist Security Info=False;Data Source=wine_test;"
);
hr
=
_Connection_Open
(
connection
,
NULL
,
NULL
,
NULL
,
adConnectUnspecified
);
todo_wine
ok
(
hr
==
E_FAIL
,
"Failed, hr 0x%08x
\n
"
,
hr
);
str2
=
NULL
;
hr
=
_Connection_get_ConnectionString
(
connection
,
&
str2
);
ok
(
hr
==
S_OK
,
"Failed, hr 0x%08x
\n
"
,
hr
);
todo_wine
ok
(
!
wcscmp
(
str3
,
str2
)
||
broken
(
!
wcscmp
(
str
,
str2
))
/* XP */
,
"wrong string %s
\n
"
,
wine_dbgstr_w
(
str2
));
hr
=
_Connection_Open
(
connection
,
str
,
NULL
,
NULL
,
adConnectUnspecified
);
todo_wine
ok
(
hr
==
E_FAIL
,
"Failed, hr 0x%08x
\n
"
,
hr
);
SysFreeString
(
str
);
str2
=
NULL
;
hr
=
_Connection_get_ConnectionString
(
connection
,
&
str2
);
ok
(
hr
==
S_OK
,
"Failed, hr 0x%08x
\n
"
,
hr
);
todo_wine
ok
(
!
wcscmp
(
str3
,
str2
)
||
broken
(
!
wcscmp
(
str
,
str2
))
/* XP */
,
"wrong string %s
\n
"
,
wine_dbgstr_w
(
str2
));
SysFreeString
(
str2
);
SysFreeString
(
str3
);
hr
=
_Connection_put_ConnectionString
(
connection
,
NULL
);
ok
(
hr
==
S_OK
,
"Failed, hr 0x%08x
\n
"
,
hr
);
...
...
include/msado15_backcompat.idl
View file @
44cc7bef
...
...
@@ -512,6 +512,12 @@ typedef [uuid(00000531-0000-0010-8000-00aa006d2ea4)] enum EventReasonEnum
adRsnMoveLast
=
15
}
EventReasonEnum
;
typedef
[
uuid
(
00000541
-
0000
-
0010
-
8000
-
00
aa006d2ea4
)
]
enum
ConnectOptionEnum
{
adConnectUnspecified
=
-
1
,
adAsyncConnect
=
0
x10
}
ConnectOptionEnum
;
[
uuid
(
00000503
-
0000
-
0010
-
8000
-
00
aa006d2ea4
),
odl
,
...
...
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