<?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[WinDDK - Standard Datentypen wie char, int...?]]></title><description><![CDATA[<p>Hallo Beisammen,</p>
<p>ich fummel hier grade mit dem Windows Driver Development Kit rum.<br />
Ich hab zwar schon einige kurze Test-Treiber geschrieben, aber jetzt wo ich dann doch nicht mehr um Standard Datentypen rumkomme ^^, wie z.B. int, char, WORD, DWORD, etc. gibts ein Problem:<br />
Der Compiler haut mir andauernd Fehlermeldungen um die Ohren so von wegen dass er die Datentypen nicht kennt. Ich hab die &lt;ntddk.h&gt; inkludiert, sonst nichts.<br />
Was tun ?...</p>
<p>Ich hoffe mal ihr könnt mir da ein Stückchen weiterhelfen.</p>
<p>Grüße, Xzi-Bit</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/179221/winddk-standard-datentypen-wie-char-int</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Jul 2026 00:11:52 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/179221.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 19 Apr 2007 14:31:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to WinDDK - Standard Datentypen wie char, int...? on Thu, 19 Apr 2007 14:31:50 GMT]]></title><description><![CDATA[<p>Hallo Beisammen,</p>
<p>ich fummel hier grade mit dem Windows Driver Development Kit rum.<br />
Ich hab zwar schon einige kurze Test-Treiber geschrieben, aber jetzt wo ich dann doch nicht mehr um Standard Datentypen rumkomme ^^, wie z.B. int, char, WORD, DWORD, etc. gibts ein Problem:<br />
Der Compiler haut mir andauernd Fehlermeldungen um die Ohren so von wegen dass er die Datentypen nicht kennt. Ich hab die &lt;ntddk.h&gt; inkludiert, sonst nichts.<br />
Was tun ?...</p>
<p>Ich hoffe mal ihr könnt mir da ein Stückchen weiterhelfen.</p>
<p>Grüße, Xzi-Bit</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1269317</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1269317</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Thu, 19 Apr 2007 14:31:50 GMT</pubDate></item><item><title><![CDATA[Reply to WinDDK - Standard Datentypen wie char, int...? on Thu, 19 Apr 2007 14:45:37 GMT]]></title><description><![CDATA[<p>Hmm... also &quot;int&quot; und &quot;char&quot; kennt er auf jeden Fall.</p>
<p>Zeig doch mal ein Stück Code und die passende Fehlermeldung...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1269331</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1269331</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Thu, 19 Apr 2007 14:45:37 GMT</pubDate></item><item><title><![CDATA[Reply to WinDDK - Standard Datentypen wie char, int...? on Thu, 19 Apr 2007 16:02:13 GMT]]></title><description><![CDATA[<p>Ich hab den Code auf das Minimum begrenzt, sieht folgendermaßen aus:</p>
<pre><code class="language-cpp">#include &lt;ntddk.h&gt;

VOID OnUnload (IN PDRIVER_OBJECT DriverObject)
{
	DbgPrint (&quot;OnUnload called\n&quot;);
}

NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) 
{
         DbgPrint(&quot;DriverEntry called\n&quot;);
	DriverObject-&gt;DriverUnload = &amp;OnUnload;

	DWORD proc = 0;

	return STATUS_SUCCESS;
}
</code></pre>
<p>Es kann also nur daran liegen. Wenn ich die Deklaration</p>
<pre><code class="language-cpp">DWORD proc = 0;
</code></pre>
<p>weglasse, so kompiliert er mir den Source einwandfrei.</p>
<p>Meine Compile-Ausgabe (buildchk_wxp_x86.log) sieht wie folgt aus:</p>
<pre><code>BUILD: Computing Include file dependencies:
BUILD: Examining c:\dd directory for files to compile.
Compiling (NoSync) c:\dd directory ********************
1&gt;'nmake.exe /nologo BUILDMSG=Stop. -i NTTEST= UMTEST= NOLINK=1 NOPASS0=1 PASS1_NOLIB=1 386=1'
1&gt;BUILDMSG: Processing c:\dd
1&gt;cl -nologo -Ii386\ -I. -IC:\WINDDK\inc\mfc42 -I%BUILD%\inc -Iobjchk_wxp_x86\i386 -IC:\WINDDK\inc\wxp -IC:\WINDDK\inc\wxp -IC:\WINDDK\inc\ddk\wxp -IC:\WINDDK\inc\ddk\wdm\wxp -IC:\WINDDK\inc\crt -D_X86_=1 -Di386=1  -DSTD_CALL -DCONDITION_HANDLING=1   -DNT_INST=0 -DWIN32=100 -D_NT1X_=100 -DWINNT=1 -D_WIN32_WINNT=0x0501 /DWINVER=0x0501 -D_WIN32_IE=0x0603    -DWIN32_LEAN_AND_MEAN=1 -DDEVL=1 -DDBG=1 -D__BUILDMACHINE__=WinDDK -DFPO=0  -DNDEBUG -D_DLL=1      /c /Zl /Zp8 /Gy /Gm- -cbstring /W3 /WX /Gz  /GX-  /GR- /GF /GS /G6 /Ze /Gi- /QIfdiv- /hotpatch -Z7 /Od /Oi  /Oy-   -FIC:\WINDDK\inc\wxp\warning.h   .\hello.c 
1&gt;hello.c
1&gt;c:\DD\hello.c(16) : error C2065: 'DWORD' : undeclared identifier
1&gt;c:\DD\hello.c(16) : error C2146: syntax error : missing ';' before identifier 'proc'
1&gt;c:\DD\hello.c(16) : error C2144: syntax error : '&lt;Unknown&gt;' should be preceded by '&lt;Unknown&gt;'
1&gt;c:\DD\hello.c(16) : error C2144: syntax error : '&lt;Unknown&gt;' should be preceded by '&lt;Unknown&gt;'
1&gt;c:\DD\hello.c(16) : error C2143: syntax error : missing ';' before 'identifier'
1&gt;c:\DD\hello.c(16) : error C2065: 'proc' : undeclared identifier
1&gt;
1&gt;Stop.
Compiling  c:\dd directory ********************
100&gt;'nmake.exe /nologo BUILDMSG=Stop. -i NTTEST= UMTEST= NOLINK=1 NOPASS0=1 386=1'
100&gt;BUILDMSG: Processing c:\dd
100&gt;cl -nologo -Ii386\ -I. -IC:\WINDDK\inc\mfc42 -I%BUILD%\inc -Iobjchk_wxp_x86\i386 -IC:\WINDDK\inc\wxp -IC:\WINDDK\inc\wxp -IC:\WINDDK\inc\ddk\wxp -IC:\WINDDK\inc\ddk\wdm\wxp -IC:\WINDDK\inc\crt -D_X86_=1 -Di386=1  -DSTD_CALL -DCONDITION_HANDLING=1   -DNT_INST=0 -DWIN32=100 -D_NT1X_=100 -DWINNT=1 -D_WIN32_WINNT=0x0501 /DWINVER=0x0501 -D_WIN32_IE=0x0603    -DWIN32_LEAN_AND_MEAN=1 -DDEVL=1 -DDBG=1 -D__BUILDMACHINE__=WinDDK -DFPO=0  -DNDEBUG -D_DLL=1      /c /Zl /Zp8 /Gy /Gm- -cbstring /W3 /WX /Gz  /GX-  /GR- /GF /GS /G6 /Ze /Gi- /QIfdiv- /hotpatch -Z7 /Od /Oi  /Oy-   -FIC:\WINDDK\inc\wxp\warning.h   .\hello.c 
100&gt;hello.c
100&gt;c:\DD\hello.c(16) : error C2065: 'DWORD' : undeclared identifier
100&gt;c:\DD\hello.c(16) : error C2146: syntax error : missing ';' before identifier 'proc'
100&gt;c:\DD\hello.c(16) : error C2144: syntax error : '&lt;Unknown&gt;' should be preceded by '&lt;Unknown&gt;'
100&gt;c:\DD\hello.c(16) : error C2144: syntax error : '&lt;Unknown&gt;' should be preceded by '&lt;Unknown&gt;'
100&gt;c:\DD\hello.c(16) : error C2143: syntax error : missing ';' before 'identifier'
100&gt;c:\DD\hello.c(16) : error C2065: 'proc' : undeclared identifier
100&gt;
100&gt;Stop.
Compile errors: not linking c:\dd directory ********************
</code></pre>
<p>Ich kompiliere den Treiber mit 'build' im 'Windows XP Checked Build Environment'. Hab dazu zwei weitere Dateien in meinem Verzeichnis (in dem der Sourcecode 'hello.c' liegt) erstellt:</p>
<p>1. MAKEFILE<br />
sieht so aus:</p>
<pre><code>!INCLUDE $(NTMAKEENV)\makefile.def
</code></pre>
<p>2. SOURCES<br />
sieht so aus:</p>
<pre><code>TARGETNAME = hello
TARGETPATH = obj
TARGETTYPE = DRIVER

INCLUDES   = %BUILD%\inc
LIBS       = %BUILD%\lib

SOURCES    = hello.c
</code></pre>
<p>Sry an die Moderatoren: ich will hier nicht spammen! XD</p>
<p>Nun ja, ich hoffe das hilft weiter.</p>
<p>Bei int und char kommen die selben Fehlermeldungen, sollte ich das noch erwähnen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1269386</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1269386</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Thu, 19 Apr 2007 16:02:13 GMT</pubDate></item><item><title><![CDATA[Reply to WinDDK - Standard Datentypen wie char, int...? on Thu, 19 Apr 2007 16:58:08 GMT]]></title><description><![CDATA[<p>Naja, ich würde sagen es liegt eher daran, dass Du *C* machst und kein C++!!!</p>
<p>Ändere es mal nach:</p>
<pre><code class="language-cpp">NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) 
{
    DWORD proc = 0;

        DbgPrint(&quot;DriverEntry called\n&quot;);
    DriverObject-&gt;DriverUnload = &amp;OnUnload;

    return STATUS_SUCCESS;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1269439</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1269439</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Thu, 19 Apr 2007 16:58:08 GMT</pubDate></item><item><title><![CDATA[Reply to WinDDK - Standard Datentypen wie char, int...? on Thu, 19 Apr 2007 18:20:24 GMT]]></title><description><![CDATA[<p>Jochen Kalmbach schrieb:</p>
<blockquote>
<p>Naja, ich würde sagen es liegt eher daran, dass Du *C* machst und kein C++!!!</p>
</blockquote>
<p>die ms-compiler kennen leider kein C99, sonst würde das auch so gehen, wie er's gemacht hat.<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1269490</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1269490</guid><dc:creator><![CDATA[vista]]></dc:creator><pubDate>Thu, 19 Apr 2007 18:20:24 GMT</pubDate></item><item><title><![CDATA[Reply to WinDDK - Standard Datentypen wie char, int...? on Thu, 19 Apr 2007 18:36:02 GMT]]></title><description><![CDATA[<p>Hoppla, ich hatte ganz vergessen zu erwähnen, dass ich das bereits ausprobiert habe.<br />
Scheint den Compiler aber nicht sonderlich zu interessieren - der bleibt stur und liefert mir seine 12 Syntaxerrors als wäre nichts geschehen.</p>
<p>Diese verklemmten Compiler...XD</p>
<p>Ich frage mich nur, ob ich nicht eine Library zu inkludieren vergessen habe.<br />
Denn ich glaube kaum, dass es am Compiler liegt. ^^</p>
<p>Danke jedenfalls - das mit der C Konvention war schon mal eine sehr gute Idee.</p>
<p>Schöne Grüße, Xzi-Bit</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1269510</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1269510</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Thu, 19 Apr 2007 18:36:02 GMT</pubDate></item><item><title><![CDATA[Reply to WinDDK - Standard Datentypen wie char, int...? on Thu, 19 Apr 2007 18:42:28 GMT]]></title><description><![CDATA[<p>kann es sein, dass die DDK header kein DWORD kennen (hab' lange nichts mehr gemacht damit)?<br />
versuch mal ULONG statt DWORD<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1269517</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1269517</guid><dc:creator><![CDATA[vista]]></dc:creator><pubDate>Thu, 19 Apr 2007 18:42:28 GMT</pubDate></item><item><title><![CDATA[Reply to WinDDK - Standard Datentypen wie char, int...? on Fri, 20 Apr 2007 12:31:09 GMT]]></title><description><![CDATA[<blockquote>
<p>kann es sein, dass die DDK header kein DWORD kennen (hab' lange nichts mehr gemacht damit)?<br />
versuch mal ULONG statt DWORD</p>
</blockquote>
<p>!!!! XD<br />
Mehr sag ich jetzt mal nicht dazu ^^<br />
außer vielleicht...DANKE, vista !</p>
<p>Ich hab zwar zuvor schon mit</p>
<pre><code class="language-cpp">typedef ULONG DWORD
</code></pre>
<p>rumgebastelt, aber das hat nicht so ganz geklappt. Auch mit einer define auf meine #includes <strong>folgend</strong> hab ich's probiert - ohne Erfolg.<br />
Nun habe ich eine</p>
<pre><code class="language-cpp">#define ULONG DWORD
</code></pre>
<p><strong>vor</strong> die #includes gepackt und er kompiliert mir den Source einwandfrei.</p>
<p>Danke auch an Sie, Herr Kalmbach.</p>
<p>Greetings, Xzi-Bit</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1269959</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1269959</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Fri, 20 Apr 2007 12:31:09 GMT</pubDate></item></channel></rss>