• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ ATLVERIFY函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: SetClipboardText

void SetClipboardText(const std::wstring& text)
{
	if (!::OpenClipboard(::GetDesktopWindow()))
		return;

	ATLVERIFY(::EmptyClipboard());

	const size_t length = (text.size() + 1) * sizeof(text[0]);
	HANDLE hmem = ::GlobalAlloc(GMEM_MOVEABLE, length);
	UIETWASSERT(hmem); // We are not hardened against OOM.

	void* const ptr = ::GlobalLock(hmem);
	UIETWASSERT(ptr != NULL);

	wcscpy_s(static_cast<wchar_t*>(ptr), (text.size() + 1), text.c_str());

	UnlockGlobalMemory(hmem);
	if (::SetClipboardData(CF_UNICODETEXT, hmem) == NULL)
	{
		ATLVERIFY(!::GlobalFree(hmem));
		ATLVERIFY(::CloseClipboard());
		return;
	}
	ATLVERIFY(::CloseClipboard());
}
开发者ID:fdoray,项目名称:UIforETW,代码行数:25,代码来源:Utility.cpp


示例2: ATLVERIFY

STDMETHODIMP 
CNdasUnitImpl::GetRaidSimpleStatus (
	NDAS_LOGICALUNIT_DEFINITION *NdasLogicalUnitDefinition,
	UINT8						*NdasUnitNo,
	DWORD						*RaidSimpleStatusFlags
	)
{
	HRESULT hr;
	HNDAS   ndasHandle;

	ATLVERIFY( RaidSimpleStatusFlags != NULL );

	hr = ConnectUnitDevice(&ndasHandle);

	if (FAILED(hr)) {

		return hr;
	}

	hr = NdasVsmGetRaidSimpleStatus( ndasHandle, NdasLogicalUnitDefinition, NdasUnitNo, RaidSimpleStatusFlags );

	if (FAILED(hr)) {

		ATLVERIFY(S_OK == DisonnectUnitDevice(ndasHandle));
		return hr;
	}

	ATLVERIFY(S_OK == DisonnectUnitDevice(ndasHandle));

	return S_OK;
}
开发者ID:yzx65,项目名称:ndas4windows,代码行数:31,代码来源:ndasunitdev.cpp


示例3: ATLASSERT

DWORD 
CNdasDevicePropGeneralPage::pUpdateThreadStart(DWORD UnitIndex)
{
	ATLASSERT(UnitIndex < RTL_NUMBER_OF(m_pUnitDevices));
	if (UnitIndex >= RTL_NUMBER_OF(m_pUnitDevices))
	{
		ATLVERIFY(PostMessage(
			WM_THREADED_WORK_COMPLETED, 0, static_cast<LPARAM>(UnitIndex)));
		return 255;
	}

	ndas::UnitDevicePtr pUnitDevice = m_pUnitDevices[UnitIndex];
	if (!pUnitDevice)
	{
		ATLVERIFY(PostMessage(
			WM_THREADED_WORK_COMPLETED, 0, static_cast<LPARAM>(UnitIndex)));
		return 1;
	}

	(void) pUnitDevice->UpdateHostStats();
	ATLVERIFY(PostMessage(
		WM_THREADED_WORK_COMPLETED, 0, static_cast<LPARAM>(UnitIndex)));

	return 0;
}
开发者ID:Nevermore2015,项目名称:ndas4windows,代码行数:25,代码来源:ndasdevicepropgeneralpage.cpp


示例4: helper

