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


C++ KDPrintM函数代码示例

本文整理汇总了C++中KDPrintM函数的典型用法代码示例。如果您正苦于以下问题:C++ KDPrintM函数的具体用法?C++ KDPrintM怎么用?C++ KDPrintM使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了KDPrintM函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GetBufferLockPendingRequests

static
NTSTATUS
GetBufferLockPendingRequests(
	IN PBUFFLOCK_CONTROL	BuffLockCtl,
	IN PLANSCSI_SESSION		LSS,
	IN PLU_HWDATA			LuHwData,
	OUT PULONG				PendingRequests,
	IN PLARGE_INTEGER		TimeOut
){
	NTSTATUS	status;
	TARGET_DATA	targetData;
	ULONG		requestCount;

	status = LspTextTartgetData(
		LSS,
		FALSE,
		LuHwData->LanscsiTargetID,
		&targetData,
		TimeOut);
	if(!NT_SUCCESS(status)) {
		KDPrintM(DBG_OTHER_ERROR, ("LspTextTartgetData() failed.\n", status));
		return status;
	}

	KDPrintM(DBG_OTHER_TRACE, ("TargetData:%u\n", targetData));
	//
	// Match the signature.
	// If not match, it might be interference by anonymous application.
	//
	requestCount = (ULONG)(targetData & TARGETDATA_REQUEST_COUNT_MASK);
	UpdateRequestCount(BuffLockCtl, requestCount, PendingRequests);

	return status;
}
开发者ID:tigtigtig,项目名称:ndas4windows,代码行数:34,代码来源:lockmgmt.c

示例2: LstransReceive

NTSTATUS
LstransReceive(
		IN PLSTRANS_CONNECTION_FILE	ConnectionFile,
		IN	PUCHAR					RecvBuffer,
		IN 	ULONG					RecvLength,
		IN	ULONG					Flags,
		OUT	PLONG					Result,
		IN OUT PVOID				CompletionContext,
		IN PLARGE_INTEGER			TimeOut
	) {
	ASSERT(ConnectionFile);

	KDPrintM(DBG_TRANS_TRACE, ("entered.\n"));

	if(!ConnectionFile->Protocol) {
		KDPrintM(DBG_TRANS_TRACE, ("No protocol.\n"));
		return STATUS_INVALID_PARAMETER;
	}
	if(!ConnectionFile->Protocol->LstransFunc.LstransReceive) {
		return STATUS_NOT_IMPLEMENTED;
	}

	return ConnectionFile->Protocol->LstransFunc.LstransReceive(
					ConnectionFile->ConnectionFileObject,
					RecvBuffer,
					RecvLength,
					Flags,
					Result,
					CompletionContext,
					TimeOut
				);
}
开发者ID:yzx65,项目名称:ndas4windows,代码行数:32,代码来源:lstransport.c

示例3: LstransRegisterDisconnectHandler

NTSTATUS
LstransRegisterDisconnectHandler(
		IN	PLSTRANS_ADDRESS_FILE	AddressFile,
		IN	PVOID					EventHandler,
		IN	PVOID					EventContext
	) {
	ASSERT(AddressFile);

	KDPrintM(DBG_TRANS_TRACE, ("entered.\n"));

	if(!AddressFile->Protocol) {
		KDPrintM(DBG_TRANS_TRACE, ("AddressFile No protocol.\n"));
		return STATUS_INVALID_PARAMETER;
	}

	if(!AddressFile->Protocol->LstransFunc.LstransDisconnect) {
		return STATUS_NOT_IMPLEMENTED;
	}

	return AddressFile->Protocol->LstransFunc.LstransRegisterDisconHandler(
					AddressFile->AddressFileObject,
					EventHandler,
					EventContext
				);
}
开发者ID:JanD1943,项目名称:ndas4windows,代码行数:25,代码来源:lstransport.c

示例4: LstransReceive

