Posts Tagged ‘windows’

Common Controls: Versions, Compatibility, WTL

Posted: 30th October 2011 by Roman in WTL
Tags: , , , ,

An application appears to be not working in Windows XP in a weird way: rebar control appeared to fail showing up. Where the application is expected to look much nicer with rebar control as a container for menu (implemented as command bar WTL control) and toolbar with buttons: A WTL sample project generated by a [...]

Booo SRW Locks

Posted: 27th March 2011 by Roman in ATL, Source
Tags: , , , , ,

Windows Vista introduced new synchronization API: slim reader/writer (SRW) locks. Being already armed with critical sections, one perhaps would not desperately need an SRW lock, but still it offers a great option to provide both exclusive (critical section alike) mode and shared mode when 2+ threads can enter protected section simultaneously. Some time earlier, I [...]

Recursive SRW Locks

Posted: 30th November 2010 by Roman in ATL, Source
Tags: , , , , , ,

Windows Vista added new synchronization API, Slim Reader/Writer (SRW) Locks, which is a powerful alternative to critical sections. The detailed description is, as always on MSDN, and what makes it really cool is simple: unlike critical sections, SRW Locks provide reader and writer access synchronization making it possible for 2 and more reader to not [...]

Given the combo box initialization code: m_ComboBox.SetRedraw(FALSE); m_ComboBox.ResetContent(); for(INT nIndex = 0; nIndex < 3; nIndex++) m_ComboBox.AddString(AtlFormatString(_T(“Item %d”), nIndex + 1)); m_ComboBox.SetCurSel(1); m_ComboBox.SetRedraw(TRUE) How the combo box is going to look like?

One thing is worth special mentioning in connection with previous post on DirectShow Filter Graph Spy on Microsoft Vista system: ATL’s CSecurityDesc class caused to waste some time. CRegKey Key; ATLENSURE_SUCCEEDED(HRESULT_FROM_WIN32(Key.Open(HKEY_CLASSES_ROOT, pszKeyName, READ_CONTROL | WRITE_OWNER))); CSecurityDesc AdministratorsOwnerSecurityDescriptor; AdministratorsOwnerSecurityDescriptor.SetOwner(Sids::Admins()); ATLENSURE_SUCCEEDED(HRESULT_FROM_WIN32(Key.SetKeySecurity(OWNER_SECURITY_INFORMATION, &AdministratorsOwnerSecurityDescriptor))); The code compiles fine, but on runtime it gives error 87 (ERROR_INVALID_PARAMETER, E_INVALIDARG) in the [...]

Downloading Windows 7 Beta 32-bit

Posted: 3rd February 2009 by Roman in Technology
Tags: , , , ,

I decided to download a beta of Windows 7, so many people shared their positive impressions of. I am not quite sure I will have time to actually evaluate it, but for the case I would feel like, it is always nice to have the .ISO image ready for a try. There was nothing worth [...]

Time Zone Information & Monitor Information

Posted: 22nd November 2008 by Roman in ATL, Source, Utilities, WTL
Tags: , , , , , ,

I am sharing a couple of utilities to be able to quick check system settings. TimeZoneInformation prints in a human friendly style TIME_ZONE_INFORMATION structure as reported by Windows through GetTimeZoneInformation API. TIME_ZONE_INFORMATION: .Bias: -120 .StandardName: FLE Standard Time .StandardDate: { .wYear 0, .wMonth 10, .wDay 5, .wDayOfWeek 0, .wHour 4, .wMinute 0, .wSecond 0, .wMilliseconds [...]