Commit 1bb3859e authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Added support for overlapped ioctl requests (and a few other

cosmetics).
parent 99bc6404
......@@ -28,6 +28,7 @@
#include <sys/types.h>
#include "winbase.h"
#include "wine/windef16.h" /* HFILE16 */
#include "winternl.h"
#define MAX_PATHNAME_LEN 1024
......@@ -118,9 +119,9 @@ extern int PROFILE_GetWineIniBool( LPCWSTR section, LPCWSTR key_name, int def );
extern HANDLE DEVICE_Open( LPCWSTR filename, DWORD access, LPSECURITY_ATTRIBUTES sa );
/* ntdll/cdrom.c.c */
extern BOOL CDROM_DeviceIoControl(DWORD clientID, HANDLE hDevice, DWORD dwIoControlCode,
LPVOID lpInBuffer, DWORD nInBufferSize,
LPVOID lpOutBuffer, DWORD nOutBufferSize,
LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped);
extern NTSTATUS CDROM_DeviceIoControl(DWORD clientID, HANDLE hDevice, DWORD dwIoControlCode,
LPVOID lpInBuffer, DWORD nInBufferSize,
LPVOID lpOutBuffer, DWORD nOutBufferSize,
LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped);
#endif /* __WINE_FILE_H */
......@@ -82,6 +82,17 @@ typedef struct _SCSI_ADDRESS {
UCHAR Lun;
} SCSI_ADDRESS, *PSCSI_ADDRESS;
typedef struct _IO_SCSI_CAPABILITIES {
ULONG Length;
ULONG MaximumTransferLength;
ULONG MaximumPhysicalPages;
ULONG SupportedAsynchronousEvents;
ULONG AlignmentMask;
BOOLEAN TaggedQueuing;
BOOLEAN AdapterScansDown;
BOOLEAN AdapterUsesPio;
} IO_SCSI_CAPABILITIES, *PIO_SCSI_CAPABILITIES;
#ifdef __cplusplus
}
#endif
......
......@@ -439,9 +439,14 @@ BOOL WINAPI DeviceIoControl(HANDLE hDevice, DWORD dwIoControlCode,
strcpy(str, "A:");
str[0] += LOBYTE(clientID);
if (GetDriveTypeA(str) == DRIVE_CDROM)
return CDROM_DeviceIoControl(clientID, hDevice, dwIoControlCode, lpvInBuffer, cbInBuffer,
lpvOutBuffer, cbOutBuffer, lpcbBytesReturned,
lpOverlapped);
{
NTSTATUS status;
status = CDROM_DeviceIoControl(clientID, hDevice, dwIoControlCode, lpvInBuffer, cbInBuffer,
lpvOutBuffer, cbOutBuffer, lpcbBytesReturned,
lpOverlapped);
if (status) SetLastError(RtlNtStatusToDosError(status));
return !status;
}
else switch( dwIoControlCode )
{
case FSCTL_DELETE_REPARSE_POINT:
......
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