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
064f74bf
Commit
064f74bf
authored
Jul 31, 2017
by
Zebediah Figura
Committed by
Alexandre Julliard
Aug 02, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsquery: Add stub implementation of ICommonQuery.
Signed-off-by:
Zebediah Figura
<
zfigura@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f93e42e0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
188 additions
and
0 deletions
+188
-0
Makefile.in
dlls/dsquery/Makefile.in
+1
-0
main.c
dlls/dsquery/main.c
+187
-0
No files found.
dlls/dsquery/Makefile.in
View file @
064f74bf
MODULE
=
dsquery.dll
IMPORTS
=
uuid
C_SRCS
=
\
main.c
dlls/dsquery/main.c
View file @
064f74bf
...
...
@@ -20,16 +20,183 @@
#include <stdarg.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "rpcproxy.h"
#include "initguid.h"
#include "cmnquery.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
dsquery
);
static
HINSTANCE
instance
;
/******************************************************************
* IClassFactory implementation
*/
struct
query_class_factory
{
IClassFactory
IClassFactory_iface
;
LONG
ref
;
HRESULT
(
*
pfnCreateInstance
)(
IUnknown
*
outer
,
REFIID
riid
,
void
**
out
);
};
static
inline
struct
query_class_factory
*
impl_from_IClassFactory
(
IClassFactory
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
query_class_factory
,
IClassFactory_iface
);
}
static
HRESULT
WINAPI
ClassFactory_QueryInterface
(
IClassFactory
*
iface
,
REFIID
riid
,
void
**
out
)
{
TRACE
(
"(%p)->(%s, %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
out
);
if
(
IsEqualGUID
(
riid
,
&
IID_IClassFactory
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
IClassFactory_AddRef
(
iface
);
*
out
=
iface
;
return
S_OK
;
}
FIXME
(
"interface %s not implemented
\n
"
,
debugstr_guid
(
riid
));
*
out
=
NULL
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
ClassFactory_AddRef
(
IClassFactory
*
iface
)
{
struct
query_class_factory
*
This
=
impl_from_IClassFactory
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) increasing refcount to %u
\n
"
,
iface
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
ClassFactory_Release
(
IClassFactory
*
iface
)
{
struct
query_class_factory
*
This
=
impl_from_IClassFactory
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) decreasing refcount to %u
\n
"
,
iface
,
ref
);
if
(
ref
==
0
)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
ref
;
}
static
HRESULT
WINAPI
ClassFactory_CreateInstance
(
IClassFactory
*
iface
,
IUnknown
*
outer
,
REFIID
riid
,
void
**
out
)
{
struct
query_class_factory
*
This
=
impl_from_IClassFactory
(
iface
);
TRACE
(
"(%p)->(%p, %s, %p)
\n
"
,
iface
,
outer
,
debugstr_guid
(
riid
),
out
);
return
This
->
pfnCreateInstance
(
outer
,
riid
,
out
);
}
static
HRESULT
WINAPI
ClassFactory_LockServer
(
IClassFactory
*
iface
,
BOOL
dolock
)
{
FIXME
(
"(%p)->(%d)
\n
"
,
iface
,
dolock
);
return
S_OK
;
}
static
const
IClassFactoryVtbl
query_class_factory_vtbl
=
{
ClassFactory_QueryInterface
,
ClassFactory_AddRef
,
ClassFactory_Release
,
ClassFactory_CreateInstance
,
ClassFactory_LockServer
,
};
/******************************************************************
* ICommonQuery implementation
*/
struct
common_query
{
ICommonQuery
ICommonQuery_iface
;
LONG
ref
;
};
static
inline
struct
common_query
*
impl_from_ICommonQuery
(
ICommonQuery
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
common_query
,
ICommonQuery_iface
);
}
static
HRESULT
WINAPI
CommonQuery_QueryInterface
(
ICommonQuery
*
iface
,
REFIID
riid
,
void
**
out
)
{
TRACE
(
"(%p)->(%s, %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
out
);
if
(
IsEqualGUID
(
riid
,
&
IID_ICommonQuery
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
ICommonQuery_AddRef
(
iface
);
*
out
=
iface
;
return
S_OK
;
}
FIXME
(
"interface %s not implemented
\n
"
,
debugstr_guid
(
riid
));
*
out
=
NULL
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
CommonQuery_AddRef
(
ICommonQuery
*
iface
)
{
struct
common_query
*
This
=
impl_from_ICommonQuery
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) increasing refcount to %u
\n
"
,
iface
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
CommonQuery_Release
(
ICommonQuery
*
iface
)
{
struct
common_query
*
This
=
impl_from_ICommonQuery
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) decreasing refcount to %u
\n
"
,
iface
,
ref
);
if
(
ref
==
0
)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
ref
;
}
static
HRESULT
WINAPI
CommonQuery_OpenQueryWindow
(
ICommonQuery
*
iface
,
HWND
parent
,
LPOPENQUERYWINDOW
query_window
,
IDataObject
**
data_object
)
{
FIXME
(
"(%p)->(%p, %p, %p) stub!
\n
"
,
iface
,
parent
,
query_window
,
data_object
);
return
E_NOTIMPL
;
}
static
const
ICommonQueryVtbl
CommonQuery_vtbl
=
{
CommonQuery_QueryInterface
,
CommonQuery_AddRef
,
CommonQuery_Release
,
CommonQuery_OpenQueryWindow
,
};
static
HRESULT
CommonQuery_create
(
IUnknown
*
outer
,
REFIID
riid
,
void
**
out
)
{
struct
common_query
*
query
;
TRACE
(
"outer %p, riid %s, out %p
\n
"
,
outer
,
debugstr_guid
(
riid
),
out
);
if
(
outer
)
return
CLASS_E_NOAGGREGATION
;
if
(
!
(
query
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
query
))))
return
E_OUTOFMEMORY
;
query
->
ICommonQuery_iface
.
lpVtbl
=
&
CommonQuery_vtbl
;
return
ICommonQuery_QueryInterface
(
&
query
->
ICommonQuery_iface
,
riid
,
out
);
}
/***********************************************************************
* DllMain
*/
...
...
@@ -63,6 +230,26 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **out)
{
TRACE
(
"rclsid %s, riid %s, out %p
\n
"
,
debugstr_guid
(
rclsid
),
debugstr_guid
(
riid
),
out
);
if
(
!
IsEqualGUID
(
&
IID_IClassFactory
,
riid
)
&&
!
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
FIXME
(
"interface %s not implemented
\n
"
,
debugstr_guid
(
riid
));
*
out
=
NULL
;
return
E_NOINTERFACE
;
}
if
(
IsEqualGUID
(
&
CLSID_CommonQuery
,
rclsid
))
{
struct
query_class_factory
*
factory
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
factory
));
if
(
!
factory
)
return
E_OUTOFMEMORY
;
factory
->
IClassFactory_iface
.
lpVtbl
=
&
query_class_factory_vtbl
;
factory
->
ref
=
1
;
factory
->
pfnCreateInstance
=
CommonQuery_create
;
*
out
=
factory
;
return
S_OK
;
}
FIXME
(
"%s: no class found
\n
"
,
debugstr_guid
(
rclsid
));
*
out
=
NULL
;
return
CLASS_E_CLASSNOTAVAILABLE
;
...
...
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