HRESULT CCurrencyConversionSamplePlugin::StartDisplayingItems() {
  CComQIPtr<IGoogleDesktopDisplayPluginHelper> helper(m_pluginHelper);
  if (m_pluginHelper == NULL)
    return E_FAIL;

  // set flags
  GoogleDesktopDisplayPluginFlags plugin_flags = GDD_PLUGIN_FLAG_NONE;
  GoogleDesktopDisplayContentFlags content_flags = GDD_CONTENT_FLAG_NONE;
  ATLVERIFY(SUCCEEDED(helper->SetFlags(plugin_flags, content_flags)));

  // set about text
  CComBSTR about_text;
  about_text.LoadString(IDS_COPYRIGHT);
  ATLVERIFY(SUCCEEDED(helper->put_about_text(about_text)));

  // set icons
  CComPtr<IPicture> title_icon, about_icon;
  ATLVERIFY(SUCCEEDED(::LoadPictureFromResource(ghInstance,
    MAKEINTRESOURCE(IDR_GIF_CURRENCY_ICON_SMALL), L"GIF",
    &title_icon)));
  ATLVERIFY(SUCCEEDED(::LoadPictureFromResource(ghInstance,
    MAKEINTRESOURCE(IDR_GIF_CURRENCY_ICON_LARGE), L"GIF",
    &about_icon)));
  ATLVERIFY(SUCCEEDED(helper->SetIcons(title_icon, about_icon)));

  UpdateTitle(false);

  // display the first set of items
  SetContentLayout();
  ChangeItems(NULL);
  return S_OK;
}
开发者ID:BackupTheBerlios,项目名称:sfsipua-svn,代码行数:32,代码来源:Plugin.cpp


示例5: ATLASSERT

CNBNdasDevice::CNBNdasDevice(PNDASUSER_DEVICE_ENUM_ENTRY pBaseInfo, NDAS_DEVICE_STATUS status)
{
	ATLASSERT(pBaseInfo);

	CopyMemory(&m_BaseInfo, pBaseInfo, sizeof(NDASUSER_DEVICE_ENUM_ENTRY));
	m_status = status;

	ATLVERIFY(SUCCEEDED( StringCchCopy(
		m_NdasId.Id, RTL_NUMBER_OF(m_NdasId.Id), pBaseInfo->szDeviceStringId) ));

	if (pBaseInfo->GrantedAccess & GENERIC_WRITE)
	{
		// We uses the magic write key in case write access is granted.
		ATLVERIFY(SUCCEEDED( StringCchCopy(
			m_NdasId.Key, RTL_NUMBER_OF(m_NdasId.Key), _T("*****")) ));
	}

	ZeroMemory(&m_DeviceId, sizeof(NDAS_DEVICE_ID));

	NdasIdStringToDeviceEx(pBaseInfo->szDeviceStringId, &m_DeviceId, NULL, &m_IdExtData);
	m_DeviceId.VID = m_IdExtData.VID;
		
#if 0
	NDASUSER_DEVICE_INFORMATION ndasDeviceInfo;
	ATLVERIFY( NdasQueryDeviceInformation(pBaseInfo->SlotNo, &ndasDeviceInfo) );
	m_DeviceId = ndasDeviceInfo.HardwareInfo.NdasDeviceId;
#endif

	if (m_DeviceId.VID == 0) {
		ATLTRACE(_T("Assume VID is 1 if VID=0\n"));
		m_DeviceId.VID = 1;
	}
	ATLTRACE(_T("new CNBNdasDevice(%p) : Name %s, ID %s, Slot %d, Access %08x\n"),
		this, pBaseInfo->szDeviceName, pBaseInfo->szDeviceStringId, pBaseInfo->SlotNo, pBaseInfo->GrantedAccess);
}
开发者ID:tigtigtig,项目名称:ndas4windows,代码行数:35,代码来源:nbdev.cpp


示例6: ATLVERIFY

HRESULT CExeModule::LoadExchangeCodes()
{
	ATLVERIFY(SUCCEEDED(_LoadExchangeCodes(STOCKEXCHANGECODES_SETTINGS, m_StockExchangeCodes)));
	ATLVERIFY(SUCCEEDED(_LoadExchangeCodes(OPTIONEXCHANGECODES_SETTINGS, m_OptionExchangeCodes)));

	return S_OK;
}
开发者ID:AlexS2172,项目名称:IVRM,代码行数:7,代码来源:atfdataprovider.cpp


