May 31st, 2017
Never
Not a member of Pastebin yet?Sign Up, it unlocks many cool features!
Walter Oney Software Port Devices Driver
- For the record however, so that anyone else who ends up reading this will know: first (UNDER 9x, NOT NT!) run Walter Oney's WDMCHECK utility or rloew's DISPPE32 on the 2K/XP driver you wish to load and see which WDM functions are missing. Then you must load WDMEX and repeat the same process again to see if all functions are satisfied.
- For years, people have wondered why all Windows drivers are dated June 21, 2006. Long time developer at Microsoft, Raymond Chen explains (much of the entire post in summary): When the system looks for a driver to use for a particular piece of hardware, it ranks them according to various criteria.
- // Control.cpp -- IOCTL handlers for PtoPar driver
- // All rights reserved
- #include 'stddcls.h'
- #include 'ioctls.h'
- NTSTATUS CacheControlRequest(PDEVICE_EXTENSION pdx, PIRP Irp, PIRP* pIrp);
- VOID OnCancelPendingIoctl(PDEVICE_OBJECT fdo, PIRP Irp);
- NTSTATUS OnCompletePendingIoctl(PDEVICE_OBJECT junk, PIRP Irp, PDEVICE_EXTENSION pdx);
- VOID CleanupControlRequests(PDEVICE_EXTENSION pdx, NTSTATUS status, PFILE_OBJECT fop);
- ///////////////////////////////////////////////////////////////////////////////
- #pragma PAGEDCODE
- NTSTATUS DispatchControl(PDEVICE_OBJECT fdo, PIRP Irp)
- PAGED_CODE();
- PDEVICE_EXTENSION pdx =(PDEVICE_EXTENSION) fdo->DeviceExtension;
- NTSTATUS status = IoAcquireRemoveLock(&pdx->RemoveLock, Irp);
- return CompleteRequest(Irp, status,0);
- PIO_STACK_LOCATION stack = IoGetCurrentIrpStackLocation(Irp);
- ULONG cbin = stack->Parameters.DeviceIoControl.InputBufferLength;
- ULONG cbout = stack->Parameters.DeviceIoControl.OutputBufferLength;
- ULONG code = stack->Parameters.DeviceIoControl.IoControlCode;
- switch(code)
- {// IOCTL_GET_VERSION_BUFFERED
- // TODO insert code here to handle this IOCTL, which uses METHOD_BUFFERED
- status = STATUS_INVALID_BUFFER_SIZE;
- }
- PULONG pversion =(PULONG) Irp->AssociatedIrp.SystemBuffer;
- info =sizeof(ULONG);
- }// IOCTL_GET_VERSION_BUFFERED
- case IOCTL_GET_VERSION_DIRECT:// code 0x801
- // TODO insert code here to handle this IOCTL, which uses METHOD_OUT_DIRECT
- status = STATUS_INVALID_BUFFER_SIZE;
- }
- PULONG pversion =(PULONG) MmGetSystemAddressForMdl(Irp->MdlAddress);
- info =sizeof(ULONG);
- }// IOCTL_GET_VERSION_DIRECT
- case IOCTL_GET_VERSION_NEITHER:// code 0x802
- // TODO insert code here to handle this IOCTL, which uses METHOD_NEITHER
- break;
- {// IOCTL_WAIT_NOTIFY
- KdPrint((DRIVERNAME ' .. ITESM:PIC, DispatchControl(WAIT_NOTIFY)n'));
- status = STATUS_INVALID_PARAMETER;
- //status = CacheControlRequest(pdx, Irp, &pdx->NotifyIrp);
- IoMarkIrpPending(Irp);
- IoReleaseRemoveLock(&pdx->RemoveLock, Irp);
- break;
- status = STATUS_INVALID_DEVICE_REQUEST;
- return status STATUS_PENDING ? status : CompleteRequest(Irp, status, info);
- ///////////////////////////////////////////////////////////////////////////////
- #pragma PAGEDCODE
- VOID AbortPendingIoctls(PDEVICE_EXTENSION pdx, NTSTATUS status)
- }// AbortPendingIoctls
- ///////////////////////////////////////////////////////////////////////////////
- #pragma LOCKEDCODE
- NTSTATUS CacheControlRequest(PDEVICE_EXTENSION pdx, PIRP Irp, PIRP* pIrp)
- return STATUS_SUCCESS;
- ///////////////////////////////////////////////////////////////////////////////
- #pragma PAGEDCODE
- VOID CleanupControlRequests(PDEVICE_EXTENSION pdx, NTSTATUS status, PFILE_OBJECT fop)
- }// CleanupControlRequests
- ///////////////////////////////////////////////////////////////////////////////
- #pragma LOCKEDCODE
- VOID OnCancelPendingIoctl(PDEVICE_OBJECT fdo, PIRP Irp)
- KIRQL oldirql = Irp->CancelIrql;
- PDEVICE_EXTENSION pdx =(PDEVICE_EXTENSION) fdo->DeviceExtension;
- // Complete the IRP
- Irp->IoStatus.Status= STATUS_CANCELLED;
- pdx->NotifyIrp=NULL;
- ///////////////////////////////////////////////////////////////////////////////
- #pragma LOCKEDCODE
- NTSTATUS OnCompletePendingIoctl(PDEVICE_OBJECT junk, PIRP Irp, PDEVICE_EXTENSION pdx)
- return STATUS_SUCCESS;
- ///////////////////////////////////////////////////////////////////////////////
- #pragma LOCKEDCODE
- PIRP UncacheControlRequest(PDEVICE_EXTENSION pdx, PIRP* pIrp)
- return(*pIrp);
- #pragma LOCKEDCODE // force inline functions into nonpaged code
May 31st, 2017
Never
Not a member of Pastebin yet?Sign Up, it unlocks many cool features!
Walter Oney Software Port Devices Driver
- For the record however, so that anyone else who ends up reading this will know: first (UNDER 9x, NOT NT!) run Walter Oney's WDMCHECK utility or rloew's DISPPE32 on the 2K/XP driver you wish to load and see which WDM functions are missing. Then you must load WDMEX and repeat the same process again to see if all functions are satisfied.
- For years, people have wondered why all Windows drivers are dated June 21, 2006. Long time developer at Microsoft, Raymond Chen explains (much of the entire post in summary): When the system looks for a driver to use for a particular piece of hardware, it ranks them according to various criteria.
- // Control.cpp -- IOCTL handlers for PtoPar driver
- // All rights reserved
- #include 'stddcls.h'
- #include 'ioctls.h'
- NTSTATUS CacheControlRequest(PDEVICE_EXTENSION pdx, PIRP Irp, PIRP* pIrp);
- VOID OnCancelPendingIoctl(PDEVICE_OBJECT fdo, PIRP Irp);
- NTSTATUS OnCompletePendingIoctl(PDEVICE_OBJECT junk, PIRP Irp, PDEVICE_EXTENSION pdx);
- VOID CleanupControlRequests(PDEVICE_EXTENSION pdx, NTSTATUS status, PFILE_OBJECT fop);
- ///////////////////////////////////////////////////////////////////////////////
- #pragma PAGEDCODE
- NTSTATUS DispatchControl(PDEVICE_OBJECT fdo, PIRP Irp)
- PAGED_CODE();
- PDEVICE_EXTENSION pdx =(PDEVICE_EXTENSION) fdo->DeviceExtension;
- NTSTATUS status = IoAcquireRemoveLock(&pdx->RemoveLock, Irp);
- return CompleteRequest(Irp, status,0);
- PIO_STACK_LOCATION stack = IoGetCurrentIrpStackLocation(Irp);
- ULONG cbin = stack->Parameters.DeviceIoControl.InputBufferLength;
- ULONG cbout = stack->Parameters.DeviceIoControl.OutputBufferLength;
- ULONG code = stack->Parameters.DeviceIoControl.IoControlCode;
- switch(code)
- {// IOCTL_GET_VERSION_BUFFERED
- // TODO insert code here to handle this IOCTL, which uses METHOD_BUFFERED
- status = STATUS_INVALID_BUFFER_SIZE;
- }
- PULONG pversion =(PULONG) Irp->AssociatedIrp.SystemBuffer;
- info =sizeof(ULONG);
- }// IOCTL_GET_VERSION_BUFFERED
- case IOCTL_GET_VERSION_DIRECT:// code 0x801
- // TODO insert code here to handle this IOCTL, which uses METHOD_OUT_DIRECT
- status = STATUS_INVALID_BUFFER_SIZE;
- }
- PULONG pversion =(PULONG) MmGetSystemAddressForMdl(Irp->MdlAddress);
- info =sizeof(ULONG);
- }// IOCTL_GET_VERSION_DIRECT
- case IOCTL_GET_VERSION_NEITHER:// code 0x802
- // TODO insert code here to handle this IOCTL, which uses METHOD_NEITHER
- break;
- {// IOCTL_WAIT_NOTIFY
- KdPrint((DRIVERNAME ' .. ITESM:PIC, DispatchControl(WAIT_NOTIFY)n'));
- status = STATUS_INVALID_PARAMETER;
- //status = CacheControlRequest(pdx, Irp, &pdx->NotifyIrp);
- IoMarkIrpPending(Irp);
- IoReleaseRemoveLock(&pdx->RemoveLock, Irp);
- break;
- status = STATUS_INVALID_DEVICE_REQUEST;
- return status STATUS_PENDING ? status : CompleteRequest(Irp, status, info);
- ///////////////////////////////////////////////////////////////////////////////
- #pragma PAGEDCODE
- VOID AbortPendingIoctls(PDEVICE_EXTENSION pdx, NTSTATUS status)
- }// AbortPendingIoctls
- ///////////////////////////////////////////////////////////////////////////////
- #pragma LOCKEDCODE
- NTSTATUS CacheControlRequest(PDEVICE_EXTENSION pdx, PIRP Irp, PIRP* pIrp)
- return STATUS_SUCCESS;
- ///////////////////////////////////////////////////////////////////////////////
- #pragma PAGEDCODE
- VOID CleanupControlRequests(PDEVICE_EXTENSION pdx, NTSTATUS status, PFILE_OBJECT fop)
- }// CleanupControlRequests
- ///////////////////////////////////////////////////////////////////////////////
- #pragma LOCKEDCODE
- VOID OnCancelPendingIoctl(PDEVICE_OBJECT fdo, PIRP Irp)
- KIRQL oldirql = Irp->CancelIrql;
- PDEVICE_EXTENSION pdx =(PDEVICE_EXTENSION) fdo->DeviceExtension;
- // Complete the IRP
- Irp->IoStatus.Status= STATUS_CANCELLED;
- pdx->NotifyIrp=NULL;
- ///////////////////////////////////////////////////////////////////////////////
- #pragma LOCKEDCODE
- NTSTATUS OnCompletePendingIoctl(PDEVICE_OBJECT junk, PIRP Irp, PDEVICE_EXTENSION pdx)
- return STATUS_SUCCESS;
- ///////////////////////////////////////////////////////////////////////////////
- #pragma LOCKEDCODE
- PIRP UncacheControlRequest(PDEVICE_EXTENSION pdx, PIRP* pIrp)
- return(*pIrp);
- #pragma LOCKEDCODE // force inline functions into nonpaged code
Tbs driver download for windows 10. PIC-Brenner8 (sprut) is developed by Walter Oney Software and is used by 22 users on Drivers Informer. The most later version of this driver among our users is 1.0.0.6. Windows Driver Kit Device and Driver Technologies Buses and Ports Buses USB Design Guide System-Supplied USB Drivers WinUSB (The general architure documentation ) Reference WinUSB User-Mode Client Support Routines ( The user mode application interface ) The inc section of the DDK contains the only required inc winusb.h. Toshiba support software and drivers. Windows Driver Package - Walter Oney Software (dlsusb) Ports ( Walter Oney Software - Shareware - more info. Drivers sony croporation.