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
5290480c
Commit
5290480c
authored
Dec 09, 2019
by
Hans Leidekker
Committed by
Alexandre Julliard
Dec 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msado15: Implement _Stream_Open and _Stream_Close.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
849ff3b6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
4 deletions
+35
-4
msado15_private.h
dlls/msado15/msado15_private.h
+2
-0
stream.c
dlls/msado15/stream.c
+16
-4
msado15.c
dlls/msado15/tests/msado15.c
+17
-0
No files found.
dlls/msado15/msado15_private.h
View file @
5290480c
...
...
@@ -19,6 +19,8 @@
#ifndef _WINE_MSADO15_PRIVATE_H_
#define _WINE_MSADO15_PRIVATE_H_
#define MAKE_ADO_HRESULT( err ) MAKE_HRESULT( SEVERITY_ERROR, FACILITY_CONTROL, err )
HRESULT
Connection_create
(
void
**
)
DECLSPEC_HIDDEN
;
HRESULT
Recordset_create
(
void
**
)
DECLSPEC_HIDDEN
;
HRESULT
Stream_create
(
void
**
)
DECLSPEC_HIDDEN
;
...
...
dlls/msado15/stream.c
View file @
5290480c
...
...
@@ -34,6 +34,7 @@ struct stream
{
_Stream
Stream_iface
;
LONG
refs
;
ObjectStateEnum
state
;
StreamTypeEnum
type
;
};
...
...
@@ -198,14 +199,25 @@ static HRESULT WINAPI stream_Read( _Stream *iface, LONG size, VARIANT *val )
static
HRESULT
WINAPI
stream_Open
(
_Stream
*
iface
,
VARIANT
src
,
ConnectModeEnum
mode
,
StreamOpenOptionsEnum
options
,
BSTR
username
,
BSTR
password
)
{
FIXME
(
"%p, %s, %u, %d, %s, %p
\n
"
,
iface
,
debugstr_variant
(
&
src
),
mode
,
options
,
debugstr_w
(
username
),
password
);
return
E_NOTIMPL
;
struct
stream
*
stream
=
impl_from_Stream
(
iface
);
FIXME
(
"%p, %s, %u, %d, %s, %p
\n
"
,
stream
,
debugstr_variant
(
&
src
),
mode
,
options
,
debugstr_w
(
username
),
password
);
if
(
stream
->
state
==
adStateOpen
)
return
MAKE_ADO_HRESULT
(
adErrObjectOpen
);
stream
->
state
=
adStateOpen
;
return
S_OK
;
}
static
HRESULT
WINAPI
stream_Close
(
_Stream
*
iface
)
{
FIXME
(
"%p
\n
"
,
iface
);
return
E_NOTIMPL
;
struct
stream
*
stream
=
impl_from_Stream
(
iface
);
TRACE
(
"%p
\n
"
,
stream
);
if
(
stream
->
state
==
adStateClosed
)
return
MAKE_ADO_HRESULT
(
adErrObjectClosed
);
stream
->
state
=
adStateClosed
;
return
S_OK
;
}
static
HRESULT
WINAPI
stream_SkipLine
(
_Stream
*
iface
)
...
...
dlls/msado15/tests/msado15.c
View file @
5290480c
...
...
@@ -23,11 +23,14 @@
#include <msado15_backcompat.h>
#include "wine/test.h"
#define MAKE_ADO_HRESULT( err ) MAKE_HRESULT( SEVERITY_ERROR, FACILITY_CONTROL, err )
static
void
test_Stream
(
void
)
{
_Stream
*
stream
;
StreamTypeEnum
type
;
LONG
refs
;
VARIANT
missing
;
HRESULT
hr
;
hr
=
CoCreateInstance
(
&
CLSID_Stream
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID__Stream
,
(
void
**
)
&
stream
);
...
...
@@ -51,6 +54,20 @@ static void test_Stream(void)
hr
=
_Stream_put_Type
(
stream
,
adTypeText
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
V_VT
(
&
missing
)
=
VT_ERROR
;
V_ERROR
(
&
missing
)
=
DISP_E_PARAMNOTFOUND
;
hr
=
_Stream_Open
(
stream
,
missing
,
adModeUnknown
,
adOpenStreamUnspecified
,
NULL
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
_Stream_Open
(
stream
,
missing
,
adModeUnknown
,
adOpenStreamUnspecified
,
NULL
,
NULL
);
ok
(
hr
==
MAKE_ADO_HRESULT
(
adErrObjectOpen
),
"got %08x
\n
"
,
hr
);
hr
=
_Stream_Close
(
stream
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
hr
=
_Stream_Close
(
stream
);
ok
(
hr
==
MAKE_ADO_HRESULT
(
adErrObjectClosed
),
"got %08x
\n
"
,
hr
);
refs
=
_Stream_Release
(
stream
);
ok
(
!
refs
,
"got %d
\n
"
,
refs
);
}
...
...
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