示例7: GetLastError

DWORD
CDismountDialog::WorkItemStart()
{
	m_EjectError = 0;

	BOOL success = m_pLogDevice->Eject(&m_EjectParam);
	if (!success)
	{
		m_EjectError = GetLastError();
		ATLTRACE("Eject failed, error=0x%X\n", m_EjectError);
	}
	else
	{
		if (m_EjectParam.ConfigRet != CR_SUCCESS)
		{
			ATLTRACE("Eject failed from configuration manager, configRet=%d\n",
				m_EjectParam.ConfigRet);
			ATLTRACE("VetoType=%d,VetoName=%ls\n",
				m_EjectParam.VetoType,
				m_EjectParam.VetoName);
		}
	}

	ATLVERIFY( PostMessage(WM_WORKITEM_COMPLETED) );

	ATLVERIFY( SetEvent(m_WorkItemFinished) );

	return 0;
}
开发者ID:JanD1943,项目名称:ndas4windows,代码行数:29,代码来源:waitdlg.cpp


示例8: switch

BOOL 
CPnpEventConsumerWindow::OnDeviceChange(
	UINT EventType, PDEV_BROADCAST_HANDLE Dbch)
{
	switch (EventType)
	{
	case DBT_DEVICEREMOVECOMPLETE:
		{
			ATLVERIFY( m_DevNotifyHandles.Remove(Dbch->dbch_hdevnotify) );
			printf("Unregistering DevNotifyHandle=%p\n", Dbch->dbch_hdevnotify);
			ATLVERIFY( UnregisterDeviceNotification(Dbch->dbch_hdevnotify) );
		}
		break;
	case DBT_CUSTOMEVENT:

		if (IsEqualGUID(Dbch->dbch_eventguid, GUID_NDASPORT_PNP_NOTIFICATION))
		{
			PNDASPORT_PNP_NOTIFICATION ndasportNotification = 
				reinterpret_cast<PNDASPORT_PNP_NOTIFICATION>(Dbch->dbch_data);
			OnNdasPortEvent(ndasportNotification);
		}
		else if (IsEqualGUID(Dbch->dbch_eventguid, GUID_NDAS_ATA_LINK_EVENT))
		{
			PNDAS_ATA_LINK_EVENT ndasAtaLinkEvent =
				reinterpret_cast<PNDAS_ATA_LINK_EVENT>(Dbch->dbch_data);
			OnNdasAtaLinkEvent(ndasAtaLinkEvent);
		}
		else if (IsEqualGUID(Dbch->dbch_eventguid, NDAS_DLU_EVENT_GUID))
		{
			PNDAS_DLU_EVENT ndasDluEvent =
				reinterpret_cast<PNDAS_DLU_EVENT>(Dbch->dbch_data);
			OnNdasDluEvent(ndasDluEvent);
		}
		else if (IsEqualGUID(Dbch->dbch_eventguid, GUID_IO_VOLUME_MOUNT))
		{
			// printf("Volume is mounted, handle=%p\n", Dbch->dbch_handle);
		}
		else
		{
			OLECHAR guidString[64] = {0};
			StringFromGUID2(
				Dbch->dbch_eventguid,
				guidString,
				64);

			if (-1 != Dbch->dbch_nameoffset)
			{
				printf("Unknown %s (%ls)",
					((PUCHAR)Dbch) + Dbch->dbch_nameoffset,
					guidString);
			}
			else
			{
				printf("Unknown %ls", guidString);
			}
		}
	}
	return TRUE;
}
开发者ID:Nevermore2015,项目名称:ndas4windows,代码行数:59,代码来源:eventwnd.cpp


示例9: SetRegistryDWORD

void SetRegistryDWORD(const HKEY root, const std::wstring& subkey, const std::wstring& valueName, const DWORD value)
{
	HKEY key;
	if (::RegOpenKeyExW(root, subkey.c_str(), 0, KEY_ALL_ACCESS, &key) != ERROR_SUCCESS)
		return;
	ATLVERIFY(ERROR_SUCCESS == ::RegSetValueExW(key, valueName.c_str(), 0, REG_DWORD, reinterpret_cast<const BYTE*>(&value), sizeof(value)));
	ATLVERIFY(::RegCloseKey(key) == ERROR_SUCCESS);
}
开发者ID:fdoray,项目名称:UIforETW,代码行数:8,代码来源:Utility.cpp


示例10: ATLTRACE

void 
CMainFrame::OnNdasServiceConnectFailed()
{
	ATLTRACE("Connection to the NDAS Service failed.\n");

	ATLVERIFY(m_taskbarIcon.ChangeIcon(_CreateTaskbarIcon(false)));
	ATLVERIFY( m_taskbarIcon.SetToolTipText(IDR_TASKBAR_FAIL) );
}
开发者ID:yzx65,项目名称:ndas4windows,代码行数:8,代码来源:mainframe.cpp


示例11: PostMessage

LRESULT CMiniPieFrame::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	CAppInfo info;

	// Full screen mode delayed restoration 
	bool bFull = false;
	info.Restore(bFull, L"Full");
	if (bFull)
		PostMessage(WM_COMMAND, ID_VIEW_FULLSCREEN);

	CreateSimpleCEMenuBar();
#ifdef WIN32_PLATFORM_WFSP // SmartPhone
	AtlActivateBackKey(m_hWndCECommandBar);
#endif 
	UIAddToolBar(m_hWndCECommandBar);
	SetCommandButton(ID_APP_EXIT);

	// StatusBar state restoration 
	bool bVisible = true;
	info.Restore(bVisible, L"Status");
	DWORD dwStyle = WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | CCS_TOP;
	if (bVisible)
		dwStyle |= WS_VISIBLE;

	// StatusBar creation 
	CreateSimpleStatusBar(ATL_IDS_IDLEMESSAGE, dwStyle);
	UIAddStatusBar(m_hWndStatusBar);
	UISetCheck(ID_VIEW_STATUS_BAR, bVisible);

	// Browser view creation
	m_hWndClient = m_browser.Create(m_hWnd, NULL, _T("Microsoft.PIEDocView"),
                     WS_CHILD | WS_VISIBLE | WS_BORDER, 0, ID_BROWSER);

    ATLVERIFY(SUCCEEDED(m_browser.QueryControl(&m_spIWebBrowser2)));
    ATLVERIFY(SUCCEEDED(AtlAdviseSinkMap(this, true)));

	// Navigation menu initialization
	UIEnable(IDM_BACK, FALSE);
	UIEnable(IDM_FORWARD, FALSE);
	UIEnable(IDM_STOP, FALSE);
	UIEnable(IDM_REFRESH, FALSE);

#ifdef WIN32_PLATFORM_PSPC 
	// PPC Address bar state restoration
    VARIANT_BOOL vb = ATL_VARIANT_TRUE;
	info.Restore(vb, L"Address");
	m_spIWebBrowser2->put_AddressBar(vb);
	UISetCheck(ID_VIEW_ADDRESSBAR, vb == ATL_VARIANT_TRUE);
#endif 

	// register object for message filtering and idle updates
	CMessageLoop* pLoop = _Module.GetMessageLoop();
	ATLASSERT(pLoop != NULL);
	pLoop->AddMessageFilter(this);
	pLoop->AddIdleHandler(this);

	return 0;
}
开发者ID:Bizonu,项目名称:amclibrary,代码行数:58,代码来源:MiniPieFrame.cpp


示例12: RegisterWithGDEventFramework

HRESULT RegisterWithGDEventFramework() {
  CComPtr<IGoogleDesktopRegistrar> registrar;
  HRESULT hr = registrar.CoCreateInstance(L"GoogleDesktop.Registrar");

  if (SUCCEEDED(hr)) {
    CComBSTR our_guid(CONSOLE_PLUGIN_GUID);

    WCHAR icon_path[_MAX_PATH + 1] = {0};
    ATLVERIFY(::GetModuleFileNameW(NULL, icon_path, _MAX_PATH - 2) != 0);
    SafeStrCat(icon_path, L"@0", _MAX_PATH+1);

    CComSafeArray<VARIANT> description;
    ATLVERIFY(SUCCEEDED(description.Create(8)));
    VARIANT* props = reinterpret_cast<VARIANT*>(description.m_psa->pvData);

    for (DWORD i = 0; i < description.GetCount(); ++i) {
      props[i].vt = VT_BSTR;
    }

    props[0].bstrVal = ::SysAllocString(L"Title");
    props[1].bstrVal = ::SysAllocString(L"Console Events");
    props[2].bstrVal = ::SysAllocString(L"Description");
    props[3].bstrVal = ::SysAllocString(L"Outputs events from Google Desktop to the console");
    props[4].bstrVal = ::SysAllocString(L"Icon");
    props[5].bstrVal = ::SysAllocString(icon_path);
    props[6].bstrVal = ::SysAllocString(L"Homepage");
    props[7].bstrVal = ::SysAllocString(L"http://desktop.google.com");

    VARIANT desc;
    desc.vt = VT_ARRAY | VT_VARIANT;
    desc.parray = description;

    hr = registrar->StartComponentRegistration(our_guid, desc);

    if (SUCCEEDED(hr)) {
      CComPtr<IUnknown> unknown;
      hr = registrar->GetRegistrationInterface(CComBSTR(L"GoogleDesktop.EventRegistration"),
                                               &unknown);
      ATLASSERT(SUCCEEDED(hr));

      CComQIPtr<IGoogleDesktopRegisterEventPlugin> event_registration(unknown);
      if (event_registration != NULL) {
        long cookie = 0;
        hr = event_registration->RegisterPlugin(our_guid, &cookie);
        if (SUCCEEDED(hr)) {
          hr = registrar->FinishComponentRegistration();

          if (SUCCEEDED(hr)) {
            hr = StoreRegistrationCookie(cookie);
          }
        }
      }
    }
  }

  return hr;
}
开发者ID:BackupTheBerlios,项目名称:sfsipua-svn,代码行数:57,代码来源:ef_registration.cpp


示例13: ATLTRACE

void
CNdasDevicePropGeneralPage::OnReset()
{
	ATLTRACE(__FUNCTION__ "\n");

	ATLVERIFY(AtlWaitWithMessageLoop(m_ThreadCompleted));

	ATLVERIFY(m_imageList.Destroy());
	ATLVERIFY(DestroyAcceleratorTable(m_hAccel));
}
开发者ID:Nevermore2015,项目名称:ndas4windows,代码行数:10,代码来源:ndasdevicepropgeneralpage.cpp


示例14: GetDlgItemInt

STDMETHODIMP SysMonPluginPropPage::Apply(void) {
  int refresh_interval = GetDlgItemInt(IDC_EDIT_REFRESH_INTERVAL, NULL, 0);
  int max_disk_rw = GetDlgItemInt(IDC_EDIT_MAX_DISK_RW, NULL, 0);
  int max_net_io = GetDlgItemInt(IDC_EDIT_MAX_NET_IO, NULL, 0);
  int active_monitors = 0;
  int auto_adjust_chart_max = 1;

  if (!refresh_interval) {
    refresh_interval = 1;   // Minimum 1 seconds
  }
  if (!max_disk_rw) {
    max_disk_rw = 50000;
  }
  if (!max_net_io) {
    max_net_io = 50000;
  }

  if (::SendMessage(GetDlgItem(IDC_CHECK_CPU),
                               BM_GETCHECK, 0, 0) == BST_CHECKED) {
    active_monitors |= ACTIVE_MON_CPU;
  }
  if (::SendMessage(GetDlgItem(IDC_CHECK_MEM),
                               BM_GETCHECK, 0, 0) == BST_CHECKED) {
    active_monitors |= ACTIVE_MON_MEM;
  }
  if (::SendMessage(GetDlgItem(IDC_CHECK_DISK),
                               BM_GETCHECK, 0, 0) == BST_CHECKED) {
    active_monitors |= ACTIVE_MON_DISK;
  }
  if (::SendMessage(GetDlgItem(IDC_CHECK_NET),
                               BM_GETCHECK, 0, 0) == BST_CHECKED) {
    active_monitors |= ACTIVE_MON_NET;
  }

  auto_adjust_chart_max = (::SendMessage(GetDlgItem(IDC_CHECK_AUTO_MAX),
    BM_GETCHECK, 0, 0) == BST_CHECKED);

  for (int i = 0; i < static_cast<int>(m_nObjects); ++i) {
    CComQIPtr<IGoogleDesktopSysMonPlugin> plugin(m_ppUnk[i]);
    if (plugin) {
      ATLVERIFY(SUCCEEDED(plugin->put_refresh_interval(refresh_interval)));
      ATLVERIFY(SUCCEEDED(plugin->put_active_monitors(active_monitors)));
      ATLVERIFY(SUCCEEDED(plugin->put_max_disk_rw_in_chart(max_disk_rw)));
      ATLVERIFY(SUCCEEDED(plugin->put_max_net_io_in_chart(max_net_io)));
      ATLVERIFY(SUCCEEDED(plugin->put_auto_adjust_chart_max(
        auto_adjust_chart_max)));
    }
  }
  m_bDirty = FALSE;
  return S_OK;
}
开发者ID:BackupTheBerlios,项目名称:sfsipua-svn,代码行数:51,代码来源:sysmon_proppage.cpp


示例15: ATLVERIFY

void 
CMainFrame::pChangeTaskBarIcon(bool Normal)
{
	if (Normal) {

		ATLVERIFY( m_taskbarIcon.ChangeIcon(pCreateTaskbarIcon(true)) );
		ATLVERIFY( m_taskbarIcon.SetToolTipText(IDR_TASKBAR) );
	
	} else {

		ATLVERIFY( m_taskbarIcon.ChangeIcon(pCreateTaskbarIcon(false)) );
		ATLVERIFY( m_taskbarIcon.SetToolTipText(IDR_TASKBAR_FAIL) );
	}
}
开发者ID:Nevermore2015,项目名称:ndas4windows,代码行数:14,代码来源:mainframe.cpp


示例16: ATLTRACE

void
CMainFrame::pImportRegistration(LPCTSTR szFileName)
{
	DWORD count = 0;
	NDAS_NIF_V1_ENTRY* pEntry;
	HRESULT hr = ::NdasNifImport(szFileName, &count, &pEntry);
	if (SUCCEEDED(hr))
	{
		NifEntryArray entryArray;

		for (DWORD i = 0; i < count; ++i)
		{
			ATLTRACE(_T("%d/%d: %s\n"), i+1, count, pEntry->Name);
			entryArray.Add(NifEntry(pEntry[i]));
		}

		if (NULL == m_wndImportDlg.m_hWnd)
		{
			ATLVERIFY(m_wndImportDlg.Create(m_hWnd, PtrToUlong(&entryArray)));
			m_wndImportDlg.CenterWindow(::GetDesktopWindow());
			m_wndImportDlg.ShowWindow(SW_SHOWNORMAL);
		}
		else
		{
			m_wndImportDlg.AddNifEntry(entryArray);
			m_wndImportDlg.SetActiveWindow();
		}

		ATLVERIFY(NULL == ::LocalFree(pEntry));
	}
	else
	{
		ATLTRACE("NdasNifImport Error hr=%x\n", hr);
		CString strError;
		TCHAR szCompactPath[50];
		LPCTSTR lpFileName;
		if (::PathCompactPathEx(szCompactPath, szFileName, 50, 0))
		{
			lpFileName = szCompactPath;
		}
		else
		{
			lpFileName = szFileName;
		}
		strError.FormatMessage(IDS_ERROR_IMPORT_FMT, lpFileName);
		ErrorMessageBox(static_cast<LPCTSTR>(strError), IDS_MAIN_TITLE, hr);
	}
}
开发者ID:Nevermore2015,项目名称:ndas4windows,代码行数:48,代码来源:mainframe.cpp