NTSTATUS
LstransReceive(
		IN PLSTRANS_CONNECTION_FILE	ConnectionFile,
		IN	PUCHAR					RecvBuffer,
		IN 	ULONG					RecvLength,
		IN	ULONG					Flags,
		IN PLARGE_INTEGER			TimeOut,
		OUT	PLONG					Result,
		IN PLSTRANS_OVERLAPPED		OverlappedData
	) {
	ASSERT(ConnectionFile);

	KDPrintM(DBG_TRANS_TRACE, ("entered.\n"));

	if(!ConnectionFile->Protocol) {
		KDPrintM(DBG_TRANS_TRACE, ("No protocol.\n"));
		return STATUS_INVALID_PARAMETER;
	}
	if(!ConnectionFile->Protocol->LstransFunc.LstransReceive) {
		return STATUS_NOT_IMPLEMENTED;
	}

	return ConnectionFile->Protocol->LstransFunc.LstransReceive( // call to LpxTdiRecv_LSTrans
					ConnectionFile->ConnectionFileObject,
					RecvBuffer,
					RecvLength,
					Flags,
					TimeOut,
					Result,
					OverlappedData
				);
}
开发者ID:JanD1943,项目名称:ndas4windows,代码行数:32,代码来源:lstransport.c

示例5: LstransSendDatagram

NTSTATUS
LstransSendDatagram(
		IN	PLSTRANS_ADDRESS_FILE	AddressFile,
		IN	PTA_LSTRANS_ADDRESS		RemoteAddress,
		IN	PUCHAR					SendBuffer,
		IN 	ULONG					SendLength,
		IN	ULONG					Flags,
		OUT	PLONG					Result,
		IN PLSTRANS_OVERLAPPED		OverlappedData
	) {
	ASSERT(AddressFile);

	KDPrintM(DBG_TRANS_TRACE, ("entered.\n"));

	if(!AddressFile->Protocol) {
		KDPrintM(DBG_TRANS_TRACE, ("No protocol.\n"));
		return STATUS_INVALID_PARAMETER;
	}
	if(!AddressFile->Protocol->LstransFunc.LstransSendDatagram) {
		return STATUS_NOT_IMPLEMENTED;
	}

	return AddressFile->Protocol->LstransFunc.LstransSendDatagram(
					AddressFile->AddressFileObject,
					RemoteAddress,
					SendBuffer,
					SendLength,
					Flags,
					Result,
					OverlappedData
				);
}
开发者ID:JanD1943,项目名称:ndas4windows,代码行数:32,代码来源:lstransport.c

示例6: LstransConnect

NTSTATUS
LstransConnect(
		IN PLSTRANS_CONNECTION_FILE	ConnectionFile,
		IN PTA_LSTRANS_ADDRESS		RemoteAddress,
		IN PLARGE_INTEGER			TimeOut,
		IN PLSTRANS_OVERLAPPED		OverlappedData
	) {
	ASSERT(ConnectionFile);
	ASSERT(RemoteAddress);

	KDPrintM(DBG_TRANS_TRACE, ("entered.\n"));

	if(!ConnectionFile->Protocol) {
		KDPrintM(DBG_TRANS_TRACE, ("ConnectionFile No protocol.\n"));
		return STATUS_INVALID_PARAMETER;
	}

	if(!ConnectionFile->Protocol->LstransFunc.LstransConnect) {
		return STATUS_NOT_IMPLEMENTED;
	}

	return ConnectionFile->Protocol->LstransFunc.LstransConnect(
					ConnectionFile->ConnectionFileObject,
					RemoteAddress,
					TimeOut,
					OverlappedData
				);

}
开发者ID:JanD1943,项目名称:ndas4windows,代码行数:29,代码来源:lstransport.c

示例7: LstransListen

NTSTATUS
LstransListen(
		IN PLSTRANS_CONNECTION_FILE	ConnectionFile,
		IN PVOID					CompletionContext,
		IN PULONG					Flags,
		IN PLARGE_INTEGER			TimeOut
	) {
	ASSERT(ConnectionFile);

	KDPrintM(DBG_TRANS_TRACE, ("entered.\n"));

	if(!ConnectionFile->Protocol) {
		KDPrintM(DBG_TRANS_TRACE, ("ConnectionFile No protocol.\n"));
		return STATUS_INVALID_PARAMETER;
	}

	if(!ConnectionFile->Protocol->LstransFunc.LstransListen) {
		return STATUS_NOT_IMPLEMENTED;
	}

	return ConnectionFile->Protocol->LstransFunc.LstransListen(
					ConnectionFile->ConnectionFileObject,
					CompletionContext,
					Flags,
					TimeOut
				);
}
开发者ID:JanD1943,项目名称:ndas4windows,代码行数:27,代码来源:lstransport.c

