以下のコードは機能しません。ここで、lpClassName が null か空かを確認します。
static HRESULT WINAPI ExampleMethod(
__in_opt LPCTSTR lpClassName)
{
//code to check whether lpClassName is null or empty
if( lpClassName == 0)
return 0;
if(*lpClassName) == L'\0')
return 0;
}