kernelbase: Add QISearch().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
cb95cbc386
commit
46e727ae49
|
@ -1,4 +1,5 @@
|
|||
MODULE = kernelbase.dll
|
||||
IMPORTS = uuid
|
||||
|
||||
C_SRCS = \
|
||||
main.c \
|
||||
|
|
|
@ -1191,7 +1191,7 @@
|
|||
# @ stub PublishStateChangeNotification
|
||||
@ stdcall PulseEvent(long) kernel32.PulseEvent
|
||||
@ stdcall PurgeComm(long long) kernel32.PurgeComm
|
||||
@ stdcall QISearch(long long long long) shlwapi.QISearch
|
||||
@ stdcall QISearch(ptr ptr ptr ptr)
|
||||
@ stdcall QueryActCtxSettingsW(long ptr wstr wstr ptr long ptr) kernel32.QueryActCtxSettingsW
|
||||
@ stdcall QueryActCtxW(long ptr ptr long ptr long ptr) kernel32.QueryActCtxW
|
||||
@ stdcall QueryDepthSList(ptr) kernel32.QueryDepthSList
|
||||
|
|
|
@ -17,10 +17,13 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#include "ntstatus.h"
|
||||
#define WIN32_NO_STATUS
|
||||
#include "windows.h"
|
||||
#include "appmodel.h"
|
||||
#include "shlwapi.h"
|
||||
|
||||
#include "wine/debug.h"
|
||||
#include "winternl.h"
|
||||
|
@ -125,3 +128,40 @@ BOOL WINAPI WaitOnAddress(volatile void *addr, void *cmp, SIZE_T size, DWORD tim
|
|||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
HRESULT WINAPI QISearch(void *base, const QITAB *table, REFIID riid, void **obj)
|
||||
{
|
||||
const QITAB *ptr;
|
||||
IUnknown *unk;
|
||||
|
||||
TRACE("%p, %p, %s, %p\n", base, table, debugstr_guid(riid), obj);
|
||||
|
||||
if (!obj)
|
||||
return E_POINTER;
|
||||
|
||||
for (ptr = table; ptr->piid; ++ptr)
|
||||
{
|
||||
TRACE("trying (offset %d) %s\n", ptr->dwOffset, debugstr_guid(ptr->piid));
|
||||
if (IsEqualIID(riid, ptr->piid))
|
||||
{
|
||||
unk = (IUnknown *)((BYTE *)base + ptr->dwOffset);
|
||||
TRACE("matched, returning (%p)\n", unk);
|
||||
*obj = unk;
|
||||
IUnknown_AddRef(unk);
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
|
||||
if (IsEqualIID(riid, &IID_IUnknown))
|
||||
{
|
||||
unk = (IUnknown *)((BYTE *)base + table->dwOffset);
|
||||
TRACE("returning first for IUnknown (%p)\n", unk);
|
||||
*obj = unk;
|
||||
IUnknown_AddRef(unk);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("Not found %s.\n", debugstr_guid(riid));
|
||||
*obj = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue