<?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[wchar_t * * p einlesen und nach String konvertieren]]></title><description><![CDATA[<p>Hi! ^^</p>
<p>Ich möchte mit einer Funktion in einen wchar_t * * p schreiben. Zumindest ist dieser als anzugebenden Parameter dargestellt. Das ganze greift auf einen CppWebBrowser zu und liest die Werte aus.</p>
<p>Folgendes habe ich versucht:</p>
<pre><code class="language-cpp">wchar_t * * value;
pInput-&gt;get_value(value); // Hier soll der wchar_t gefüllt werden
</code></pre>
<p>An der entsprechenden Programmstelle bekomme ich eine Fehlermeldung, welche mir sagt dass das Problem in der mshtml.dll liegt.</p>
<p>Schreiben funktioniert:</p>
<pre><code class="language-cpp">WideString test = &quot;hallo!&quot;;
pInput-&gt;put_value(test);
</code></pre>
<p>Und noch ein Problem. Wie kann ich den zurückgelieferten Wert in einen String konvertieren <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
<p>Kompletter Codeabschnitt:</p>
<pre><code class="language-cpp">IHTMLDocument2 *HTMLDoc = NULL;
if(SUCCEEDED(browser1-&gt;Document-&gt;QueryInterface(IID_IHTMLDocument2,
  (LPVOID*)&amp;HTMLDoc)))
{
  IHTMLElementCollection *pAll = NULL;
  if(SUCCEEDED(HTMLDoc-&gt;get_all(&amp;pAll)))
  {
	TVariant name = &quot;tinytext&quot;;    //  hier kommt der name des Feldes hin (siehr HTML source)
	IDispatch *pDisp = NULL;
	TVariant index=0;
	if(SUCCEEDED(pAll-&gt;item(name, index, &amp;pDisp)))
	{
	  if(pDisp)
	  {
		IHTMLInputElement *pInput = NULL;     // mshtml.h
		pDisp-&gt;QueryInterface(IID_IHTMLInputElement, (LPVOID*)&amp;pInput);
		pDisp-&gt;Release();
		if(pInput)
		{
			WideString test;
			pInput-&gt;put_value(value);
		}
		pInput-&gt;Release();
	  }
	}
  }
  pAll-&gt;Release();
}
HTMLDoc-&gt;Release();
</code></pre>
<p>Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/185426/wchar_t-p-einlesen-und-nach-string-konvertieren</link><generator>RSS for Node</generator><lastBuildDate>Sun, 16 Aug 2026 10:31:23 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/185426.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 25 Jun 2007 14:45:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to wchar_t * * p einlesen und nach String konvertieren on Mon, 25 Jun 2007 14:45:03 GMT]]></title><description><![CDATA[<p>Hi! ^^</p>
<p>Ich möchte mit einer Funktion in einen wchar_t * * p schreiben. Zumindest ist dieser als anzugebenden Parameter dargestellt. Das ganze greift auf einen CppWebBrowser zu und liest die Werte aus.</p>
<p>Folgendes habe ich versucht:</p>
<pre><code class="language-cpp">wchar_t * * value;
pInput-&gt;get_value(value); // Hier soll der wchar_t gefüllt werden
</code></pre>
<p>An der entsprechenden Programmstelle bekomme ich eine Fehlermeldung, welche mir sagt dass das Problem in der mshtml.dll liegt.</p>
<p>Schreiben funktioniert:</p>
<pre><code class="language-cpp">WideString test = &quot;hallo!&quot;;
pInput-&gt;put_value(test);
</code></pre>
<p>Und noch ein Problem. Wie kann ich den zurückgelieferten Wert in einen String konvertieren <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
<p>Kompletter Codeabschnitt:</p>
<pre><code class="language-cpp">IHTMLDocument2 *HTMLDoc = NULL;
if(SUCCEEDED(browser1-&gt;Document-&gt;QueryInterface(IID_IHTMLDocument2,
  (LPVOID*)&amp;HTMLDoc)))
{
  IHTMLElementCollection *pAll = NULL;
  if(SUCCEEDED(HTMLDoc-&gt;get_all(&amp;pAll)))
  {
	TVariant name = &quot;tinytext&quot;;    //  hier kommt der name des Feldes hin (siehr HTML source)
	IDispatch *pDisp = NULL;
	TVariant index=0;
	if(SUCCEEDED(pAll-&gt;item(name, index, &amp;pDisp)))
	{
	  if(pDisp)
	  {
		IHTMLInputElement *pInput = NULL;     // mshtml.h
		pDisp-&gt;QueryInterface(IID_IHTMLInputElement, (LPVOID*)&amp;pInput);
		pDisp-&gt;Release();
		if(pInput)
		{
			WideString test;
			pInput-&gt;put_value(value);
		}
		pInput-&gt;Release();
	  }
	}
  }
  pAll-&gt;Release();
}
HTMLDoc-&gt;Release();
</code></pre>
<p>Danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1313422</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1313422</guid><dc:creator><![CDATA[ibala]]></dc:creator><pubDate>Mon, 25 Jun 2007 14:45:03 GMT</pubDate></item><item><title><![CDATA[Reply to wchar_t * * p einlesen und nach String konvertieren on Mon, 25 Jun 2007 14:50:22 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Aus deinem Quellcode wird nicht klar ob du überhaupt value einen gültigen Speicherbereich zugewiesen hast.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1313427</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1313427</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Mon, 25 Jun 2007 14:50:22 GMT</pubDate></item><item><title><![CDATA[Reply to wchar_t * * p einlesen und nach String konvertieren on Mon, 25 Jun 2007 14:53:06 GMT]]></title><description><![CDATA[<p>Sry hab ich eben vergessen. Das Problem ist aber ein ganz anderes. So funktioniert es:</p>
<pre><code class="language-cpp">IHTMLDocument2 *HTMLDoc = NULL;
if(SUCCEEDED(browser1-&gt;Document-&gt;QueryInterface(IID_IHTMLDocument2,
  (LPVOID*)&amp;HTMLDoc)))
{
  IHTMLElementCollection *pAll = NULL;
  if(SUCCEEDED(HTMLDoc-&gt;get_all(&amp;pAll)))
  {
	TVariant name = &quot;tinytext&quot;;    //  hier kommt der name des Feldes hin (siehr HTML source)
	IDispatch *pDisp = NULL;
	TVariant index=0;
	if(SUCCEEDED(pAll-&gt;item(name, index, &amp;pDisp)))
	{
	  if(pDisp)
	  {
		IHTMLInputElement *pInput = NULL;     // mshtml.h
		pDisp-&gt;QueryInterface(IID_IHTMLInputElement, (LPVOID*)&amp;pInput);
		pDisp-&gt;Release();
		if(pInput)
		{
			BSTR       Value;
			pInput-&gt;get_value(&amp;Value);

			ShowMessage(Value);
		}
		pInput-&gt;Release();
	  }
	}
  }
  pAll-&gt;Release();
}
HTMLDoc-&gt;Release();
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1313430</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1313430</guid><dc:creator><![CDATA[ibala]]></dc:creator><pubDate>Mon, 25 Jun 2007 14:53:06 GMT</pubDate></item></channel></rss>