<?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[MessageBox Problem]]></title><description><![CDATA[<p>Wie kann man alle Datentypen in einer MessageBox ausgeben? Als Bespiel:</p>
<pre><code class="language-cpp">BBDECL int CDECL Bank(int inBuffer[], int inSize, int outBuffer[], int outSize)
{
	outBuffer[0] = 321;
	//outBuffer[1] = 654;
	MessageBox(NULL,(LPCSTR)sizeof(*outBuffer),&quot;Size&quot;,MB_OK);
	return 1;
}
</code></pre>
<p>Was muß ich machen um also mal nen int oder ne Adresse oder ne Größe auzugeben? Sobal die ich die Funktion aufrufe kommt immer memory access violation. die func steht in ner dll.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/96991/messagebox-problem</link><generator>RSS for Node</generator><lastBuildDate>Mon, 27 Apr 2026 07:51:50 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/96991.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 06 Jan 2005 16:08:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to MessageBox Problem on Thu, 06 Jan 2005 16:08:20 GMT]]></title><description><![CDATA[<p>Wie kann man alle Datentypen in einer MessageBox ausgeben? Als Bespiel:</p>
<pre><code class="language-cpp">BBDECL int CDECL Bank(int inBuffer[], int inSize, int outBuffer[], int outSize)
{
	outBuffer[0] = 321;
	//outBuffer[1] = 654;
	MessageBox(NULL,(LPCSTR)sizeof(*outBuffer),&quot;Size&quot;,MB_OK);
	return 1;
}
</code></pre>
<p>Was muß ich machen um also mal nen int oder ne Adresse oder ne Größe auzugeben? Sobal die ich die Funktion aufrufe kommt immer memory access violation. die func steht in ner dll.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/688812</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/688812</guid><dc:creator><![CDATA[VirtualDreams]]></dc:creator><pubDate>Thu, 06 Jan 2005 16:08:20 GMT</pubDate></item><item><title><![CDATA[Reply to MessageBox Problem on Thu, 06 Jan 2005 16:09:21 GMT]]></title><description><![CDATA[<p>Die MessageBox kann nur Strings ausgeben. Wandel alles was du Ausgeben willst also in Strings um.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/688813</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/688813</guid><dc:creator><![CDATA[datad]]></dc:creator><pubDate>Thu, 06 Jan 2005 16:09:21 GMT</pubDate></item><item><title><![CDATA[Reply to MessageBox Problem on Thu, 06 Jan 2005 16:10:38 GMT]]></title><description><![CDATA[<p>Mach ich das aber nicht schon eigentlich mit (LPCSTR) ??? wie kann sonst man &quot;alles&quot; in einen string umwandeln?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/688814</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/688814</guid><dc:creator><![CDATA[VirtualDreams]]></dc:creator><pubDate>Thu, 06 Jan 2005 16:10:38 GMT</pubDate></item><item><title><![CDATA[Reply to MessageBox Problem on Thu, 06 Jan 2005 16:12:14 GMT]]></title><description><![CDATA[<p>sprintf</p>
]]></description><link>https://www.c-plusplus.net/forum/post/688819</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/688819</guid><dc:creator><![CDATA[Hepi]]></dc:creator><pubDate>Thu, 06 Jan 2005 16:12:14 GMT</pubDate></item><item><title><![CDATA[Reply to MessageBox Problem on Thu, 06 Jan 2005 16:13:25 GMT]]></title><description><![CDATA[<p>Du hast nur gecasted. So einfach geht das nicht :p</p>
]]></description><link>https://www.c-plusplus.net/forum/post/688820</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/688820</guid><dc:creator><![CDATA[:P]]></dc:creator><pubDate>Thu, 06 Jan 2005 16:13:25 GMT</pubDate></item><item><title><![CDATA[Reply to MessageBox Problem on Thu, 06 Jan 2005 16:42:51 GMT]]></title><description><![CDATA[<p>Kann mir mal bitte jemand zu dem obigen Source ein (funktionierendes) Beispiel dazu geben? Ich komme mit dem sprintf irgendwie nicht ganz klar. Thx</p>
]]></description><link>https://www.c-plusplus.net/forum/post/688852</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/688852</guid><dc:creator><![CDATA[VirtualDreams]]></dc:creator><pubDate>Thu, 06 Jan 2005 16:42:51 GMT</pubDate></item><item><title><![CDATA[Reply to MessageBox Problem on Thu, 06 Jan 2005 16:45:26 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">int i = 1337;

// itoa
char val [11];
itoa(i,val,10);
MessageBox(0,val,&quot;Zahl!&quot;,MB_OK);

// sprintf
char val[11];
sprintf(val,&quot;%d&quot;,i);
MessageBox(0,val,&quot;Zahl!&quot;,MB_OK);

// usw.
// Es gibt 100 möglichkeiten eine Zahl in einen String umzuwandeln, siehe dazu in der C++-FAQ
</code></pre>
<p>MfG SideWinder</p>
]]></description><link>https://www.c-plusplus.net/forum/post/688853</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/688853</guid><dc:creator><![CDATA[SideWinder]]></dc:creator><pubDate>Thu, 06 Jan 2005 16:45:26 GMT</pubDate></item><item><title><![CDATA[Reply to MessageBox Problem on Thu, 06 Jan 2005 16:45:34 GMT]]></title><description><![CDATA[<p>nein. nutz die Forensuche.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/688854</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/688854</guid><dc:creator><![CDATA[wir]]></dc:creator><pubDate>Thu, 06 Jan 2005 16:45:34 GMT</pubDate></item><item><title><![CDATA[Reply to MessageBox Problem on Thu, 06 Jan 2005 17:28:53 GMT]]></title><description><![CDATA[<p>So, hab erst mal die sprintf methode genommen. jetzt wird die Adresse jedoch als reiner Zahlenwert ausgegeben. Wie kann ich sie Hexadezimal darstellen? beim format control finde ich nix dergleichen. THX</p>
]]></description><link>https://www.c-plusplus.net/forum/post/688908</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/688908</guid><dc:creator><![CDATA[VirtualDreams]]></dc:creator><pubDate>Thu, 06 Jan 2005 17:28:53 GMT</pubDate></item><item><title><![CDATA[Reply to MessageBox Problem on Thu, 06 Jan 2005 17:51:24 GMT]]></title><description><![CDATA[<p>%x oder %X</p>
]]></description><link>https://www.c-plusplus.net/forum/post/688943</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/688943</guid><dc:creator><![CDATA[Hepi]]></dc:creator><pubDate>Thu, 06 Jan 2005 17:51:24 GMT</pubDate></item><item><title><![CDATA[Reply to MessageBox Problem on Thu, 06 Jan 2005 17:57:13 GMT]]></title><description><![CDATA[<p>Hab %p genommen, das gibt die Addy komplett wieder, also mit den nullen vorne dran.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/688948</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/688948</guid><dc:creator><![CDATA[VirtualDreams]]></dc:creator><pubDate>Thu, 06 Jan 2005 17:57:13 GMT</pubDate></item><item><title><![CDATA[Reply to MessageBox Problem on Fri, 07 Jan 2005 21:23:46 GMT]]></title><description><![CDATA[<pre><code>C++ Builder Documentation

