非UNICODEから(MBCS)のStrCmpLogicalWのよびかた

めんどくせー

int CSortableStringArray::StrCmpLogical(const CString* pstr1, const CString* pstr2)
{
#ifdef UNICODE
	return StrCmpLogicalW((LPCWSTR)*pstr1, (LPCWSTR)*pstr2);
#else
	int ret;
	wchar_t *pwc1 = new wchar_t [ pstr1->GetLength() + 1 ];
	wchar_t *pwc2 = new wchar_t [ pstr2->GetLength() + 1 ];
	size_t s1 = mbstowcs( pwc1, *pstr1, pstr1->GetLength() + 1 );
	size_t s2 = mbstowcs( pwc2, *pstr2, pstr2->GetLength() + 1 );

	ret = StrCmpLogicalW(pwc1,pwc2);

	delete [] pwc1; 
	delete [] pwc2; 

	return ret;
#endif
}