Commit be44253c authored by Alexandre Julliard's avatar Alexandre Julliard

wineandroid.drv: Return result through NtCallbackReturn for the start device callback.

parent 643538a8
...@@ -1177,7 +1177,8 @@ void start_android_device(void) ...@@ -1177,7 +1177,8 @@ void start_android_device(void)
{ {
void *ret_ptr; void *ret_ptr;
ULONG ret_len; ULONG ret_len;
thread = ULongToHandle( KeUserModeCallback( client_start_device, NULL, 0, &ret_ptr, &ret_len )); KeUserModeCallback( client_start_device, NULL, 0, &ret_ptr, &ret_len );
if (ret_len == sizeof(thread)) thread = *(HANDLE *)ret_ptr;
} }
......
...@@ -34,7 +34,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(android); ...@@ -34,7 +34,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(android);
extern NTSTATUS CDECL wine_ntoskrnl_main_loop( HANDLE stop_event ); extern NTSTATUS CDECL wine_ntoskrnl_main_loop( HANDLE stop_event );
static HANDLE stop_event; static HANDLE stop_event;
static HANDLE thread;
static NTSTATUS WINAPI ioctl_callback( DEVICE_OBJECT *device, IRP *irp ) static NTSTATUS WINAPI ioctl_callback( DEVICE_OBJECT *device, IRP *irp )
...@@ -97,10 +96,10 @@ static NTSTATUS WINAPI android_start_device(void *param, ULONG size) ...@@ -97,10 +96,10 @@ static NTSTATUS WINAPI android_start_device(void *param, ULONG size)
HANDLE handles[2]; HANDLE handles[2];
handles[0] = CreateEventW( NULL, TRUE, FALSE, NULL ); handles[0] = CreateEventW( NULL, TRUE, FALSE, NULL );
handles[1] = thread = CreateThread( NULL, 0, device_thread, handles[0], 0, NULL ); handles[1] = CreateThread( NULL, 0, device_thread, handles[0], 0, NULL );
WaitForMultipleObjects( 2, handles, FALSE, INFINITE ); WaitForMultipleObjects( 2, handles, FALSE, INFINITE );
CloseHandle( handles[0] ); CloseHandle( handles[0] );
return HandleToULong( thread ); return NtCallbackReturn( &handles[1], sizeof(handles[1]), STATUS_SUCCESS );
} }
......
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