当前位置: 首页>>代码示例>>C++>>正文


C++ IRP::Discard方法代码示例

本文整理汇总了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);
}
开发者ID:ADILOFASKI,项目名称:FreeRDP,代码行数:31,代码来源:smartcard_main.c

示例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);
}
开发者ID:rafcabezas,项目名称:FreeRDP,代码行数:20,代码来源:serial_main.c

示例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);
}
开发者ID:d0rian,项目名称:FreeRDP,代码行数:17,代码来源:parallel_main.c

示例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);
}
开发者ID:rafcabezas,项目名称:FreeRDP,代码行数:17,代码来源:parallel_main.c

示例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);
}
开发者ID:gvsurenderreddy,项目名称:openulteo,代码行数:18,代码来源:urdp_pdf.c

示例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);
}
开发者ID:bailli,项目名称:FreeRDP,代码行数:20,代码来源:printer_main.c

示例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);
}
开发者ID:effort,项目名称:FreeRDP,代码行数:22,代码来源:drive_main.c

示例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;
}
开发者ID:rafcabezas,项目名称:FreeRDP,代码行数:23,代码来源:scard_main.c


注:本文中的IRP::Discard方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。