<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[welcher Stringtyp bei pVoice-&amp;gt;Speak(string, ...)]]></title><description><![CDATA[<p>Welcher Stringtyp bei pVoice-&gt;Speak(string, ...)<br />
Verwendet man CString erhält man eine Fehlermeldung.<br />
Erwarteter Typ: const unsigned short *</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/146152/welcher-stringtyp-bei-pvoice-gt-speak-string</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Jul 2026 08:09:50 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/146152.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 04 May 2006 18:22:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to welcher Stringtyp bei pVoice-&amp;gt;Speak(string, ...) on Thu, 04 May 2006 18:22:39 GMT]]></title><description><![CDATA[<p>Welcher Stringtyp bei pVoice-&gt;Speak(string, ...)<br />
Verwendet man CString erhält man eine Fehlermeldung.<br />
Erwarteter Typ: const unsigned short *</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1051069</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1051069</guid><dc:creator><![CDATA[sapi einsteiger]]></dc:creator><pubDate>Thu, 04 May 2006 18:22:39 GMT</pubDate></item><item><title><![CDATA[Reply to welcher Stringtyp bei pVoice-&amp;gt;Speak(string, ...) on Thu, 04 May 2006 18:50:08 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">HRESULT AnsiStrToBStr(LPCSTR szAnsiIn, BSTR * lpBstrOut) 
{

	DWORD dwSize;

	if (lpBstrOut == NULL) return E_INVALIDARG;
	if (szAnsiIn == NULL) { *lpBstrOut = NULL; return NOERROR; }

	// Get the number of unicode characters needed to convert szAnsiIn...
	dwSize = MultiByteToWideChar(CP_ACP, 0, szAnsiIn, -1, NULL, 0);
	if (dwSize == 0) return HRESULT_FROM_WIN32( GetLastError() );

	// Allocate a BSTR of the required length...
	// Note we minus one as SysAllocString takes the length
	// of the string not including the null terminator while
	// dwSize includes space for the null terminator.
	*lpBstrOut = SysAllocStringLen(NULL, dwSize - 1);
	if (*lpBstrOut == NULL) return E_OUTOFMEMORY;

	// Convert szAnsiIn into the BSTR we allocated...
	if ( !MultiByteToWideChar(CP_ACP, 0, szAnsiIn, -1, *lpBstrOut, dwSize) ) {
		SysFreeString(*lpBstrOut);
		return HRESULT_FROM_WIN32( GetLastError() );
	}

	return NOERROR;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1051087</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1051087</guid><dc:creator><![CDATA[_experte_]]></dc:creator><pubDate>Thu, 04 May 2006 18:50:08 GMT</pubDate></item></channel></rss>