示例8: LstransAssociate

NTSTATUS
LstransAssociate(
		IN	PLSTRANS_ADDRESS_FILE		AddressFile,
		IN	PLSTRANS_CONNECTION_FILE	ConnectionFile
) {
	ASSERT(AddressFile);
	ASSERT(ConnectionFile);

	KDPrintM(DBG_TRANS_TRACE, ("entered.\n"));

	if(!AddressFile->Protocol) {
		KDPrintM(DBG_TRANS_TRACE, ("AddressFile No protocol.\n"));
		return STATUS_INVALID_PARAMETER;
	}

	if(!ConnectionFile->Protocol) {
		KDPrintM(DBG_TRANS_TRACE, ("ConnectionFile No protocol.\n"));
		return STATUS_INVALID_PARAMETER;
	}

	if(ConnectionFile->Protocol != AddressFile->Protocol) {
		return STATUS_INVALID_PARAMETER;
	}

	if(!ConnectionFile->Protocol->LstransFunc.LstransAssociate) {
		return STATUS_NOT_IMPLEMENTED;
	}

	return ConnectionFile->Protocol->LstransFunc.LstransAssociate(
					ConnectionFile->ConnectionFileObject,
					AddressFile->AddressFileHandle
				);
}
开发者ID:JanD1943,项目名称:ndas4windows,代码行数:33,代码来源:lstransport.c

示例9: LstransCloseAddress

NTSTATUS
LstransCloseAddress(
		IN PLSTRANS_ADDRESS_FILE	AddressFile
	) {
	NTSTATUS	status;
	ASSERT(AddressFile);

	KDPrintM(DBG_TRANS_TRACE, ("entered.\n"));

	if(!AddressFile->Protocol) {
//		KDPrintM(DBG_TRANS_ERROR, ("Protocol NULL!\n"));
		// Maybe this addressfile is already closed.
		return STATUS_INVALID_PARAMETER;
	}

	if(!AddressFile->Protocol->LstransFunc.LstransCloseAddress) {
		KDPrintM(DBG_TRANS_ERROR, ("LstransCloseAddress not implemented.\n"));
		return STATUS_NOT_IMPLEMENTED;
	}

	status = AddressFile->Protocol->LstransFunc.LstransCloseAddress(
					AddressFile->AddressFileHandle,
					AddressFile->AddressFileObject
				);

	AddressFile->AddressFileHandle = NULL;
	AddressFile->AddressFileObject = NULL;
	AddressFile->Protocol = NULL;

	return status;
}
开发者ID:JanD1943,项目名称:ndas4windows,代码行数:31,代码来源:lstransport.c

示例10: DraidListnerDelAddress

VOID
DraidListnerDelAddress(
	PTDI_ADDRESS_LPX Addr
) {
	PDRAID_GLOBALS DraidGlobals;
	PLIST_ENTRY listEntry;
	KIRQL oldIrql;
	PDRAID_LISTEN_CONTEXT ListenContext;
	
	if (!g_DraidGlobals) {
		KDPrintM(DBG_LURN_INFO, ("DRAID is not running\n"));
		return;
	}

	DraidGlobals = g_DraidGlobals;
	
	// Find matching address and just mark active flag false because Wait event may be in use.	
	ACQUIRE_SPIN_LOCK(&DraidGlobals->ListenContextSpinlock, &oldIrql);
	for (listEntry = DraidGlobals->ListenContextList.Flink;
		listEntry != &DraidGlobals->ListenContextList;
		listEntry = listEntry->Flink) 
	{
		ListenContext = CONTAINING_RECORD (listEntry, DRAID_LISTEN_CONTEXT, Link);
		if (RtlCompareMemory(ListenContext->Addr.Node, 
			Addr->Node, 6) == 6) {
			KDPrintM(DBG_LURN_INFO, ("Found matching address\n"));
			ListenContext->Destroy = TRUE;
			KeSetEvent(&DraidGlobals->NetChangedEvent, IO_NO_INCREMENT, FALSE);
			break;
		}
	}
	RELEASE_SPIN_LOCK(&DraidGlobals->ListenContextSpinlock, oldIrql);
}
开发者ID:JanD1943,项目名称:ndas4windows,代码行数:33,代码来源:draid.c

