當前位置: 首頁>>代碼示例>>C++>>正文


C++ DBGPRT_INFO函數代碼示例

本文整理匯總了C++中DBGPRT_INFO函數的典型用法代碼示例。如果您正苦於以下問題:C++ DBGPRT_INFO函數的具體用法?C++ DBGPRT_INFO怎麽用?C++ DBGPRT_INFO使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了DBGPRT_INFO函數的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: autolock

BOOL
CNdasDevice::UpdateDeviceInfo()
{
	ximeta::CAutoLock autolock(this);

	if (NDAS_DEVICE_STATUS_CONNECTED != m_status) {
		return FALSE;
	}

	BOOL fSuccess = GetDeviceInfo(
		m_localLpxAddress, 
		m_remoteLpxAddress, 
		GetHWType(), 
		GetHWVersion());

	if (!fSuccess) 
	{
		BOOL fDisconnectable = DestroyAllUnitDevices();
		if (fDisconnectable)
		{
			DBGPRT_INFO(_FT("%s: Changing to DISCONNECTED.\n"), ToString());
			ChangeStatus(NDAS_DEVICE_STATUS_DISCONNECTED);
		} 
		else 
		{
			DBGPRT_INFO(_T("%s: Some unit devices are mounted!\n"), ToString());
		}

		return FALSE;
	}

	return TRUE;
}
開發者ID:yzx65,項目名稱:ndas4windows,代碼行數:33,代碼來源:ndasdev.cpp

示例2: DllMain

BOOL 
APIENTRY 
DllMain(HANDLE hModule, DWORD  dwReason, LPVOID lpReserved)
{
	switch (dwReason)
	{
	case DLL_PROCESS_ATTACH:

		XDbgInit(_T("NDMSICA"));
		XDbgLoadSettingsFromRegistry(
			_T("Software\\NDAS\\NDMSICA"),
			HKEY_CURRENT_USER);

		DBGPRT_INFO(_FT("NDMSICA.DLL Process Attach\n"));
		break;

	case DLL_THREAD_ATTACH:

		DBGPRT_INFO(_FT("NDMSICA.DLL Thread Attach\n"));
		break;

	case DLL_THREAD_DETACH:

		DBGPRT_INFO(_FT("NDMSICA.DLL Thread Detach\n"));
		break;

	case DLL_PROCESS_DETACH:

		DBGPRT_INFO(_FT("NDMSICA.DLL Process Detach\n"));
		XDbgCleanup();
		break;
	}
	return TRUE;
}
開發者ID:JanD1943,項目名稱:ndas4windows,代碼行數:34,代碼來源:dllmain.cpp

示例3: fSuccess

BOOL
CNdasLogicalDevice::Unplug()
{
	BOOL fSuccess(FALSE);

	ximeta::CAutoLock autolock(this);

	DBGPRT_INFO(_FT("Unplugging %s\n"), ToString());

	if (m_status == NDAS_LOGICALDEVICE_STATUS_NOT_INITIALIZED) 
	{
		::SetLastError(NDASHLPSVC_ERROR_NDAS_LOGICALDEVICE_NOT_INITIALIZED);
		return FALSE;
	}

	if (m_status != NDAS_LOGICALDEVICE_STATUS_MOUNTED &&
		m_status != NDAS_LOGICALDEVICE_STATUS_MOUNT_PENDING &&
		m_status != NDAS_LOGICALDEVICE_STATUS_UNMOUNT_PENDING) 
	{
		::SetLastError(NDASHLPSVC_ERROR_NDAS_LOGICALDEVICE_NOT_MOUNTED);
		return FALSE;
	}

	//
	// Remove target ejects the disk and the volume.
	//

	fSuccess = LsBusCtlRemoveTarget(m_NdasScsiLocation.SlotNo);
	if (!fSuccess) {
		DBGPRT_WARN_EX(_FT("LsBusCtlRemoveTarget failed: "));
	}

	// Intentional break
	::Sleep(100);

	//
	// BUG:
	// What happened when RemoveTarget succeeded and 
	// Unplugging LANSCSI port is failed?
	//

	fSuccess = LsBusCtlUnplug(m_NdasScsiLocation.SlotNo);
	if (!fSuccess) 
	{
		DBGPRT_ERR_EX(_FT("LsBusCtlUnplug failed: "));
		// last error from lsbusctl unplug
		return FALSE;
	}

	//
	// Change the status to unmounted
	//
	SetStatus(NDAS_LOGICALDEVICE_STATUS_UNMOUNTED);

	DBGPRT_INFO(_FT("Unplugged successfully at slot %s.\n"),
		CNdasScsiLocation(m_NdasScsiLocation).ToString());

	return TRUE;

}
開發者ID:yzx65,項目名稱:ndas4windows,代碼行數:60,代碼來源:ndaslogdev.cpp

示例4: autolock

ULONG
CNdasLogicalDevice::Release()
{
	{
		ximeta::CAutoLock autolock(this);
		DBGPRT_INFO(_FT("%s\n"), ToString());
	}
	ULONG ulCount = ximeta::CExtensibleObject::Release();
	DBGPRT_INFO(_FT("RefCount=%u\n"), ulCount);
	return ulCount;
}
開發者ID:yzx65,項目名稱:ndas4windows,代碼行數:11,代碼來源:ndaslogdev.cpp

示例5: DBGPRT_INFO