Type Char	Expected Input	Format of output

Numerics

d	Integer	signed decimal integer
i	Integer	signed decimal integer
o	Integer	unsigned octal integer
u	Integer	unsigned decimal integer
x	Integer	unsigned hexadecimal int (with a, b, c, d, e, f)
X	Integer	unsigned hexadecimal int (with A, B, C, D, E, F)
f	Floating point	signed value of the form [-]dddd.dddd.

e	Floating point	signed value of the form [-]d.dddd or e[+/-]ddd
g	Floating point	signed value in either e or f form, based on given value and precision. Trailing zeros and the decimal point are printed if necessary.
E	Floating point	Same as e; with E for exponent.
G	Floating point	Same as g; with E for exponent if e format used

Characters
c	Character	Single character
s	String pointer	Prints characters until a null-terminator is pressed or precision is reached
%	None	Prints the % character

Pointers
n	Pointer to int	Stores (in the location pointed to by the input argument) a count of the chars written so far.
p	Pointer	Prints the input argument as a pointer; format depends on which memory model was used. It will be either XXXX:YYYY or YYYY (offset only).

Infinite floating-point numbers are printed as +INF and -INF.

An IEEE Not-A-Number is printed as +NAN or -NAN.
</code></pre>
<p>Versuch doch mal sowas für Hex-Darstellung:</p>
<pre><code class="language-cpp">char address1[BUFSIZ+1],address2[BUFSIZ+1];
(void)sprintf(address1, &quot;%n&quot;, ptr);
(void)sprintf(address2, &quot;%X&quot;, atoi(adress1));

