<?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[CreateFile und Administratorrechte]]></title><description><![CDATA[<p>Hallo Forum.</p>
<p>Wenn ich mit</p>
<pre><code>CreateFile( DevicePath, GENERIC_READ | GENERIC_WRITE, 0, NULL,                       OPEN_EXISTING,0,NULL);
</code></pre>
<p>ein Handle auf ein Device öffnen möchte, so klappt das mit Windows-Administratorrechten wunderbar. Als eingeschränkter Benutzer bekomme ich aber INVALID_HANDLE_VALUE als Rückgabewert. Was kann man tun, damit der Code auch als Nicht-Administrator läuft?</p>
<p>DANKE!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/135494/createfile-und-administratorrechte</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Jul 2026 03:43:19 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/135494.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 02 Feb 2006 15:19:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CreateFile und Administratorrechte on Thu, 02 Feb 2006 15:19:23 GMT]]></title><description><![CDATA[<p>Hallo Forum.</p>
<p>Wenn ich mit</p>
<pre><code>CreateFile( DevicePath, GENERIC_READ | GENERIC_WRITE, 0, NULL,                       OPEN_EXISTING,0,NULL);
</code></pre>
<p>ein Handle auf ein Device öffnen möchte, so klappt das mit Windows-Administratorrechten wunderbar. Als eingeschränkter Benutzer bekomme ich aber INVALID_HANDLE_VALUE als Rückgabewert. Was kann man tun, damit der Code auch als Nicht-Administrator läuft?</p>
<p>DANKE!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/984074</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/984074</guid><dc:creator><![CDATA[atlastraeger]]></dc:creator><pubDate>Thu, 02 Feb 2006 15:19:23 GMT</pubDate></item><item><title><![CDATA[Reply to CreateFile und Administratorrechte on Thu, 02 Feb 2006 15:22:05 GMT]]></title><description><![CDATA[<p>Kannst du denn die Datei mit Notepad öffnen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/984079</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/984079</guid><dc:creator><![CDATA[hmmmmmmmm]]></dc:creator><pubDate>Thu, 02 Feb 2006 15:22:05 GMT</pubDate></item><item><title><![CDATA[Reply to CreateFile und Administratorrechte on Thu, 02 Feb 2006 16:58:11 GMT]]></title><description><![CDATA[<p>Wüsste nicht wie man Windowsberechtigungen umgehen könnte...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/984208</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/984208</guid><dc:creator><![CDATA[Mindphreaker]]></dc:creator><pubDate>Thu, 02 Feb 2006 16:58:11 GMT</pubDate></item><item><title><![CDATA[Reply to CreateFile und Administratorrechte on Thu, 02 Feb 2006 17:24:29 GMT]]></title><description><![CDATA[<p>Wenn Du keine Berechtigung hast die Datei zu öffnen, dann kannst Du das halt nicht... Sag doch mal was GetLastError sagt...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/984234</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/984234</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Thu, 02 Feb 2006 17:24:29 GMT</pubDate></item><item><title><![CDATA[Reply to CreateFile und Administratorrechte on Thu, 02 Feb 2006 18:07:54 GMT]]></title><description><![CDATA[<p>er will nen treiber benutzen, keine datei öffnen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/984276</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/984276</guid><dc:creator><![CDATA[device]]></dc:creator><pubDate>Thu, 02 Feb 2006 18:07:54 GMT</pubDate></item><item><title><![CDATA[Reply to CreateFile und Administratorrechte on Fri, 03 Feb 2006 06:20:40 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/32470">@device</a>: Genau richtig, ich möchte einen Treiber benutzen, ich öffne also etwas in der Art:</p>
<blockquote>
<p>DevicePath = &quot;\?\pci#ven_10ee...&quot;</p>
</blockquote>
<p>Als Rückgabewert von CreateFile erhalte ich dann INVALID_HANDLE_VALUE.</p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/5675">@Jochen</a> Kalmbach: GetLastError() liefert mir Code 5 zurück.</p>
<p>Mir ist schon klar, dass man eine Datei, für die man keine Berechtigung hat, nicht öffnen kann, aber (a) gibt es vielleicht eine Alternative (?) und (b) braucht man doch &quot;normalerweise&quot; keine besonderen Rechte, um Treiber zu benutzen, oder?</p>
<p>Vielen Dank auf jeden Fall für alle Beiträge.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/984673</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/984673</guid><dc:creator><![CDATA[atlastraeger]]></dc:creator><pubDate>Fri, 03 Feb 2006 06:20:40 GMT</pubDate></item><item><title><![CDATA[Reply to CreateFile und Administratorrechte on Fri, 03 Feb 2006 06:39:55 GMT]]></title><description><![CDATA[<p>Für Devices braucht man natürlich auch die passenden Berechtigungen. Und AFAIK dürfen nur Administratoren direkt darafu zugreifen.<br />
Du kannst Dir die Berechtigungen mit dem folgenden Tools anschauen:<br />
<a href="http://www.sysinternals.com/Utilities/WinObj.html" rel="nofollow">http://www.sysinternals.com/Utilities/WinObj.html</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/984680</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/984680</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Fri, 03 Feb 2006 06:39:55 GMT</pubDate></item><item><title><![CDATA[Reply to CreateFile und Administratorrechte on Fri, 03 Feb 2006 08:12:37 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/5675">@Jochen</a> Kalmbach: Vielen Dank für das Tool. Bleibt noch die Frage: kann man denn - ähnlich wie bei einer Datei - die Sicherheitseinstellungen so verändern, dass auch ein normaler Benutzer darauf zugreifen kann?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/984726</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/984726</guid><dc:creator><![CDATA[atlastraeger]]></dc:creator><pubDate>Fri, 03 Feb 2006 08:12:37 GMT</pubDate></item><item><title><![CDATA[Reply to CreateFile und Administratorrechte on Fri, 03 Feb 2006 08:22:29 GMT]]></title><description><![CDATA[<p>Wenn Du Dir das Tool angeschaut hättest, dann wüsstest Du das <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/984734</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/984734</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Fri, 03 Feb 2006 08:22:29 GMT</pubDate></item><item><title><![CDATA[Reply to CreateFile und Administratorrechte on Fri, 03 Feb 2006 09:01:12 GMT]]></title><description><![CDATA[<p>Okay, jetzt hab ich's auch angeschaut <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="🙂"
    /> Super-Tool, jetzt funktioniert's - ich bedanke mich vielmals !!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/984767</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/984767</guid><dc:creator><![CDATA[atlastraeger]]></dc:creator><pubDate>Fri, 03 Feb 2006 09:01:12 GMT</pubDate></item></channel></rss>