示例11: LsuWriteLogErrorEntry

VOID
LsuWriteLogErrorEntry(
	IN PDEVICE_OBJECT		DeviceObject,
    IN PLSU_ERROR_LOG_ENTRY ErrorLogEntry
){


	if(KeGetCurrentIrql() > PASSIVE_LEVEL) {
		PIO_WORKITEM	workitem;
		PLSU_ERRORLOGCTX	context;

		context = ExAllocatePoolWithTag(NonPagedPool, sizeof(LSU_ERRORLOGCTX), LSU_POOLTAG_ERRORLOGWORKER);
		if(context == NULL) {
			KDPrintM(DBG_OTHER_ERROR, ("Allocating context failed.\n"));
			return;
		}

		RtlCopyMemory(&context->ErrorLogEntry, ErrorLogEntry, sizeof(LSU_ERROR_LOG_ENTRY));


		workitem = IoAllocateWorkItem(DeviceObject);
		if(workitem == NULL) {
			KDPrintM(DBG_OTHER_ERROR, ("IoAllocateWorkItem() failed.\n"));
			return;
		}

		context->IoWorkItem = workitem;

		IoQueueWorkItem(workitem, WriteErrorLogWorker, DelayedWorkQueue, context);

	} else {
		_WriteLogErrorEntry(DeviceObject, ErrorLogEntry);
	}
}
开发者ID:tigtigtig,项目名称:ndas4windows,代码行数:34,代码来源:lsutils.c

示例12: LstransSetInformation

NTSTATUS
LstransSetInformation(
		IN PLSTRANS_CONNECTION_FILE	ConnectionFile,
		IN ULONG				SetType,
		IN PVOID				Buffer,
		IN ULONG				BufferLen
	){
	ASSERT(ConnectionFile);

	KDPrintM(DBG_TRANS_TRACE, ("entered.\n"));

	if(!ConnectionFile->Protocol) {
		KDPrintM(DBG_TRANS_TRACE, ("No protocol.\n"));
		return STATUS_INVALID_PARAMETER;
	}
	if(!ConnectionFile->Protocol->LstransFunc.LstransSetInformation) {
		return STATUS_NOT_IMPLEMENTED;
	}

	return ConnectionFile->Protocol->LstransFunc.LstransSetInformation( // call to LpxTdiSetInformation_LSTrans
					ConnectionFile->ConnectionFileObject,
					SetType,
					Buffer,
					BufferLen
				);
}
开发者ID:JanD1943,项目名称:ndas4windows,代码行数:26,代码来源:lstransport.c

示例13: LspReleaseLock

