Microsoft Usbccid Smartcard Reader -umdf 2- Driver -

*Device = device; return STATUS_SUCCESS;

BYTE apdu[] = 0x00, 0xA4, 0x04, 0x00, 0x08, 0xA0, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00; BYTE response[260]; DWORD responseLen = sizeof(response);

[UsbCcidReader_Install.NT.Wdf] UmdfService=UsbCcidReaderService,UsbCcidReader_Install UmdfServiceOrder=UsbCcidReaderService microsoft usbccid smartcard reader -umdf 2- driver

switch (IoControlCode) case IOCTL_SMARTCARD_POWER: // Handle power control status = context->HandlePowerControl(Request); break; case IOCTL_SMARTCARD_TRANSMIT: // Handle APDU transmit status = context->HandleTransmit(Request); break; case IOCTL_SMARTCARD_GET_STATE: // Get slot status status = context->HandleGetStatus(Request); break; default: status = STATUS_INVALID_DEVICE_REQUEST; break;

// Callbacks static void EvtDevicePrepareHardware(_In_ WDFDEVICE Device, _In_ WDFCMRESLIST ResourceList); static void EvtDeviceReleaseHardware(_In_ WDFDEVICE Device, _In_ WDFCMRESLIST ResourceList); static void EvtIoDeviceControl(_In_ WDFQUEUE Queue, _In_ WDFREQUEST Request, _In_ size_t OutputBufferLength, _In_ size_t InputBufferLength, _In_ ULONG IoControlCode); private: WDFDEVICE m_Device; WDFUSBDEVICE m_UsbDevice; WDFUSBINTERFACE m_UsbInterface; WDFUSBPIPE m_BulkOutPipe; WDFUSBPIPE m_BulkInPipe; WDFUSBPIPE m_InterruptPipe; WDFQUEUE m_DefaultQueue; ; #include "Device.h" #include "trace.h" NTSTATUS UsbCcidDevice::Create(WDFDRIVER Driver, WDFDEVICE_INIT* DeviceInit, WDFDEVICE* Device) WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS idleSettings; WDF_PNPPOWER_EVENT_CALLBACKS pnpCallbacks; WDF_IO_QUEUE_CONFIG queueConfig; WDF_OBJECT_ATTRIBUTES deviceAttributes; WDFDEVICE device; NTSTATUS status; *Device = device; return STATUS_SUCCESS; BYTE apdu[] =

WDF_USB_DEVICE_CREATE_CONFIG_INIT(&usbConfig, USBD_CLIENT_CONTRACT_VERSION_602); status = WdfUsbTargetDeviceCreateWithParameters(m_Device, &usbConfig, WDF_NO_OBJECT_ATTRIBUTES, &m_UsbDevice); if (!NT_SUCCESS(status)) return status;

WDF_USB_DEVICE_SELECT_CONFIG_PARAMS_INIT_SINGLE_INTERFACE(&configParams, 0); status = WdfUsbTargetDeviceSelectConfig(m_UsbDevice, WDF_NO_OBJECT_ATTRIBUTES, &configParams); if (!NT_SUCCESS(status)) return status; *Device = device

void UsbCcidDevice::EvtIoDeviceControl(WDFQUEUE Queue, WDFREQUEST Request, size_t OutputBufferLength, size_t InputBufferLength, ULONG IoControlCode) WDFDEVICE device = WdfIoQueueGetDevice(Queue); UsbCcidDevice* context = GetDeviceContext(device); NTSTATUS status = STATUS_NOT_SUPPORTED;

private: UsbCcidDevice( In WDFDEVICE Device); ~UsbCcidDevice();

error: Content is protected !!