<?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[error: nicht aufgelöstes Token]]></title><description><![CDATA[<p>Hi<br />
Ich steige von <a href="http://vb.net" rel="nofollow">vb.net</a> auf c++ um.<br />
Habe ein Programm in c++ (Konsolenanwendung) geschrieben und wollte es jetzt<br />
mit Windows Fensterchen zur besseren Bedienbarkeit erweitern. Weil ich das aber<br />
nicht geschafft habe, erstellte ich ein neues Windows Form Projekt und wollte das<br />
Programm so neu schreiben (Copy&amp;Paste). Es funktioniert schon mal recht gut,<br />
bis ich diesen Codeblock übernommen habe:</p>
<pre><code class="language-cpp">//Erhalte debug Privilegien
int AddDebugPrivileges()
{
	HANDLE hToken;
	TOKEN_PRIVILEGES tp;

	OpenProcessToken(GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES, &amp;hToken);

	if( !LookupPrivilegeValueA( NULL, &quot;SeDebugPrivilege&quot;, &amp;tp.Privileges[0].Luid ) )
	{
		CloseHandle(hToken);
		return 1;
	}

	tp.PrivilegeCount = 1;
	tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;

	if( !AdjustTokenPrivileges( hToken, FALSE, &amp;tp, 0, (PTOKEN_PRIVILEGES)NULL, 0) )
	{
		CloseHandle(hToken);
		return 1;
	}

	CloseHandle(hToken);
	return 0;
}
</code></pre>
<p>Folgende Errors werden ausgegeben:</p>
<blockquote>
<p>1&gt;------ Erstellen gestartet: Projekt: SPHINX, Konfiguration: Debug Win32 ------<br />
1&gt;Kompilieren...<br />
1&gt;SPHINX.cpp<br />
1&gt;Verknüpfen...<br />
1&gt;SPHINX.obj : error LNK2028: Nicht aufgelöstes Token (0A00000B) &quot;&quot;extern &quot;C&quot; int __stdcall AdjustTokenPrivileges(void *,int,struct _TOKEN_PRIVILEGES *,unsigned long,struct _TOKEN_PRIVILEGES *,unsigned long *)&quot; (?AdjustTokenPrivileges@@$$J224YGHPAXHPAU_TOKEN_PRIVILEGES@@K1PAK@Z)&quot;, auf das in Funktion &quot;&quot;int __clrcall AddDebugPrivileges(void)&quot; (?AddDebugPrivileges@@$$FYMHXZ)&quot; verwiesen wird.<br />
1&gt;SPHINX.obj : error LNK2028: Nicht aufgelöstes Token (0A00000D) &quot;&quot;extern &quot;C&quot; int __stdcall LookupPrivilegeValueA(char const *,char const *,struct _LUID *)&quot; (?LookupPrivilegeValueA@@$$J212YGHPBD0PAU_LUID@@@Z)&quot;, auf das in Funktion &quot;&quot;int __clrcall AddDebugPrivileges(void)&quot; (?AddDebugPrivileges@@$$FYMHXZ)&quot; verwiesen wird.<br />
1&gt;SPHINX.obj : error LNK2028: Nicht aufgelöstes Token (0A00000F) &quot;&quot;extern &quot;C&quot; int __stdcall OpenProcessToken(void *,unsigned long,void * *)&quot; (?OpenProcessToken@@$$J212YGHPAXKPAPAX@Z)&quot;, auf das in Funktion &quot;&quot;int __clrcall AddDebugPrivileges(void)&quot; (?AddDebugPrivileges@@$$FYMHXZ)&quot; verwiesen wird.<br />
1&gt;SPHINX.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol &quot;&quot;extern &quot;C&quot; int __stdcall AdjustTokenPrivileges(void *,int,struct _TOKEN_PRIVILEGES *,unsigned long,struct _TOKEN_PRIVILEGES *,unsigned long *)&quot; (?AdjustTokenPrivileges@@$$J224YGHPAXHPAU_TOKEN_PRIVILEGES@@K1PAK@Z)&quot; in Funktion &quot;&quot;int __clrcall AddDebugPrivileges(void)&quot; (?AddDebugPrivileges@@$$FYMHXZ)&quot;.<br />
1&gt;SPHINX.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol &quot;&quot;extern &quot;C&quot; int __stdcall LookupPrivilegeValueA(char const *,char const *,struct _LUID *)&quot; (?LookupPrivilegeValueA@@$$J212YGHPBD0PAU_LUID@@@Z)&quot; in Funktion &quot;&quot;int __clrcall AddDebugPrivileges(void)&quot; (?AddDebugPrivileges@@$$FYMHXZ)&quot;.<br />
1&gt;SPHINX.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol &quot;&quot;extern &quot;C&quot; int __stdcall OpenProcessToken(void *,unsigned long,void * *)&quot; (?OpenProcessToken@@$$J212YGHPAXKPAPAX@Z)&quot; in Funktion &quot;&quot;int __clrcall AddDebugPrivileges(void)&quot; (?AddDebugPrivileges@@$$FYMHXZ)&quot;.<br />
1&gt;C:\Users\<em><strong><strong>\Documents\Visual Studio 2008\Projects\SPHINX\Debug\SPHINX.exe : fatal error LNK1120: 6 nicht aufgelöste externe Verweise.<br />
1&gt;Das Buildprotokoll wurde unter &quot;file://c:\Users\</strong></strong></em>\Documents\Visual Studio 2008\Projects\SPHINX\SPHINX\Debug\BuildLog.htm&quot; gespeichert.<br />
1&gt;SPHINX - 7 Fehler, 0 Warnung(en)<br />
========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ==========</p>
</blockquote>
<p>Ich versteh das nicht, weil es läuft ja im anderen Konsolenprogramm. Die Funktion wird noch nicht mal aufgerufen!<br />
Und genau dieser Block verursacht die Fehler.<br />
Habe auch die gleichen .h's (stand-art .h und windows.h) inkludiert.</p>
<p>Hach, in <a href="http://vb.net" rel="nofollow">vb.net</a> war das Leben noch einfach ^^</p>
<p>In c++ hab ich öfters solche Probleme, dass der Compiler komische Fehlermeldungen<br />
ausgibt.<br />
Benutze übrigens Visual C++ Express Edition 2008 mit SP1.</p>
<p>Hoffentlich kann mir jemand helfen.<br />
mfg<br />
vampir26</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/233456/error-nicht-aufgelöstes-token</link><generator>RSS for Node</generator><lastBuildDate>Thu, 24 Sep 2026 20:37:48 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/233456.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 04 Feb 2009 21:13:16 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to error: nicht aufgelöstes Token on Wed, 04 Feb 2009 21:13:16 GMT]]></title><description><![CDATA[<p>Hi<br />
Ich steige von <a href="http://vb.net" rel="nofollow">vb.net</a> auf c++ um.<br />
Habe ein Programm in c++ (Konsolenanwendung) geschrieben und wollte es jetzt<br />
mit Windows Fensterchen zur besseren Bedienbarkeit erweitern. Weil ich das aber<br />
nicht geschafft habe, erstellte ich ein neues Windows Form Projekt und wollte das<br />
Programm so neu schreiben (Copy&amp;Paste). Es funktioniert schon mal recht gut,<br />
bis ich diesen Codeblock übernommen habe:</p>
<pre><code class="language-cpp">//Erhalte debug Privilegien
int AddDebugPrivileges()
{
	HANDLE hToken;
	TOKEN_PRIVILEGES tp;

	OpenProcessToken(GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES, &amp;hToken);

	if( !LookupPrivilegeValueA( NULL, &quot;SeDebugPrivilege&quot;, &amp;tp.Privileges[0].Luid ) )
	{
		CloseHandle(hToken);
		return 1;
	}

	tp.PrivilegeCount = 1;
	tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;

	if( !AdjustTokenPrivileges( hToken, FALSE, &amp;tp, 0, (PTOKEN_PRIVILEGES)NULL, 0) )
	{
		CloseHandle(hToken);
		return 1;
	}

	CloseHandle(hToken);
	return 0;
}
</code></pre>
<p>Folgende Errors werden ausgegeben:</p>
<blockquote>
<p>1&gt;------ Erstellen gestartet: Projekt: SPHINX, Konfiguration: Debug Win32 ------<br />
1&gt;Kompilieren...<br />
1&gt;SPHINX.cpp<br />
1&gt;Verknüpfen...<br />
1&gt;SPHINX.obj : error LNK2028: Nicht aufgelöstes Token (0A00000B) &quot;&quot;extern &quot;C&quot; int __stdcall AdjustTokenPrivileges(void *,int,struct _TOKEN_PRIVILEGES *,unsigned long,struct _TOKEN_PRIVILEGES *,unsigned long *)&quot; (?AdjustTokenPrivileges@@$$J224YGHPAXHPAU_TOKEN_PRIVILEGES@@K1PAK@Z)&quot;, auf das in Funktion &quot;&quot;int __clrcall AddDebugPrivileges(void)&quot; (?AddDebugPrivileges@@$$FYMHXZ)&quot; verwiesen wird.<br />
1&gt;SPHINX.obj : error LNK2028: Nicht aufgelöstes Token (0A00000D) &quot;&quot;extern &quot;C&quot; int __stdcall LookupPrivilegeValueA(char const *,char const *,struct _LUID *)&quot; (?LookupPrivilegeValueA@@$$J212YGHPBD0PAU_LUID@@@Z)&quot;, auf das in Funktion &quot;&quot;int __clrcall AddDebugPrivileges(void)&quot; (?AddDebugPrivileges@@$$FYMHXZ)&quot; verwiesen wird.<br />
1&gt;SPHINX.obj : error LNK2028: Nicht aufgelöstes Token (0A00000F) &quot;&quot;extern &quot;C&quot; int __stdcall OpenProcessToken(void *,unsigned long,void * *)&quot; (?OpenProcessToken@@$$J212YGHPAXKPAPAX@Z)&quot;, auf das in Funktion &quot;&quot;int __clrcall AddDebugPrivileges(void)&quot; (?AddDebugPrivileges@@$$FYMHXZ)&quot; verwiesen wird.<br />
1&gt;SPHINX.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol &quot;&quot;extern &quot;C&quot; int __stdcall AdjustTokenPrivileges(void *,int,struct _TOKEN_PRIVILEGES *,unsigned long,struct _TOKEN_PRIVILEGES *,unsigned long *)&quot; (?AdjustTokenPrivileges@@$$J224YGHPAXHPAU_TOKEN_PRIVILEGES@@K1PAK@Z)&quot; in Funktion &quot;&quot;int __clrcall AddDebugPrivileges(void)&quot; (?AddDebugPrivileges@@$$FYMHXZ)&quot;.<br />
1&gt;SPHINX.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol &quot;&quot;extern &quot;C&quot; int __stdcall LookupPrivilegeValueA(char const *,char const *,struct _LUID *)&quot; (?LookupPrivilegeValueA@@$$J212YGHPBD0PAU_LUID@@@Z)&quot; in Funktion &quot;&quot;int __clrcall AddDebugPrivileges(void)&quot; (?AddDebugPrivileges@@$$FYMHXZ)&quot;.<br />
1&gt;SPHINX.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol &quot;&quot;extern &quot;C&quot; int __stdcall OpenProcessToken(void *,unsigned long,void * *)&quot; (?OpenProcessToken@@$$J212YGHPAXKPAPAX@Z)&quot; in Funktion &quot;&quot;int __clrcall AddDebugPrivileges(void)&quot; (?AddDebugPrivileges@@$$FYMHXZ)&quot;.<br />
1&gt;C:\Users\<em><strong><strong>\Documents\Visual Studio 2008\Projects\SPHINX\Debug\SPHINX.exe : fatal error LNK1120: 6 nicht aufgelöste externe Verweise.<br />
1&gt;Das Buildprotokoll wurde unter &quot;file://c:\Users\</strong></strong></em>\Documents\Visual Studio 2008\Projects\SPHINX\SPHINX\Debug\BuildLog.htm&quot; gespeichert.<br />
1&gt;SPHINX - 7 Fehler, 0 Warnung(en)<br />
========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ==========</p>
</blockquote>
<p>Ich versteh das nicht, weil es läuft ja im anderen Konsolenprogramm. Die Funktion wird noch nicht mal aufgerufen!<br />
Und genau dieser Block verursacht die Fehler.<br />
Habe auch die gleichen .h's (stand-art .h und windows.h) inkludiert.</p>
<p>Hach, in <a href="http://vb.net" rel="nofollow">vb.net</a> war das Leben noch einfach ^^</p>
<p>In c++ hab ich öfters solche Probleme, dass der Compiler komische Fehlermeldungen<br />
ausgibt.<br />
Benutze übrigens Visual C++ Express Edition 2008 mit SP1.</p>
<p>Hoffentlich kann mir jemand helfen.<br />
mfg<br />
vampir26</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1658164</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1658164</guid><dc:creator><![CDATA[vampir26]]></dc:creator><pubDate>Wed, 04 Feb 2009 21:13:16 GMT</pubDate></item><item><title><![CDATA[Reply to error: nicht aufgelöstes Token on Thu, 05 Feb 2009 06:39:51 GMT]]></title><description><![CDATA[<p>Es sind ja alles Linkerfehler, und er kann mehrere Variablen von dir nicht auflösen.<br />
Du solltest nochmal die korrekte Einbindung aller Header Dateien überprüfen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1658248</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1658248</guid><dc:creator><![CDATA[oneill5000]]></dc:creator><pubDate>Thu, 05 Feb 2009 06:39:51 GMT</pubDate></item><item><title><![CDATA[Reply to error: nicht aufgelöstes Token on Thu, 05 Feb 2009 06:56:35 GMT]]></title><description><![CDATA[<p>Header scheinen alle da zu sein, sonst würde er beim Übersetzen ja schon meckern, dass er die Funktionen nicht kennt.</p>
<p>Dem Linker fehlt die Bibliothek, in der AdjustTokenPrivileges usw. enthalten sind. Die musst Du in den Projekteinstellungen angeben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1658255</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1658255</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Thu, 05 Feb 2009 06:56:35 GMT</pubDate></item><item><title><![CDATA[Reply to error: nicht aufgelöstes Token on Thu, 05 Feb 2009 06:59:55 GMT]]></title><description><![CDATA[<p>Hört sich sinnvoll an <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1658260</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1658260</guid><dc:creator><![CDATA[oneill5000]]></dc:creator><pubDate>Thu, 05 Feb 2009 06:59:55 GMT</pubDate></item><item><title><![CDATA[Reply to error: nicht aufgelöstes Token on Fri, 06 Feb 2009 17:14:31 GMT]]></title><description><![CDATA[<p>Danke für die Antworten. Ich denke wir sind auf der richtigen Spur <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f576.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--sunglasses"
      title=":sunglasses:"
      alt="🕶"
    /></p>
<p>Hab herausgefunden dass die Funktion in der Advapi32.lib zu finden sein müsste.<br />
Das komische ist ja, dass die Verweise und Inkludierungen in beiden Projekten (glaub ich) identisch sind.</p>
<p>Aber ich finde die Advapi32.lib nicht. Muss ich die erst downloaden?<br />
Advapi32.dll kann ich nicht hinzufügen, dann heisste es &quot;konnte nicht hinzugefügt werden, da keine .NET-Assembly oder ActiveX-Steuerelement&quot;.<br />
Aber wenn ich die lib erst downloaden muss, warum funktionierts dann im Konsolenprogramm?</p>
<p>Was sagt ihr dazu? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1659181</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1659181</guid><dc:creator><![CDATA[vampir26]]></dc:creator><pubDate>Fri, 06 Feb 2009 17:14:31 GMT</pubDate></item><item><title><![CDATA[Reply to error: nicht aufgelöstes Token on Fri, 06 Feb 2009 18:44:10 GMT]]></title><description><![CDATA[<p>Wahrscheinlich haperts an gewissen Includepaths..</p>
<p>Schau mal in Projekt-&gt;Projekteigenschaften-&gt;Konfigurationseigenschaften-&gt;C/C++-&gt;Allgemein-&gt; Zusätzliche Includeverzeichnisse<br />
und vergleich das.</p>
<p>und:<br />
Extras -&gt; Optionen -&gt; Projekte und Projektmappen -&gt; Verzeichnisse anzeigen für:<br />
und dann da bei den Bibliotheken vergleichen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1659233</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1659233</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Fri, 06 Feb 2009 18:44:10 GMT</pubDate></item></channel></rss>