DWORD
CNdasIXServer::OnTaskStart()
{
	DBGPRT_INFO(_FT("Starting NdasIXServer.\n"));

	CLpxDatagramServer m_dgs;
	BOOL fSuccess = m_dgs.Initialize();
	if (!fSuccess) {
		DBGPRT_ERR_EX(_FT("CNdasIXServer init failed: "));
		return 255;
	}

	fSuccess = m_dgs.Receive(
		this,
		m_usListenPort,
		INFOX_MAX_DATAGRAM_PKT_SIZE,
		m_hTaskTerminateEvent);

	if (!fSuccess) {
		DBGPRT_ERR_EX(_FT("Listening IXServer at port %d failed: "), m_usListenPort);
		return 255;
	}

	return 0;
}
開發者ID:yzx65,項目名稱:ndas4windows,代碼行數:25,代碼來源:ndasix.cpp

示例6: autoLock

BOOL
CNdasDevice::InvalidateUnitDevice(DWORD dwUnitNo)
{
	ximeta::CAutoLock autoLock(this);

	DBGPRT_INFO(_FT("%s: Invalidating Unit Device %d\n"), ToString(), dwUnitNo);

	if (dwUnitNo >= MAX_NDAS_UNITDEVICE_COUNT) 
	{
		DBGPRT_INFO(_T("%s: Invalid Unit No: %d\n"), ToString(), dwUnitNo);
		::SetLastError(ERROR_INVALID_PARAMETER);
		return FALSE;
	}

	if (NDAS_DEVICE_STATUS_CONNECTED != GetStatus()) 
	{
		DBGPRT_INFO(_T("%s: Non-connected device ignored\n"), ToString());
		return FALSE;
	}

	BOOL fSuccess = UpdateDeviceInfo();
	if (!fSuccess)
	{
		DBGPRT_ERR_EX(_T("%s: Device is not available.\n"), ToString());
		return FALSE;
	}

	fSuccess = DestroyUnitDevice(dwUnitNo);
	if (!fSuccess) 
	{
		DBGPRT_ERR_EX(_FT("%s: Destroying unit device (%d) failed: "), ToString(), dwUnitNo);
		return FALSE;
	}

	fSuccess = CreateUnitDevice(dwUnitNo);
	if (!fSuccess) 
	{
		DBGPRT_ERR_EX(_FT("%s: Creating unit device (%d) failed: "), ToString(), dwUnitNo);
		return FALSE;
	}

	DBGPRT_INFO(_FT("%s: Unit Device (%d) recreated\n"), ToString(), dwUnitNo);

	return TRUE;
}
開發者ID:yzx65,項目名稱:ndas4windows,代碼行數:45,代碼來源:ndasdev.cpp

示例7: _T

BOOL
CNdasLogicalDevice::IsPSWriteShareCapable()
{
	BOOL fNoPSWriteShare = FALSE;

	// global option
	BOOL fSuccess = _NdasSystemCfg.GetValueEx(
		_T("ndassvc"),
		_T("NoPSWriteShare"),
		&fNoPSWriteShare);
	if (fSuccess && fNoPSWriteShare)
	{
		DBGPRT_INFO(_FT("NoPSWriteShare is set as global.\n"));
		return FALSE;
	}

	// logical device specific option
	fSuccess = _NdasSystemCfg.GetValueEx(
		m_szRegContainer,
		_T("NoPSWriteShare"),
		&fNoPSWriteShare);
	if (fSuccess && fNoPSWriteShare)
	{
		DBGPRT_INFO(_FT("NoPSWriteShare is set at %s.\n"), ToString());
		return FALSE;
	}

	// even though NoPSWriteShare is not set, if there is no active
	// LFS filter, then PSWriteShare is denied.
	WORD wNDFSMajor, wNDFSMinor;
	fSuccess = ::LfsFiltCtlGetVersion(
		NULL, NULL, NULL, NULL, 
		&wNDFSMajor, &wNDFSMinor);
	if (!fSuccess)
	{
		// no LFS exists or it is not working NoPSWriteShare
		DBGPRT_INFO(_FT("LFSFilter does not exist. NoPSWriteShare.\n"));
		return FALSE;
	}

	return TRUE;
}
開發者ID:yzx65,項目名稱:ndas4windows,代碼行數:42,代碼來源:ndaslogdev.cpp

示例8: DllMain

BOOL 
APIENTRY 
DllMain(
	HINSTANCE hModule, 
	DWORD  dwReason, 
	LPVOID lpReserved)
{
	switch (dwReason)
	{
	case DLL_PROCESS_ATTACH:

		XDbgInit(_T("NDUPDATE"));
		XDbgLoadSettingsFromRegistry(
			_T("Software\\NDAS\\NDUpdate"),
			HKEY_CURRENT_USER);

		DBGPRT_INFO(_FT(DLL_NAME) _T(" Process Attach\n"));

		_NdasUpdateDllInstance = hModule;

		break;

	case DLL_THREAD_ATTACH:

		DBGPRT_INFO(_FT(DLL_NAME) _T(" Thread Attach\n"));
		break;

	case DLL_THREAD_DETACH:

		DBGPRT_INFO(_FT(DLL_NAME) _T(" Thread Detach\n"));
		break;

	case DLL_PROCESS_DETACH:
		DBGPRT_INFO(_FT(DLL_NAME) _T(" Process Detach\n"));

		XDbgCleanup();
		break;
	}
    return TRUE;
}
開發者ID:tigtigtig,項目名稱:ndas4windows,代碼行數:40,代碼來源:dllentry.cpp


注:本文中的DBGPRT_INFO函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。