Commit cc395391 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

winebus: Reference PDOs added to DEVICE_RELATIONS structure.

Fixes crash caused by 81cda52d. Signed-off-by: 's avatarPiotr Caban <piotr@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent c2485bb1
......@@ -62,8 +62,6 @@ static void *create_caller_thread;
static PETHREAD create_irp_thread;
void WINAPI ObfReferenceObject( void *obj );
NTSTATUS WINAPI ZwQueryInformationProcess(HANDLE,PROCESSINFOCLASS,void*,ULONG,ULONG*);
static void kvprintf(const char *format, __ms_va_list ap)
......
......@@ -31,6 +31,7 @@
#include "ddk/wdm.h"
#include "ddk/hidport.h"
#include "ddk/hidtypes.h"
#include "wine/asm.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "wine/list.h"
......@@ -41,6 +42,23 @@
WINE_DEFAULT_DEBUG_CHANNEL(plugplay);
WINE_DECLARE_DEBUG_CHANNEL(hid_report);
#if defined(__i386__) && !defined(_WIN32)
extern void * WINAPI wrap_fastcall_func1( void *func, const void *a );
__ASM_STDCALL_FUNC( wrap_fastcall_func1, 8,
"popl %ecx\n\t"
"popl %eax\n\t"
"xchgl (%esp),%ecx\n\t"
"jmp *%eax" );
#define call_fastcall_func1(func,a) wrap_fastcall_func1(func,a)
#else
#define call_fastcall_func1(func,a) func(a)
#endif
struct product_desc
{
WORD vid;
......@@ -381,6 +399,7 @@ static NTSTATUS build_device_relations(DEVICE_RELATIONS **devices)
LIST_FOR_EACH_ENTRY(ptr, &pnp_devset, struct pnp_device, entry)
{
(*devices)->Objects[i] = ptr->device;
call_fastcall_func1(ObfReferenceObject, ptr->device);
i++;
}
LeaveCriticalSection(&device_list_cs);
......
......@@ -1665,6 +1665,7 @@ static inline void *MmGetSystemAddressForMdlSafe(MDL *mdl, ULONG priority)
return MmMapLockedPagesSpecifyCache(mdl, KernelMode, MmCached, NULL, FALSE, priority);
}
void FASTCALL ObfReferenceObject(void*);
void WINAPI ObDereferenceObject(void*);
USHORT WINAPI ObGetFilterVersion(void);
NTSTATUS WINAPI ObRegisterCallbacks(POB_CALLBACK_REGISTRATION*, void**);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment