本文整理汇总了C++中IRP::Discard方法的典型用法代码示例。如果您正苦于以下问题:C++ IRP::Discard方法的具体用法?C++ IRP::Discard怎么用?C++ IRP::Discard使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IRP
的用法示例。
在下文中一共展示了IRP::Discard方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: smartcard_free
static void smartcard_free(DEVICE* dev)
{
IRP* irp;
COMPLETIONIDINFO* CompletionIdInfo;
SMARTCARD_DEVICE* smartcard = (SMARTCARD_DEVICE*) dev;
SetEvent(smartcard->stopEvent);
WaitForSingleObject(smartcard->thread, INFINITE);
while ((irp = (IRP*) InterlockedPopEntrySList(smartcard->pIrpList)) != NULL)
irp->Discard(irp);
_aligned_free(smartcard->pIrpList);
/* Begin TS Client defect workaround. */
while ((CompletionIdInfo = (COMPLETIONIDINFO*) list_dequeue(smartcard->CompletionIds)) != NULL)
free(CompletionIdInfo);
CloseHandle(smartcard->thread);
CloseHandle(smartcard->irpEvent);
CloseHandle(smartcard->stopEvent);
CloseHandle(smartcard->CompletionIdsMutex);
Stream_Free(smartcard->device.data, TRUE);
list_free(smartcard->CompletionIds);
/* End TS Client defect workaround. */
free(dev);
}
示例2: serial_free
static void serial_free(DEVICE* device)
{
SERIAL_DEVICE* serial = (SERIAL_DEVICE*)device;
IRP* irp;
DEBUG_SVC("freeing device");
freerdp_thread_stop(serial->thread);
freerdp_thread_free(serial->thread);
while ((irp = (IRP*)list_dequeue(serial->irp_list)) != NULL)
irp->Discard(irp);
list_free(serial->irp_list);
while ((irp = (IRP*)list_dequeue(serial->pending_irps)) != NULL)
irp->Discard(irp);
list_free(serial->pending_irps);
xfree(serial);
}
示例3: parallel_free
static void parallel_free(DEVICE* device)
{
IRP* irp;
PARALLEL_DEVICE* parallel = (PARALLEL_DEVICE*) device;
DEBUG_SVC("freeing device");
freerdp_thread_stop(parallel->thread);
freerdp_thread_free(parallel->thread);
while ((irp = (IRP*) InterlockedPopEntrySList(parallel->pIrpList)) != NULL)
irp->Discard(irp);
_aligned_free(parallel->pIrpList);
free(parallel);
}
示例4: parallel_free
static void parallel_free(DEVICE* device)
{
IRP* irp;
PARALLEL_DEVICE* parallel = (PARALLEL_DEVICE*) device;
DEBUG_SVC("freeing device");
freerdp_thread_stop(parallel->thread);
freerdp_thread_free(parallel->thread);
while ((irp = (IRP*) list_dequeue(parallel->irp_list)) != NULL)
irp->Discard(irp);
list_free(parallel->irp_list);
xfree(parallel);
}
示例5: printer_free
static void printer_free(DEVICE* device) {
PRINTER_DEVICE* printer_dev = (PRINTER_DEVICE*) device;
IRP* irp;
freerdp_thread_stop(printer_dev->thread);
freerdp_thread_free(printer_dev->thread);
while ((irp = (IRP*) list_dequeue(printer_dev->irp_list)) != NULL)
irp->Discard(irp);
list_free(printer_dev->irp_list);
if (printer_dev->printer)
printer_dev->printer->Free(printer_dev->printer);
xfree(printer_dev->device.name);
xfree(printer_dev);
}
示例6: printer_free
static void printer_free(DEVICE* device)
{
IRP* irp;
PRINTER_DEVICE* printer_dev = (PRINTER_DEVICE*) device;
freerdp_thread_stop(printer_dev->thread);
freerdp_thread_free(printer_dev->thread);
while ((irp = (IRP*) InterlockedPopEntrySList(printer_dev->pIrpList)) != NULL)
irp->Discard(irp);
_aligned_free(printer_dev->pIrpList);
if (printer_dev->printer)
printer_dev->printer->Free(printer_dev->printer);
free(printer_dev->device.name);
free(printer_dev);
}
示例7: drive_free
static void drive_free(DEVICE* device)
{
IRP* irp;
DRIVE_FILE* file;
DRIVE_DEVICE* disk = (DRIVE_DEVICE*) device;
SetEvent(disk->stopEvent);
CloseHandle(disk->thread);
CloseHandle(disk->irpEvent);
while ((irp = (IRP*) InterlockedPopEntrySList(disk->pIrpList)) != NULL)
irp->Discard(irp);
_aligned_free(disk->pIrpList);
while ((file = (DRIVE_FILE*) list_dequeue(disk->files)) != NULL)
drive_file_free(file);
list_free(disk->files);
free(disk);
}
示例8: xfree
static void
scard_free(DEVICE* dev)
{
SCARD_DEVICE* scard = (SCARD_DEVICE*)dev;
IRP* irp;
COMPLETIONIDINFO* CompletionIdInfo;
freerdp_thread_stop(scard->thread);
freerdp_thread_free(scard->thread);
while ((irp = (IRP*)list_dequeue(scard->irp_list)) != NULL)
irp->Discard(irp);
list_free(scard->irp_list);
/* Begin TS Client defect workaround. */
while ((CompletionIdInfo = (COMPLETIONIDINFO*)list_dequeue(scard->CompletionIds)) != NULL)
xfree(CompletionIdInfo);
list_free(scard->CompletionIds);
/* End TS Client defect workaround. */
xfree(dev);
return;
}