OLE BSTR support (use for OLE automation)
| 2080 | #ifndef _ATL_NO_COM |
| 2081 | // OLE BSTR support (use for OLE automation) |
| 2082 | BSTR AllocSysString() const |
| 2083 | { |
| 2084 | #if defined(_UNICODE) || defined(OLE2ANSI) |
| 2085 | BSTR bstr = ::SysAllocStringLen(m_pchData, GetData()->nDataLength); |
| 2086 | #else |
| 2087 | int nLen = MultiByteToWideChar(CP_ACP, 0, m_pchData, |
| 2088 | GetData()->nDataLength, NULL, NULL); |
| 2089 | BSTR bstr = ::SysAllocStringLen(NULL, nLen); |
| 2090 | if(bstr != NULL) |
| 2091 | MultiByteToWideChar(CP_ACP, 0, m_pchData, GetData()->nDataLength, bstr, nLen); |
| 2092 | #endif |
| 2093 | return bstr; |
| 2094 | } |
| 2095 | |
| 2096 | BSTR SetSysString(BSTR* pbstr) const |
| 2097 | { |
nothing calls this directly
no outgoing calls
no test coverage detected