NTSTATUS
LspReleaseLock(
	IN PLANSCSI_SESSION	LSS,
	IN ULONG			LockNo,
	IN PBYTE			LockData,
	IN PLARGE_INTEGER	TimeOut
){
	NTSTATUS		status;
	LANSCSI_PDUDESC	pduDesc;
	BYTE			pduResponse;

	if(LSS->HWProtoVersion <= LSIDEPROTO_VERSION_1_0) {
		NDAS_ASSERT( FALSE );
		return STATUS_NOT_SUPPORTED;
	}

	pduResponse = LANSCSI_RESPONSE_SUCCESS;

	RtlZeroMemory(&pduDesc, sizeof(LANSCSI_PDUDESC));
	pduDesc.Command = VENDOR_OP_FREE_MUTEX;
	pduDesc.Param8[3] = (UCHAR)LockNo;
	pduDesc.TimeOut = IF_NULL_TIMEOUT_THEN_DEFAULT(LSS, TimeOut);
	status = LspVendorRequest(
							LSS,
							&pduDesc,
							&pduResponse
						);

	if(NT_SUCCESS(status)) {

		if(pduResponse != LANSCSI_RESPONSE_SUCCESS) {
			KDPrintM(DBG_LURN_ERROR,	("Releasing lock #%u denied by NDAS device\n", LockNo));
			status = STATUS_LOCK_NOT_GRANTED;
		} else {
			KDPrintM(DBG_LURN_TRACE,	("Released lock #%u\n", LockNo));
		}

		//
		// Convert Network endian to the host endian here.
		//

		if(LockData) {
			UINT32	lockData = NTOHL(pduDesc.Param32[1]);


			//
			// NDAS chip 1.1 returns the increased lock counter.
			// Decrease it for the chip version abstraction.
			//
			if(LSS->HWVersion == LANSCSIIDE_VERSION_1_1) {
				lockData --;
			}
			if(LSS->HWProtoVersion == LSIDEPROTO_VERSION_1_1) {
				*(PUINT32)LockData = lockData;
			}
		}
	}

	return status;
}
开发者ID:tigtigtig,项目名称:ndas4windows,代码行数:60,代码来源:ndasproto.c

示例14: LsuWriteBlocks

NTSTATUS
LsuWriteBlocks(
	IN PLANSCSI_SESSION	LSS,
	IN PBYTE			Buffer,
	IN UINT64			LogicalBlockAddress,
	IN ULONG			TransferBlocks,
	IN ULONG			BlockBytes,
	IN ULONG			PduFlags
) {
	NTSTATUS		status;
	LANSCSI_PDUDESC	PduDesc;
	BYTE			PduResponse;

	LSS_INITIALIZE_PDUDESC(LSS, &PduDesc, IDE_COMMAND, WIN_WRITE, PduFlags, LogicalBlockAddress, TransferBlocks, TransferBlocks * BlockBytes, Buffer, NULL);
	status = LspRequest(
					LSS,
					&PduDesc,
					&PduResponse
				);

	if(!NT_SUCCESS(status)) {
		KDPrintM(DBG_OTHER_ERROR, 
			("Error: logicalBlockAddress = %I64x, transferBlocks = %x\n", 
			LogicalBlockAddress, TransferBlocks));

	} else if(PduResponse != LANSCSI_RESPONSE_SUCCESS) {
		KDPrintM(DBG_OTHER_ERROR, 
			("Error: logicalBlockAddress = %I64x, transferBlocks = %x PduResponse:%x\n", 
			LogicalBlockAddress, TransferBlocks, PduResponse));

		status = STATUS_REQUEST_NOT_ACCEPTED;
	}

	return status;
}
开发者ID:tigtigtig,项目名称:ndas4windows,代码行数:35,代码来源:lsutils.c

示例15: LurnDestroy

NTSTATUS
LurnDestroy(
		PLURELATION_NODE Lurn
	) {
	NTSTATUS ntStatus;

	KDPrintM(DBG_LURN_ERROR, ("In. Lurn %p\n", Lurn));

	ASSERT(Lurn);
	ASSERT(KeGetCurrentIrql() == PASSIVE_LEVEL);

	if(!Lurn->LurnInterface) {
		KDPrintM(DBG_LURN_ERROR, ("LURN->LurnInterface NULL!\n"));
		return STATUS_INVALID_PARAMETER;
	}
	if(!Lurn->LurnInterface->LurnFunc.LurnDestroy) {
		return STATUS_NOT_IMPLEMENTED;
	}

	ntStatus = Lurn->LurnInterface->LurnFunc.LurnDestroy(
					Lurn
				);
	ASSERT(NT_SUCCESS(ntStatus));
	Lurn->LurnStatus =  LURN_STATUS_DESTROYING;

	return ntStatus;
}
开发者ID:yzx65,项目名称:ndas4windows,代码行数:27,代码来源:lslurn.c


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