return ::vswprintf(pszDest, pszFormat, args);
}
+ static BSTR __cdecl AllocSysString(
+ _In_z_ LPCWSTR pszSource,
+ _In_ int nLength)
+ {
+ return ::SysAllocStringLen(pszSource, nLength);
+ }
};
return ::vsprintf(pszDest, pszFormat, args);
}
+ static BSTR __cdecl AllocSysString(
+ _In_z_ LPCSTR pszSource,
+ _In_ int nLength)
+ {
+ int nLen = ChTraitsCRT<wchar_t>::GetBaseTypeLength(pszSource, nLength);
+ BSTR bstr = ::SysAllocStringLen(NULL, nLen);
+ if (bstr)
+ {
+ ChTraitsCRT<wchar_t>::ConvertToBaseType(bstr, nLen, pszSource, nLength);
+ }
+ return bstr;
+ }
+
};
}
+ BSTR AllocSysString() const
+ {
+ return StringTraits::AllocSysString(CThisSimpleString::GetString(), CThisSimpleString::GetLength());
+ }
+
+
};
} //namespace ATL
-#endif
\ No newline at end of file
+#endif