thread-specific-storage

How does a portable Thread Specific Storage Mechanism's Naming Scheme Generate Thread Relative Unique Identifiers ?

A portable thread specific storage reference/identity mechanism, of which boost/thread/tss.hpp is an instance, needs a way to generate a unique keys for itself. This key is unique in the scope of a thread, and is subsequently used to retrieve the object it references. This mechanism is used in code written in a thread neutral manner. Si...

Is it possible to *safely* return a TCHAR* from a function?

I've created a function that will convert all the event notification codes to strings. Pretty simple stuff really. I've got a bunch of consts like const _bstr_t DIRECTSHOW_MSG_EC_ACTIVATE("A video window is being activated or deactivated."); const _bstr_t DIRECTSHOW_MSG_EC_BUFFERING_DATA("The graph is buffering data, or has stopped bu...