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