<?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[Xp &#x2F; 2000 Treiber programmieren]]></title><description><![CDATA[<p>Hallo,</p>
<p>hat jemand Ahnung von der Treiber Programmierung unter XP/2000<br />
oder eine Idee wo es dazu nützliche Infos gibt.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/188805/xp-2000-treiber-programmieren</link><generator>RSS for Node</generator><lastBuildDate>Fri, 03 Jul 2026 05:35:00 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/188805.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 04 Aug 2007 10:35:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Xp &#x2F; 2000 Treiber programmieren on Sat, 04 Aug 2007 10:35:23 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>hat jemand Ahnung von der Treiber Programmierung unter XP/2000<br />
oder eine Idee wo es dazu nützliche Infos gibt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1338576</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1338576</guid><dc:creator><![CDATA[hermes]]></dc:creator><pubDate>Sat, 04 Aug 2007 10:35:23 GMT</pubDate></item><item><title><![CDATA[Reply to Xp &#x2F; 2000 Treiber programmieren on Sat, 04 Aug 2007 11:26:04 GMT]]></title><description><![CDATA[<p>JA:<br />
geht nciht mir dem Borland bzw der VCL.<br />
Du brauchst das MS Windows DDK (Driver Development Kit),<br />
bzw inzwischen (auch) das KMPF und das UMPF evtl.<br />
kriegste alles von MS im MSDN (<a href="http://msdn.com/" rel="nofollow">http://msdn.com/</a>)<br />
Dann brauchste noch ein Tutorial, das ganze geht shconmal nicht in C++,<br />
sondern nur in C, und dann ist das afaik<br />
auch noch ein Dialekt und kein Standard C</p>
<p>Der Jemand</p>
<p>p.s.: Das WIN32-Forum wäre glaube ich passender,<br />
auch wenn es trotzdem nicht ganz passt ..</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1338597</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1338597</guid><dc:creator><![CDATA[Der Jemand]]></dc:creator><pubDate>Sat, 04 Aug 2007 11:26:04 GMT</pubDate></item><item><title><![CDATA[Reply to Xp &#x2F; 2000 Treiber programmieren on Sat, 04 Aug 2007 12:18:09 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>danke für Deine Antwort.</p>
<blockquote>
<p>Du brauchst das MS Windows DDK (Driver Development Kit),<br />
bzw inzwischen (auch) das KMPF und das UMPF evtl.</p>
</blockquote>
<p>Schon etliche male versucht bei Microsoft an das DDK ranzukommen,<br />
irgendwie aber nie geklappt. Gibt es einen Link wo man das ganze<br />
downloaden kann.</p>
<blockquote>
<p>das ganze geht shconmal nicht in C++,<br />
sondern nur in C</p>
</blockquote>
<p>Das ist mir schon klar.</p>
<blockquote>
<p>Dann brauchste noch ein Tutorial</p>
</blockquote>
<p>Wo bekomme ich soetwas.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1338636</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1338636</guid><dc:creator><![CDATA[hermes]]></dc:creator><pubDate>Sat, 04 Aug 2007 12:18:09 GMT</pubDate></item><item><title><![CDATA[Reply to Xp &#x2F; 2000 Treiber programmieren on Sun, 05 Aug 2007 11:27:50 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-437.html" rel="nofollow">Jansen</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-2.html" rel="nofollow">VCL/CLX (Borland C++ Builder)</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/1338947</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1338947</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Sun, 05 Aug 2007 11:27:50 GMT</pubDate></item><item><title><![CDATA[Reply to Xp &#x2F; 2000 Treiber programmieren on Sun, 05 Aug 2007 11:39:31 GMT]]></title><description><![CDATA[<p>hermes schrieb:</p>
<blockquote>
<p>Schon etliche male versucht bei Microsoft an das DDK ranzukommen,<br />
irgendwie aber nie geklappt. Gibt es einen Link wo man das ganze<br />
downloaden kann.</p>
</blockquote>
<p><a href="http://www.microsoft.com/whdc/devtools/ddk/default.mspx" rel="nofollow">http://www.microsoft.com/whdc/devtools/ddk/default.mspx</a><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/1338951</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1338951</guid><dc:creator><![CDATA[Undertaker]]></dc:creator><pubDate>Sun, 05 Aug 2007 11:39:31 GMT</pubDate></item><item><title><![CDATA[Reply to Xp &#x2F; 2000 Treiber programmieren on Sun, 05 Aug 2007 12:47:39 GMT]]></title><description><![CDATA[<p>hermes schrieb:</p>
<blockquote>
<blockquote>
<p>Dann brauchste noch ein Tutorial</p>
</blockquote>
<p>Wo bekomme ich soetwas.</p>
</blockquote>
<p>Im DDK sind hunderte von Beipielen dabei...</p>
<p>Was willst Du denn genau machen? Hoffentlich nix mit Datei-System-Filtern... sonst rate ich Dir von DDK ab und kauf Dir das OSR-Kit:<br />
<a href="http://www.osr.com/toolkits_fddk.shtml" rel="nofollow">http://www.osr.com/toolkits_fddk.shtml</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1338973</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1338973</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Sun, 05 Aug 2007 12:47:39 GMT</pubDate></item><item><title><![CDATA[Reply to Xp &#x2F; 2000 Treiber programmieren on Sun, 05 Aug 2007 18:46:14 GMT]]></title><description><![CDATA[<p>Jochen Kalmbach schrieb:</p>
<blockquote>
<p>hermes schrieb:</p>
<blockquote>
<blockquote>
<p>Dann brauchste noch ein Tutorial</p>
</blockquote>
<p>Wo bekomme ich soetwas.</p>
</blockquote>
<p>Im DDK sind hunderte von Beipielen dabei...</p>
<p>Was willst Du denn genau machen? Hoffentlich nix mit Datei-System-Filtern... sonst rate ich Dir von DDK ab und kauf Dir das OSR-Kit:<br />
<a href="http://www.osr.com/toolkits_fddk.shtml" rel="nofollow">http://www.osr.com/toolkits_fddk.shtml</a></p>
</blockquote>
<p>Ich würde gerne einen USB Treiber programmieren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1339149</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1339149</guid><dc:creator><![CDATA[hermes]]></dc:creator><pubDate>Sun, 05 Aug 2007 18:46:14 GMT</pubDate></item><item><title><![CDATA[Reply to Xp &#x2F; 2000 Treiber programmieren on Sun, 05 Aug 2007 19:30:39 GMT]]></title><description><![CDATA[<p>Für USB gibt es jetzt den &quot;User-Mode-Treiber&quot;; der ist einem Kernel-Mode-Treiber vorzuziehen, da Du hier keine Signierung (X64) bentötigst und er nicht gleich Dein ganzen Rechner zum Absturz bringt, wenn was schief lief...<br />
Siehe UMDF</p>
<p>User-Mode Driver Framework (UMDF)<br />
<a href="http://www.microsoft.com/whdc/driver/wdf/UMDF.mspx" rel="nofollow">http://www.microsoft.com/whdc/driver/wdf/UMDF.mspx</a></p>
<p>How to Develop a UMDF Driver<br />
<a href="http://download.microsoft.com/download/f/0/5/f05a42ce-575b-4c60-82d6-208d3754b2d6/Developing-UMDF-Drvs.ppt" rel="nofollow">http://download.microsoft.com/download/f/0/5/f05a42ce-575b-4c60-82d6-208d3754b2d6/Developing-UMDF-Drvs.ppt</a></p>
<p>The UMDF-USB Object Model<br />
<a href="http://msdn2.microsoft.com/en-us/library/bb314420.aspx" rel="nofollow">http://msdn2.microsoft.com/en-us/library/bb314420.aspx</a></p>
<p>Du bekommst das ganze hier (MS-Connect):<br />
<a href="http://www.microsoft.com/whdc/DevTools/WDK/WDKpkg.mspx" rel="nofollow">http://www.microsoft.com/whdc/DevTools/WDK/WDKpkg.mspx</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1339164</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1339164</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Sun, 05 Aug 2007 19:30:39 GMT</pubDate></item><item><title><![CDATA[Reply to Xp &#x2F; 2000 Treiber programmieren on Sun, 05 Aug 2007 22:39:38 GMT]]></title><description><![CDATA[<p>BTW: auch Kernelmode Treiber kann man mit C++ programmieren.<br />
Man muss zwar auf einige Dinge achtgeben und z.T. etwas rumtricksen dafür (z.B. in welcher Section automatisch generierter Code liegt - pageable vs. non-pageable), aber i.A. funktioniert es recht gut.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1339266</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1339266</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Sun, 05 Aug 2007 22:39:38 GMT</pubDate></item><item><title><![CDATA[Reply to Xp &#x2F; 2000 Treiber programmieren on Mon, 06 Aug 2007 10:39:50 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>danke erstmal für die vielen Tips.</p>
<p>Also die Treiberprogrammierung ist für mich absolutes Neuland!<br />
Ich denke aber das es nicht so kompliziert ist wie es auf dem ersten<br />
Blick aussieht.</p>
<p>Das DDK habe ich installiert, angeblich soll es da einen Ordner<br />
Scr\ geben in dem sich Examples befinden der Ordner existiert<br />
aber nicht.</p>
<p>Desweiteren gibt es any many Compiler/Linker Bin16,ia64,Win64\x86\...,x86.</p>
<p>Welchen sollte man nehmen.</p>
<p>Kann man nicht auch den Borland Builder zum Compilieren/Linken nehmen<br />
und sich eine DLL erstellen lassen?</p>
<p>Die DDK Hilfe ist nicht wirklich eine Hilfe für Anfänger.</p>
<p>Ich stelle mir vor Testweise einen Treiber für die PIO zu schreiben, mit<br />
dem ich auf die einzelnen Register der PIO zugreifen kann.<br />
War unter MS-Dos in ASM kein grosses Problem.</p>
<p>Ist soetwas überhaupt machbar? und benötige ich dafür einen Treiber.</p>
<blockquote>
<p>Für USB gibt es jetzt den &quot;User-Mode-Treiber&quot;; der ist einem Kernel-Mode-Treiber vorzuziehen, da Du hier keine Signierung (X64) bentötigst und er nicht gleich Dein ganzen Rechner zum Absturz bringt, wenn was schief lief...</p>
</blockquote>
<p>Hört sich gut an, denke aber ich sollte mich zuerst einwenig in die<br />
Grundlagen einarbeiten.</p>
<p>Gibt es da gute Literatur zu dem Thema?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1339444</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1339444</guid><dc:creator><![CDATA[hermes]]></dc:creator><pubDate>Mon, 06 Aug 2007 10:39:50 GMT</pubDate></item><item><title><![CDATA[Reply to Xp &#x2F; 2000 Treiber programmieren on Mon, 06 Aug 2007 12:06:05 GMT]]></title><description><![CDATA[<p>ganz einfache sachen gehen auch ohne kerneltreiber: <a href="http://wookey.org/usermodehardwareportio.html" rel="nofollow">http://wookey.org/usermodehardwareportio.html</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1339507</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1339507</guid><dc:creator><![CDATA[Undertaker]]></dc:creator><pubDate>Mon, 06 Aug 2007 12:06:05 GMT</pubDate></item><item><title><![CDATA[Reply to Xp &#x2F; 2000 Treiber programmieren on Mon, 06 Aug 2007 12:43:29 GMT]]></title><description><![CDATA[<p>Scheint ja eine ganz einfache Sache zu sein.</p>
<p>Hat mein Prozess anschliessend wirklich zugriff auf sämtliche<br />
IO's (Uart,Timer,IRQ/DMA Controller...)</p>
<p>Ich dachte immer unter NT/XP/2000) ist dieses nicht so einfach zu realisieren.</p>
<pre><code class="language-cpp">#define STRICT
#define WIN32_LEAN_AND_MEAN
#include &lt;windows.h&gt;
#include &lt;tchar.h&gt;
//------------------------------------------------------------------
//
//------------------------------------------------------------------
BOOL EnablePrivilege(PTCHAR Privilege)
{
    BOOL rc = FALSE;
    HANDLE hToken;
    LUID luid;
    TOKEN_PRIVILEGES tokenPrivilege;
    //  Open the current process' token.
    rc = OpenProcessToken(GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY,&amp;hToken);
    if (rc)
    {
        rc = LookupPrivilegeValue(NULL, Privilege, &amp;luid);
        if (rc)
        {
            tokenPrivilege.PrivilegeCount = 1;
            tokenPrivilege.Privileges[0].Luid = luid;
            tokenPrivilege.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
            //  Assign the given privilege.
            rc = AdjustTokenPrivileges(hToken,FALSE,&amp;tokenPrivilege,sizeof(tokenPrivilege),NULL,NULL);
        }
    }
    if (hToken)
        CloseHandle(hToken);
    return rc;
}
//------------------------------------------------------------------
//
//------------------------------------------------------------------
BOOL EnableUserModeHardwareIO()
{
    typedef ULONG (__stdcall* pfn_ZwSetInformationProcess)(HANDLE,ULONG,PVOID,ULONG);
    BOOL rc = FALSE;
    HMODULE hNtDll = NULL;
    ULONG IOPL = 3;
    INT ProcessUserModeIOPL = 16;
    pfn_ZwSetInformationProcess ZwSetInformationProcess;
    hNtDll = GetModuleHandle(&quot;ntdll.dll&quot;);
    if (hNtDll)
    {
        ZwSetInformationProcess = (pfn_ZwSetInformationProcess)
		//Proc Addresse aus der DLL			
            GetProcAddress(hNtDll, &quot;ZwSetInformationProcess&quot;);
        if (ZwSetInformationProcess)
        {
            //  Enable SeTcbPrivilege
            rc = EnablePrivilege(SE_TCB_NAME);
            if (rc)
            {
                //  Grant user mode hardware IO access.
                rc = ZwSetInformationProcess(GetCurrentProcess(),ProcessUserModeIOPL,&amp;IOPL,sizeof(IOPL));
                //  An NTSTATUS is returned, so zero is success.
                if (!rc)
                   rc = TRUE;
            }
        }
    }
    return rc;
}
int __cdecl 
//------------------------------------------------------------------
//
//------------------------------------------------------------------
main(int argc,char* argv[])
{
    UNREFERENCED_PARAMETER(argc);   //  To compile cleanly at /W4
    UNREFERENCED_PARAMETER(argv);   //  To compile cleanly at /W4
    if(EnableUserModeHardwareIO())
    {
        //  Hard boot the machine via writing directly to the keyboard
        //  controller...
        __asm mov dx, 0x64
        __asm mov al, 0xFE
        __asm out dx, al
    }
    return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1339549</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1339549</guid><dc:creator><![CDATA[hermes]]></dc:creator><pubDate>Mon, 06 Aug 2007 12:43:29 GMT</pubDate></item><item><title><![CDATA[Reply to Xp &#x2F; 2000 Treiber programmieren on Wed, 08 Aug 2007 10:44:42 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Habe eine Ansatzweise ganz brauchbare Präsentation gefunden.</p>
<p><a href="http://www.ruhr-uni-bochum.de/dv/lehre/seminar/winnt-treiber/sld001.htm" rel="nofollow">http://www.ruhr-uni-bochum.de/dv/lehre/seminar/winnt-treiber/sld001.htm</a></p>
<p>Werde es mal mit dem Beispiel MAPMEM versuchen, wobei mir immer noch nicht klar ist<br />
wie ich das den nun mit dem DDK compilieren und linken soll.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1340675</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1340675</guid><dc:creator><![CDATA[hermes]]></dc:creator><pubDate>Wed, 08 Aug 2007 10:44:42 GMT</pubDate></item></channel></rss>