<?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[konvertieren?]]></title><description><![CDATA[<p>Hallo...</p>
<p>Wenn man bei meinem prog auf &quot;Senden&quot; klickt, sollte es eine net send nachricht verschicken...</p>
<p>kann mir jemand sagen wieso das net funzt ?</p>
<pre><code class="language-cpp">unsigned short *servername = L&quot;127.0.0.1&quot;;
	unsigned short *title = L&quot;Hiho&quot;;
	unsigned short *from = L&quot;Anonymous&quot;;
	unsigned char *msg = &quot;MeineNachricht&quot;;
	unsigned long msgsize= sizeof(msg);

	NetMessageBufferSend(servername, title, from, msg, msgsize);
</code></pre>
<p>Fehlermeldung :<br />
char [15]' kann nicht in 'unsigned char *' konvertiert werden<br />
Die Typen, auf die verwiesen wird, sind nicht verwandt; die Konvertierung erfordert einen reinterpret_cast-Operator oder eine Typumwandlung im C- oder Funktionsformat</p>
<p>Muss ich msg irgendwie konvertieren? Ich werd aus der Fehlermeldung net schlau <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>in der definition von NetMessageBufferSend haben genau diese Datentypen gestanden die ich auch verwende ...</p>
<p>_Rainer__</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/61923/konvertieren</link><generator>RSS for Node</generator><lastBuildDate>Wed, 03 Jun 2026 22:44:54 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/61923.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 18 Jan 2004 16:43:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to konvertieren? on Sun, 18 Jan 2004 16:43:31 GMT]]></title><description><![CDATA[<p>Hallo...</p>
<p>Wenn man bei meinem prog auf &quot;Senden&quot; klickt, sollte es eine net send nachricht verschicken...</p>
<p>kann mir jemand sagen wieso das net funzt ?</p>
<pre><code class="language-cpp">unsigned short *servername = L&quot;127.0.0.1&quot;;
	unsigned short *title = L&quot;Hiho&quot;;
	unsigned short *from = L&quot;Anonymous&quot;;
	unsigned char *msg = &quot;MeineNachricht&quot;;
	unsigned long msgsize= sizeof(msg);

	NetMessageBufferSend(servername, title, from, msg, msgsize);
</code></pre>
<p>Fehlermeldung :<br />
char [15]' kann nicht in 'unsigned char *' konvertiert werden<br />
Die Typen, auf die verwiesen wird, sind nicht verwandt; die Konvertierung erfordert einen reinterpret_cast-Operator oder eine Typumwandlung im C- oder Funktionsformat</p>
<p>Muss ich msg irgendwie konvertieren? Ich werd aus der Fehlermeldung net schlau <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>in der definition von NetMessageBufferSend haben genau diese Datentypen gestanden die ich auch verwende ...</p>
<p>_Rainer__</p>
]]></description><link>https://www.c-plusplus.net/forum/post/439237</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/439237</guid><dc:creator><![CDATA[_Rainer__]]></dc:creator><pubDate>Sun, 18 Jan 2004 16:43:31 GMT</pubDate></item><item><title><![CDATA[Reply to konvertieren? on Sun, 18 Jan 2004 18:21:16 GMT]]></title><description><![CDATA[<p>So hab ich es mal gelöst. Versuch einfach ob es funktioniert.</p>
<pre><code class="language-cpp">void CNetMessageBufferSendDlg::OnSenden() 
{
	UpdateData();
    NET_API_STATUS     nasRc=0;

	CString m_sTarget, m_sNick, m_sMsg;
	m_sTarget=&quot;Hallo&quot;;
	m_sNick = &quot;Jens&quot;;
	m_sMsg = &quot;Hallo&quot;;
    const int MAXLEN = 256;
    wchar_t name[MAXLEN], from[MAXLEN], msg[MAXLEN];

    mbstowcs( name, m_sTarget.GetBuffer(0), MAXLEN );
    name[MAXLEN - 1] = L'\0';
    mbstowcs( from, m_sNick.GetBuffer(0), MAXLEN );
    from[MAXLEN - 1] = L'\0';
    mbstowcs( msg, m_sMsg.GetBuffer(0), MAXLEN );
    msg[MAXLEN - 1] = L'\0';

    nasRc = NetMessageBufferSend( NULL, name, from, (BYTE *) &amp;msg[0], wcslen( msg ) * 2 );
	switch(nasRc)
    {
        case ERROR_ACCESS_DENIED:
            AfxMessageBox(&quot;You do not have access to the requested function.&quot;,MB_OK | MB_ICONSTOP);
            break;

        case ERROR_INVALID_PARAMETER:
            AfxMessageBox(&quot;One of the passed parameters is invalid.&quot;,MB_OK | MB_ICONSTOP);
            break;

        case ERROR_NOT_SUPPORTED:
            AfxMessageBox(&quot;This network request is not supported.&quot;,MB_OK | MB_ICONSTOP);
            break;

        case NERR_NameNotFound:
            AfxMessageBox(&quot;The user name could not be found or is not logged in.&quot;,MB_OK | MB_ICONSTOP);
            break;

        case NERR_NetworkError:
            AfxMessageBox(&quot;A general failure occurred in the network hardware.&quot;,MB_OK | MB_ICONSTOP);
            break;

        case NERR_Success:
            AfxMessageBox(&quot;Message successfully sent!&quot;,MB_OK);
            break;

        default:
            AfxMessageBox(&quot;Unknown error&quot;,MB_OK);
    }
}
</code></pre>
<p>Devil</p>
]]></description><link>https://www.c-plusplus.net/forum/post/439321</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/439321</guid><dc:creator><![CDATA[phlox81]]></dc:creator><pubDate>Sun, 18 Jan 2004 18:21:16 GMT</pubDate></item><item><title><![CDATA[Reply to konvertieren? on Mon, 19 Jan 2004 15:38:37 GMT]]></title><description><![CDATA[<p>THX!!!</p>
<p>Es funzt prima! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/439930</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/439930</guid><dc:creator><![CDATA[_Rainer__]]></dc:creator><pubDate>Mon, 19 Jan 2004 15:38:37 GMT</pubDate></item><item><title><![CDATA[Reply to konvertieren? on Tue, 20 Jan 2004 09:47:23 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>Was muss ich denn noch includieren ??</p>
<p>Thx</p>
]]></description><link>https://www.c-plusplus.net/forum/post/440347</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/440347</guid><dc:creator><![CDATA[tester123]]></dc:creator><pubDate>Tue, 20 Jan 2004 09:47:23 GMT</pubDate></item><item><title><![CDATA[Reply to konvertieren? on Tue, 20 Jan 2004 12:55:21 GMT]]></title><description><![CDATA[<p>Versuchs mal mit lmmsg.h und netapi32.lib als Library.</p>
<p>Grüße Rapha</p>
]]></description><link>https://www.c-plusplus.net/forum/post/440473</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/440473</guid><dc:creator><![CDATA[Rapha]]></dc:creator><pubDate>Tue, 20 Jan 2004 12:55:21 GMT</pubDate></item><item><title><![CDATA[Reply to konvertieren? on Tue, 20 Jan 2004 13:58:56 GMT]]></title><description><![CDATA[<p>Seltsam,</p>
<p>bei mir meckert er immer die NET_API_FUNCTION an !</p>
<p>Was mache ich denn falsch ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/440526</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/440526</guid><dc:creator><![CDATA[tester123]]></dc:creator><pubDate>Tue, 20 Jan 2004 13:58:56 GMT</pubDate></item><item><title><![CDATA[Reply to konvertieren? on Tue, 20 Jan 2004 14:28:38 GMT]]></title><description><![CDATA[<p>Wie meckert er denn?<br />
Was kommt für eine Fehlermeldung?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/440533</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/440533</guid><dc:creator><![CDATA[Rapha]]></dc:creator><pubDate>Tue, 20 Jan 2004 14:28:38 GMT</pubDate></item><item><title><![CDATA[Reply to konvertieren? on Tue, 20 Jan 2004 15:21:27 GMT]]></title><description><![CDATA[<p>Z.B.</p>
<blockquote>
<p>error C2501: 'NET_API_STATUS' : Fehlende Speicherklasse oder Typbezeichner</p>
</blockquote>
<blockquote>
<p>error C2146: Syntaxfehler : Fehlendes ';' vor Bezeichner 'NET_API_FUNCTION</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/440560</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/440560</guid><dc:creator><![CDATA[tester123]]></dc:creator><pubDate>Tue, 20 Jan 2004 15:21:27 GMT</pubDate></item><item><title><![CDATA[Reply to konvertieren? on Tue, 20 Jan 2004 18:56:41 GMT]]></title><description><![CDATA[<p>Bei mir hab ich die lm.h eingebunden.</p>
<p>Devil</p>
]]></description><link>https://www.c-plusplus.net/forum/post/440694</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/440694</guid><dc:creator><![CDATA[phlox81]]></dc:creator><pubDate>Tue, 20 Jan 2004 18:56:41 GMT</pubDate></item></channel></rss>