Commit e5131213 authored by Ivan Leo Puoti's avatar Ivan Leo Puoti Committed by Alexandre Julliard

Let DeviceIoControl call the appropriate native interface.

parent 0789483d
......@@ -38,6 +38,7 @@
#include "winbase.h"
#include "winerror.h"
#include "winternl.h"
#include "winioctl.h"
#include "kernel_private.h"
#include "wine/library.h"
#include "wine/unicode.h"
......@@ -359,6 +360,12 @@ BOOL WINAPI DeviceIoControl(HANDLE hDevice, DWORD dwIoControlCode,
if (lpOverlapped)
{
if (HIWORD(dwIoControlCode) == FILE_DEVICE_FILE_SYSTEM)
status = NtFsControlFile(hDevice, lpOverlapped->hEvent,
NULL, NULL, (PIO_STATUS_BLOCK)lpOverlapped,
dwIoControlCode, lpvInBuffer, cbInBuffer,
lpvOutBuffer, cbOutBuffer);
else
status = NtDeviceIoControlFile(hDevice, lpOverlapped->hEvent,
NULL, NULL, (PIO_STATUS_BLOCK)lpOverlapped,
dwIoControlCode, lpvInBuffer, cbInBuffer,
......@@ -369,6 +376,11 @@ BOOL WINAPI DeviceIoControl(HANDLE hDevice, DWORD dwIoControlCode,
{
IO_STATUS_BLOCK iosb;
if (HIWORD(dwIoControlCode) == FILE_DEVICE_FILE_SYSTEM)
status = NtFsControlFile(hDevice, NULL, NULL, NULL, &iosb,
dwIoControlCode, lpvInBuffer, cbInBuffer,
lpvOutBuffer, cbOutBuffer);
else
status = NtDeviceIoControlFile(hDevice, NULL, NULL, NULL, &iosb,
dwIoControlCode, lpvInBuffer, cbInBuffer,
lpvOutBuffer, cbOutBuffer);
......
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