示例17: PtrToUlong

// Worker Thread Start Routine
DWORD 
CDeviceGeneralPage::OnWorkerThreadStart(LPVOID lpParameter)
{
	UINT i = PtrToUlong(lpParameter);

	ATLASSERT(i < RTL_NUMBER_OF(m_pUnitDevices));
	if (i >= RTL_NUMBER_OF(m_pUnitDevices))
	{
		return 255;
	}

	ndas::UnitDevicePtr pUnitDevice = m_pUnitDevices[i];
	if (NULL == pUnitDevice.get())
	{
		return 1;
	}

	(void) pUnitDevice->UpdateHostStats();

	if (::IsWindow(m_hWnd))
	{
		ATLVERIFY(PostMessage(WM_USER_DONE, 0, static_cast<LPARAM>(i)));
	}

	return 0;
}
开发者ID:tigtigtig,项目名称:ndas4windows,代码行数:27,代码来源:devpropsh.cpp


示例18: ATLVERIFY

inline BYTE IStream::ReadByte()
{
   BYTE b;
   DWORD dwBytesRead = 0;
   ATLVERIFY(true == Read(&b, 1, dwBytesRead) && 1 == dwBytesRead);
   return b;
}
开发者ID:zengnotes,项目名称:MultiplayerOnlineGame,代码行数:7,代码来源:IStream.hpp


示例19: throw

double HighResolutionTimer::TotalElapsed() const throw()
{
   LARGE_INTEGER lCountNow = {0};
   ATLVERIFY(TRUE == ::QueryPerformanceCounter(&lCountNow));
   return static_cast<double>(m_lTotalElapsed.QuadPart + (m_bStarted ? (lCountNow.QuadPart-m_lCountStart.QuadPart) : 0LL)) /
      GetPerformanceFrequency();
}
开发者ID:zengnotes,项目名称:MultiplayerOnlineGame,代码行数:7,代码来源:HighResolutionTimer.cpp


示例20: ATLVERIFY

bool CFotoEntity::findAt(int nX, int nY){
	int nR, nL = nX;
	ATLVERIFY( addLine(nY, nL, nR) );

	CRanges r;
	r.push_back( tagUShorts(nL, nR) );
	m_mapRanges[nY] = r;
	
	findAtNextLine<-1>(nY-1, nL, nR);
	findAtNextLine<1>(nY+1, nL, nR);

	int nAdded;
	do{
		nAdded = 0;
		for(std::map<int, CRanges>::iterator it = m_mapRanges.begin(); it != m_mapRanges.end(); it++){
			CRanges& r = it->second;
			if (r.IsFlag(1|2) == (1|2)) continue;
			int nUp = 0, nDown = 0;
			for(size_t i=0; i < r.size(); i++){
				if (!r.IsFlag(1))
					nUp += findAtNextLine<-1>(it->first - 1, r[i].m_us1, r[i].m_us2);
				if (!r.IsFlag(2))
					nDown += findAtNextLine<1>(it->first + 1, r[i].m_us1, r[i].m_us2);
			}
			int nFlag = nUp ? 0 : 1;
			if (!nDown) nFlag |= 2;
			if (nFlag) r.AddFlag( nFlag );
			nAdded += nUp + nDown;
		}	
	}while(nAdded);

	return true;
}
开发者ID:som,项目名称:FED,代码行数:33,代码来源:FotoEntity.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ATL_AlignPtr函数代码示例发布时间:2022-05-30
下一篇:
C++ ATLTRY函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap