当前位置: 首页>>代码示例>>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;未经允许,请勿转载。