<?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[printER]]></title><description><![CDATA[<p>hi,<br />
hab n problem mit sonem tutorial, der zeigt mir imma nen Fehler bei &quot;printER&quot;, kann mir einer weiter helfen??? man muss ne windows application machn und &quot;winspool.lib&quot; mitlinken <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>
<p>#include &lt;windows.h&gt;</p>
<p>HDC GetprinterDC (void) ;</p>
<p>int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,<br />
LPSTR lpszCmdLine, int iCmdShow)<br />
{<br />
static DOCINFO di = { sizeof (DOCINFO), TEXT (&quot;FormFeed&quot;) } ;<br />
HDC hdcprint = GetprinterDC () ;</p>
<p>if (hdcprint != NULL)<br />
{<br />
if (StartDoc (hdcprint, &amp;di) &gt; 0)<br />
if (StartPage (hdcprint) &gt; 0 &amp;&amp; EndPage (hdcprint) &gt; 0)<br />
EndDoc (hdcprint) ;</p>
<p>DeleteDC (hdcprint) ;<br />
}</p>
<p>return 0 ;<br />
}</p>
<p>HDC GetprinterDC (void)<br />
{<br />
DWORD dwNeeded, dwReturned ;<br />
HDC hdc ;<br />
printER_INFO_4 * pinfo4 ;<br />
printER_INFO_5 * pinfo5 ;</p>
<p>if (GetVersion () &amp; 0x80000000) // Windows 98<br />
{<br />
Enumprinters (printER_ENUM_DEFAULT, NULL, 5, NULL,<br />
0, &amp;dwNeeded, &amp;dwReturned) ;</p>
<p>pinfo5 = (printER_INFO_5 *)malloc (dwNeeded) ;</p>
<p>Enumprinters (printER_ENUM_DEFAULT, NULL, 5, (PBYTE) pinfo5,<br />
dwNeeded, &amp;dwNeeded, &amp;dwReturned) ;</p>
<p>hdc = CreateDC (NULL, pinfo5-&gt;pprinterName, NULL, NULL) ;</p>
<p>free (pinfo5) ;<br />
}<br />
else // Windows NT<br />
{<br />
Enumprinters (printER_ENUM_LOCAL, NULL, 4, NULL,<br />
0, &amp;dwNeeded, &amp;dwReturned) ;</p>
<p>pinfo4 = (printER_INFO_4 *)malloc (dwNeeded) ;</p>
<p>Enumprinters (printER_ENUM_LOCAL, NULL, 4, (PBYTE) pinfo4,<br />
dwNeeded, &amp;dwNeeded, &amp;dwReturned) ;</p>
<p>hdc = CreateDC (NULL, pinfo4-&gt;pprinterName, NULL, NULL) ;</p>
<p>free (pinfo4) ;<br />
}<br />
return hdc ;<br />
}</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/131234/printer</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Jul 2026 23:48:51 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/131234.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 01 Jan 2006 19:08:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to printER on Sun, 01 Jan 2006 19:08:46 GMT]]></title><description><![CDATA[<p>hi,<br />
hab n problem mit sonem tutorial, der zeigt mir imma nen Fehler bei &quot;printER&quot;, kann mir einer weiter helfen??? man muss ne windows application machn und &quot;winspool.lib&quot; mitlinken <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>
<p>#include &lt;windows.h&gt;</p>
<p>HDC GetprinterDC (void) ;</p>
<p>int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,<br />
LPSTR lpszCmdLine, int iCmdShow)<br />
{<br />
static DOCINFO di = { sizeof (DOCINFO), TEXT (&quot;FormFeed&quot;) } ;<br />
HDC hdcprint = GetprinterDC () ;</p>
<p>if (hdcprint != NULL)<br />
{<br />
if (StartDoc (hdcprint, &amp;di) &gt; 0)<br />
if (StartPage (hdcprint) &gt; 0 &amp;&amp; EndPage (hdcprint) &gt; 0)<br />
EndDoc (hdcprint) ;</p>
<p>DeleteDC (hdcprint) ;<br />
}</p>
<p>return 0 ;<br />
}</p>
<p>HDC GetprinterDC (void)<br />
{<br />
DWORD dwNeeded, dwReturned ;<br />
HDC hdc ;<br />
printER_INFO_4 * pinfo4 ;<br />
printER_INFO_5 * pinfo5 ;</p>
<p>if (GetVersion () &amp; 0x80000000) // Windows 98<br />
{<br />
Enumprinters (printER_ENUM_DEFAULT, NULL, 5, NULL,<br />
0, &amp;dwNeeded, &amp;dwReturned) ;</p>
<p>pinfo5 = (printER_INFO_5 *)malloc (dwNeeded) ;</p>
<p>Enumprinters (printER_ENUM_DEFAULT, NULL, 5, (PBYTE) pinfo5,<br />
dwNeeded, &amp;dwNeeded, &amp;dwReturned) ;</p>
<p>hdc = CreateDC (NULL, pinfo5-&gt;pprinterName, NULL, NULL) ;</p>
<p>free (pinfo5) ;<br />
}<br />
else // Windows NT<br />
{<br />
Enumprinters (printER_ENUM_LOCAL, NULL, 4, NULL,<br />
0, &amp;dwNeeded, &amp;dwReturned) ;</p>
<p>pinfo4 = (printER_INFO_4 *)malloc (dwNeeded) ;</p>
<p>Enumprinters (printER_ENUM_LOCAL, NULL, 4, (PBYTE) pinfo4,<br />
dwNeeded, &amp;dwNeeded, &amp;dwReturned) ;</p>
<p>hdc = CreateDC (NULL, pinfo4-&gt;pprinterName, NULL, NULL) ;</p>
<p>free (pinfo4) ;<br />
}<br />
return hdc ;<br />
}</p>
]]></description><link>https://www.c-plusplus.net/forum/post/954266</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/954266</guid><dc:creator><![CDATA[kackdrucker]]></dc:creator><pubDate>Sun, 01 Jan 2006 19:08:46 GMT</pubDate></item><item><title><![CDATA[Reply to printER on Sun, 01 Jan 2006 19:10:13 GMT]]></title><description><![CDATA[<p>der zeigt immer den Fehler : &quot;printER...&quot; undeclared (first use the function)<br />
und das immer da wo was mit &quot;printER&quot; steht</p>
]]></description><link>https://www.c-plusplus.net/forum/post/954267</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/954267</guid><dc:creator><![CDATA[kackdrucker]]></dc:creator><pubDate>Sun, 01 Jan 2006 19:10:13 GMT</pubDate></item><item><title><![CDATA[Reply to printER on Sun, 01 Jan 2006 19:12:14 GMT]]></title><description><![CDATA[<p>Dann schreibs doch groß.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/954268</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/954268</guid><dc:creator><![CDATA[kackantwort]]></dc:creator><pubDate>Sun, 01 Jan 2006 19:12:14 GMT</pubDate></item><item><title><![CDATA[Reply to printER on Sun, 01 Jan 2006 20:53:54 GMT]]></title><description><![CDATA[<p>dann kommt ein fehler bei:</p>
<p>Enumprinters (PRINTER_ENUM_DEFAULT, NULL, 5, NULL,<br />
0, &amp;dwNeeded, &amp;dwReturned) ;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/954303</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/954303</guid><dc:creator><![CDATA[kackdrucker]]></dc:creator><pubDate>Sun, 01 Jan 2006 20:53:54 GMT</pubDate></item><item><title><![CDATA[Reply to printER on Sun, 01 Jan 2006 20:54:45 GMT]]></title><description><![CDATA[<p>der gleiche fehler wie davor Enumprinters undeclared...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/954304</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/954304</guid><dc:creator><![CDATA[kackdrucker]]></dc:creator><pubDate>Sun, 01 Jan 2006 20:54:45 GMT</pubDate></item><item><title><![CDATA[Reply to printER on Sun, 01 Jan 2006 21:01:35 GMT]]></title><description><![CDATA[<p>Dir sollte bewusst sein, dass C/C++ eine <strong>case-sensitive</strong> Sprache ist! Somit musst Du die Namen der Funktionen genau so schreiben wie sie deklariert sind und (i.d.R.) auch in der Hilfe stehen!</p>
<p>=&gt;</p>
<p>Enum<strong>P</strong>rinters</p>
]]></description><link>https://www.c-plusplus.net/forum/post/954310</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/954310</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Sun, 01 Jan 2006 21:01:35 GMT</pubDate></item><item><title><![CDATA[Reply to printER on Sun, 01 Jan 2006 21:20:21 GMT]]></title><description><![CDATA[<p>aha, danke! jetzt hat der aber noch eine problem <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="😞"
    /><br />
bei</p>
<p>hdc = CreateDC (NULL, pinfo5-&gt;pprinterName, NULL, NULL) ;</p>
<p>meint der: 'struct_PRINTER_INFO_5A'has no member named 'pprinterName'</p>
]]></description><link>https://www.c-plusplus.net/forum/post/954318</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/954318</guid><dc:creator><![CDATA[kackdrucker]]></dc:creator><pubDate>Sun, 01 Jan 2006 21:20:21 GMT</pubDate></item><item><title><![CDATA[Reply to printER on Sun, 01 Jan 2006 21:22:01 GMT]]></title><description><![CDATA[<p>ah ich habs jetzt, shit, jetzt zeigt der an : [Build Error]</p>
]]></description><link>https://www.c-plusplus.net/forum/post/954320</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/954320</guid><dc:creator><![CDATA[kackdrucker]]></dc:creator><pubDate>Sun, 01 Jan 2006 21:22:01 GMT</pubDate></item><item><title><![CDATA[Reply to printER on Sun, 01 Jan 2006 21:23:50 GMT]]></title><description><![CDATA[<p>Ich kann Dir nicht folgen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/954322</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/954322</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Sun, 01 Jan 2006 21:23:50 GMT</pubDate></item><item><title><![CDATA[Reply to printER on Sun, 01 Jan 2006 21:47:21 GMT]]></title><description><![CDATA[<p>also: ich hab alles jetzt soweit berichtigt, aber jetzt zeigt der mit nen [build error] !?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/954329</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/954329</guid><dc:creator><![CDATA[kackdrucker]]></dc:creator><pubDate>Sun, 01 Jan 2006 21:47:21 GMT</pubDate></item></channel></rss>