<?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[Wie kann man char in ein byte[] schreiben?]]></title><description><![CDATA[<p>Hallo,</p>
<p>wie kann man char in ein byte[] schreiben?</p>
<p>Ich habe es folgendermaßen hingebogen:</p>
<p>BYTE pData[1024];<br />
VARIANT value;<br />
...</p>
<p>wsprintf( (char*)pData, W2A( V_BSTR(&amp;value)));</p>
<p>Aber BYTE ist unsigned char (0 bis 255) und<br />
char ist signed char (-127 bis 128)</p>
<p>Wie kann ich das besser lösen?</p>
<p>MfG</p>
<p>Matt</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/202712/wie-kann-man-char-in-ein-byte-schreiben</link><generator>RSS for Node</generator><lastBuildDate>Mon, 27 Apr 2026 14:34:33 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/202712.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 14 Jan 2008 17:56:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Wie kann man char in ein byte[] schreiben? on Mon, 14 Jan 2008 17:56:39 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>wie kann man char in ein byte[] schreiben?</p>
<p>Ich habe es folgendermaßen hingebogen:</p>
<p>BYTE pData[1024];<br />
VARIANT value;<br />
...</p>
<p>wsprintf( (char*)pData, W2A( V_BSTR(&amp;value)));</p>
<p>Aber BYTE ist unsigned char (0 bis 255) und<br />
char ist signed char (-127 bis 128)</p>
<p>Wie kann ich das besser lösen?</p>
<p>MfG</p>
<p>Matt</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1436536</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1436536</guid><dc:creator><![CDATA[Matg40]]></dc:creator><pubDate>Mon, 14 Jan 2008 17:56:39 GMT</pubDate></item><item><title><![CDATA[Reply to Wie kann man char in ein byte[] schreiben? on Tue, 15 Jan 2008 11:26:58 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile-var-mode-is-viewprofile-and-u-is-18363.html" rel="nofollow">Jochen Kalmbach</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-58.html" rel="nofollow">C++/CLI mit .NET</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-4.html" rel="nofollow">WinAPI</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39405.html" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1436926</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1436926</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Tue, 15 Jan 2008 11:26:58 GMT</pubDate></item><item><title><![CDATA[Reply to Wie kann man char in ein byte[] schreiben? on Tue, 15 Jan 2008 11:27:45 GMT]]></title><description><![CDATA[<p>Was soll denn das &quot;wsprintf&quot;?<br />
Wo ist hier ein &quot;char&quot;?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1436927</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1436927</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Tue, 15 Jan 2008 11:27:45 GMT</pubDate></item><item><title><![CDATA[Reply to Wie kann man char in ein byte[] schreiben? on Tue, 15 Jan 2008 14:58:02 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>im Variant value ist ein BSTR, der über W2A in char* umgewandelt wird.</p>
<p>Diesen möchte ich in ein Byte[] schreiben.</p>
<p>Im Code wie angegeben würde es gehen, ich caste aber signed char in unsigned char (das könnte Probleme geben)....</p>
<p>MfG</p>
<p>Matt</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1437114</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1437114</guid><dc:creator><![CDATA[Matg40]]></dc:creator><pubDate>Tue, 15 Jan 2008 14:58:02 GMT</pubDate></item></channel></rss>