Did you know that: LVN_GETINFOTIP?

Did you know that when you handle LVN_GETINFOTIP notification message and you are provided with NMLVGETINFOTIP structure, you cannot just supply your own pszText string for the tooltip text? Instead you have to copy your string into supplied buffer, such as using _tcsncpy function. Otherwise things would not work.

BEGIN_MSG_MAP_EX(CFooPropertyPage)
	CHAIN_MSG_MAP(CPropertyPageT)
	...
	MSG_LVN_GETINFOTIP(IDC_FOOLISTVIEW, OnFooListViewGetInfoTip) 
	REFLECT_NOTIFICATIONS()
END_MSG_MAP()
...
LRESULT OnFooListViewGetInfoTip(NMLVGETINFOTIP* pHeader)
{
	ATLASSERT(!pHeader->lParam);
	CFoo* pFoo = m_FooListView.GetItemData(pHeader->iItem);
	CString& sTextBuffer = m_ModelListView.GetTextBufferString(TRUE);
	...
	sTextBuffer.TrimRight(_T("\t\n\r "));
	_tcsncpy(pHeader->pszText, sTextBuffer, pHeader->cchTextMax - 1);
	pHeader->pszText[pHeader->cchTextMax - 1] = 0;
	return 0;
}

SMTP humor

SMTP Session:
...
Wed 2008-05-07 17:22:45: [1304:1] --> DATA
Wed 2008-05-07 17:22:45: [1304:1] <-- 354 go ahead punk, make my day
Wed 2008-05-07 17:22:45: [1304:1] Sending <xxxxxxxxxxxxxxxxxx\pd35000088936.msg> to [64.202.166.12]
Wed 2008-05-07 17:22:45: [1304:1] Transfer Complete
Wed 2008-05-07 17:22:46: [1304:1] <-- 554 The message was rejected because it contains prohibited virus or spam content
Wed 2008-05-07 17:22:46: [1304:1] --> QUIT

FAT32 and maximal number of files per directory

While there are documented Limitations of the FAT32 File System in Windows XP, I keep on stumbling on another one: maximal number of files per directory. Video archives are large and by design are kept in single directory. While NTFS is recommended, FAT32 is still used on a number of systems, more often on small scale ones, and the bad news is that FAT32 is often met on network-attached storage (NAS) devices, which are often of large capacity.

So, once we have 21844 (0x5554) files in the directory (it may appear though that the limit is dependent on FAT cluster size), an attempt to create new file will cause a lock inside API call boosting thread’s CPU consumption to 100%. An annoying issue to keep in mind.

Vendor

We have a very interesting hardware vendor from Taiwan, which keeps on surprising. In past our software supported their PCI boards. They were quite popular for their price. Yes they were cheap and were based on a very popular video/audio capture chip which was probably too difficult to screw but they made their attempts. While the entire industry adopted DirectShow compatibility and video crossbar technology, these guys have been way smarter and just put an input stream number into video’s first pixel’s byte. If anything, software will sort frames out which is from which source!

With a wide range of hardware they supplied separate SDK for every model without any ability to detect which exactly piece of hardware is in… and yes all hardware and driver identifiers were mixed up between the models. Then they even went further and changed hardware leaving it the same model number. Did I mention lack of documentation? Did I mention drivers that don’t work?

It ended up with that time with cancellation of support for all models but just a few most popular we still had to support because its cheap and thus very much requested.

And we have another turn now: cheap stuff of a new generation Ethernet interfaced hardware. It is all about the same:

  • model X shows itself as model Y
  • lack of documentation
  • separate SDK for each model, different naming conventions between models with similar functionality
  • 3GPP compliance (which means RFC 2326 RTSP) declared but it is clear that it has a dumb customization in protocol which is mandatory and none of standard compliant software such as VLC is compatible

Still it’s cheap and in demand.

Windows Live ID is not alive

I have been trying to download MSDN Community Distribution CD March 2008 for a week or so, which requires registration to access the download. OK, I was trying to register pressing Continue button to be taken to “Registration Required for This Download”. I had Passport account some time ago which I tried to use to Sign In, but it was rejected as non-existing. OK, it could expire or so, I was trying to Sign Up also. But I wonder what could be the reason to show “Windows Live ID is experiencing technical difficulties” for a week and be unable to sign up a new user?

Spark

Jabber/XMPP and GoogleTalk is may favorite instant messaging network, although this point of view is hardly shared by majority of people I know. And I am eventually checking available Jabber software to stay informed on the subject. I came across Spark which is easily discovered as a top search Google result http://www.google.com/search?q=spark And I am really really disappointed. No doubt there is a lot of work invested already and the version numbers confirm this. However:

  • Google Talk network is not supported
  • I succeeded in logging into jabber.org but my online contact @gmail.com did not show as online
  • Settings dialog/window is way too ugly and introduces a revolutionary idea to not close on pressing Cancel

I am sorry, but I would like to immediately uninstall…