(void)MessageBox(NULL, address2, &quot;Da:&quot;, 0);
</code></pre>
<p>~cp</p>
]]></description><link>https://www.c-plusplus.net/forum/post/690228</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/690228</guid><dc:creator><![CDATA[code_pilot]]></dc:creator><pubDate>Fri, 07 Jan 2005 21:23:46 GMT</pubDate></item><item><title><![CDATA[Reply to MessageBox Problem on Fri, 07 Jan 2005 21:24:53 GMT]]></title><description><![CDATA[<p>code_pilot was bringen die Casts vor den Funktionsaufrufen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/690231</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/690231</guid><dc:creator><![CDATA[cast-neuling]]></dc:creator><pubDate>Fri, 07 Jan 2005 21:24:53 GMT</pubDate></item><item><title><![CDATA[Reply to MessageBox Problem on Fri, 07 Jan 2005 21:29:51 GMT]]></title><description><![CDATA[<p>cast-neuling schrieb:</p>
<blockquote>
<p>code_pilot was bringen die Casts vor den Funktionsaufrufen?</p>
</blockquote>
<p>LOL eigentlich nix aber so wird's bei uns in der Firma gemacht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /> ... gewöhn ich mir halt langsam an <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /> ... es heisst einfach: Der Rückgabewert dieser Funktion wird nicht verwendet ... ach ja BTW wir programmieren noch mit Uralt-C (Kernighan-Richie Compiler), bei uns gibt es auch noch die Schreibweise</p>
<pre><code class="language-cpp">int test(a, b)
   int a;
   int b;
{
     return (a + b);
}
</code></pre>
<p>bei Funktionen.</p>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/690234</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/690234</guid><dc:creator><![CDATA[code_pilot]]></dc:creator><pubDate>Fri, 07 Jan 2005 21:29:51 GMT</pubDate></item><item><title><![CDATA[Reply to MessageBox Problem on Fri, 07 Jan 2005 21:30:11 GMT]]></title><description><![CDATA[<blockquote>
<p>LOL eigentlich nix aber so wird's bei uns in der Firma gemacht</p>
</blockquote>
<p>ROFL. Was für Deppen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/690238</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/690238</guid><dc:creator><![CDATA[hihi]]></dc:creator><pubDate>Fri, 07 Jan 2005 21:30:11 GMT</pubDate></item><item><title><![CDATA[Reply to MessageBox Problem on Fri, 07 Jan 2005 21:43:33 GMT]]></title><description><![CDATA[<p>hihi schrieb:</p>
<blockquote>
<blockquote>
<p>LOL eigentlich nix aber so wird's bei uns in der Firma gemacht</p>
</blockquote>
<p>ROFL. Was für Deppen.</p>
</blockquote>
<p>Ja, genau so Deppen wie du. Macht's Spass, andere zu beleidigen? Tut mir leid, das du nicht die Anfänge von C miterlebt und gleich in der Klicki-Bunti Welt aufgewachsen bist. Unsere Software ist schon fast 20 Jahre alt... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f62e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_open_mouth"
      title=":open_mouth:"
      alt="😮"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f62e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_open_mouth"
      title=":open_mouth:"
      alt="😮"
    /> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f62e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_open_mouth"
      title=":open_mouth:"
      alt="😮"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/690247</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/690247</guid><dc:creator><![CDATA[code_pilot]]></dc:creator><pubDate>Fri, 07 Jan 2005 21:43:33 GMT</pubDate></item></channel></rss>