In regards to references vs pointers:
There are times when pointers are appropriate (for example when 'null' is an appropriate value and not an error). There is no such thing as a null-reference so use of a pointer in the case where the parameter is optional is quite acceptable.
In regards to RAII:
shared_ptr is designed for pointers. Handles and other OS resources are not pointers.
In regards to TCHAR:
TCHAR resolves to wchar_t when compiling for Unicode, and char when compiling for MBCS. Honestly though, I see no reason to use anything other than Unicode when you're doing development of Windows libraries. Windows uses Unicode internally, so by using narrow strings in your application you're slowing it down because for each API call that works with strings it needs to convert the narrow strings to wide strings, call the wide API call, then convert any wide strings back to narrow (if appliciable). If you just use wide strings to begin with you avoid a lot of overhead.
In answer to your actual concern though, you want to use basic_string<TCHAR> so you get a wstring under Unicode and a string under MBCS.
Again though, I don't even bother with that, I just use wide strings everywhere because it's pointless to use narrow ones.