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
d1dfdd72
Commit
d1dfdd72
authored
Feb 02, 2010
by
Huw Davies
Committed by
Alexandre Julliard
Feb 03, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msdaps: Add a stub server object.
parent
39710f88
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
136 additions
and
6 deletions
+136
-6
row_server.c
dlls/msdaps/row_server.c
+122
-6
row_server.idl
dlls/msdaps/row_server.idl
+14
-0
No files found.
dlls/msdaps/row_server.c
View file @
d1dfdd72
...
...
@@ -39,18 +39,134 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
oledb
);
HRESULT
create_row_server
(
IUnknown
*
outer
,
void
**
obj
)
typedef
struct
{
const
IWineRowServerVtbl
*
vtbl
;
LONG
ref
;
CLSID
class
;
IMarshal
*
marshal
;
IUnknown
*
inner_unk
;
}
server
;
static
inline
server
*
impl_from_IWineRowServer
(
IWineRowServer
*
iface
)
{
return
(
server
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
server
,
vtbl
));
}
static
HRESULT
WINAPI
server_QueryInterface
(
IWineRowServer
*
iface
,
REFIID
riid
,
void
**
obj
)
{
FIXME
(
"(%p, %p): stub
\n
"
,
outer
,
obj
);
server
*
This
=
impl_from_IWineRowServer
(
iface
);
TRACE
(
"(%p)->(%s, %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
obj
);
*
obj
=
NULL
;
return
E_NOTIMPL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IWineRowServer
))
{
*
obj
=
iface
;
}
else
{
if
(
!
IsEqualIID
(
riid
,
&
IID_IMarshal
))
/* We use standard marshalling */
FIXME
(
"interface %s not implemented
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
}
IWineRowServer_AddRef
(
iface
);
return
S_OK
;
}
HRESULT
create_rowset_server
(
IUnknown
*
outer
,
void
**
obj
)
static
ULONG
WINAPI
server_AddRef
(
IWineRowServer
*
iface
)
{
server
*
This
=
impl_from_IWineRowServer
(
iface
);
TRACE
(
"(%p)
\n
"
,
This
);
return
InterlockedIncrement
(
&
This
->
ref
);
}
static
ULONG
WINAPI
server_Release
(
IWineRowServer
*
iface
)
{
server
*
This
=
impl_from_IWineRowServer
(
iface
);
LONG
ref
;
TRACE
(
"(%p)
\n
"
,
This
);
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
ref
==
0
)
{
IMarshal_Release
(
This
->
marshal
);
if
(
This
->
inner_unk
)
IUnknown_Release
(
This
->
inner_unk
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
}
static
HRESULT
WINAPI
server_SetInnerUnk
(
IWineRowServer
*
iface
,
IUnknown
*
inner
)
{
server
*
This
=
impl_from_IWineRowServer
(
iface
);
if
(
This
->
inner_unk
)
IUnknown_Release
(
This
->
inner_unk
);
if
(
inner
)
IUnknown_AddRef
(
inner
);
This
->
inner_unk
=
inner
;
return
S_OK
;
}
static
HRESULT
WINAPI
server_GetMarshal
(
IWineRowServer
*
iface
,
IMarshal
**
marshal
)
{
server
*
This
=
impl_from_IWineRowServer
(
iface
);
IMarshal_AddRef
(
This
->
marshal
);
*
marshal
=
This
->
marshal
;
return
S_OK
;
}
static
const
IWineRowServerVtbl
server_vtbl
=
{
FIXME
(
"(%p, %p): stub
\n
"
,
outer
,
obj
);
server_QueryInterface
,
server_AddRef
,
server_Release
,
server_SetInnerUnk
,
server_GetMarshal
};
static
HRESULT
create_server
(
IUnknown
*
outer
,
const
CLSID
*
class
,
void
**
obj
)
{
server
*
server
;
TRACE
(
"(%p, %s, %p)
\n
"
,
outer
,
debugstr_guid
(
class
),
obj
);
*
obj
=
NULL
;
return
E_NOTIMPL
;
server
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
server
));
if
(
!
server
)
return
E_OUTOFMEMORY
;
server
->
vtbl
=
&
server_vtbl
;
server
->
ref
=
1
;
server
->
class
=
*
class
;
server
->
inner_unk
=
NULL
;
if
(
IsEqualGUID
(
class
,
&
CLSID_wine_row_server
))
create_row_marshal
((
IUnknown
*
)
server
,
(
void
**
)
&
server
->
marshal
);
else
if
(
IsEqualGUID
(
class
,
&
CLSID_wine_rowset_server
))
create_rowset_marshal
((
IUnknown
*
)
server
,
(
void
**
)
&
server
->
marshal
);
else
ERR
(
"create_server called with class %s
\n
"
,
debugstr_guid
(
class
));
*
obj
=
server
;
return
S_OK
;
}
HRESULT
create_row_server
(
IUnknown
*
outer
,
void
**
obj
)
{
return
create_server
(
outer
,
&
CLSID_wine_row_server
,
obj
);
}
HRESULT
create_rowset_server
(
IUnknown
*
outer
,
void
**
obj
)
{
return
create_server
(
outer
,
&
CLSID_wine_rowset_server
,
obj
);
}
/* Marshal impl */
...
...
dlls/msdaps/row_server.idl
View file @
d1dfdd72
...
...
@@ -18,6 +18,20 @@
*
Foundation
,
Inc
.
,
51
Franklin
St
,
Fifth
Floor
,
Boston
,
MA
02110
-
1301
,
USA
*/
import
"oledb.idl"
;
[
object
,
uuid
(
38248178
-
cf6d
-
11
de
-
abe5
-
000
c2916d865
),
pointer_default
(
unique
)
]
interface
IWineRowServer
:
IUnknown
{
[
local
]
HRESULT
SetInnerUnk
(
[
in
]
IUnknown
*
unknown
)
;
[
local
]
HRESULT
GetMarshal
(
[
out
]
IMarshal
**
marshal
)
;
}
[
uuid
(
38248178
-
cf6d
-
11
de
-
abe5
-
000
c2916d865
)
]
...
...
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