<?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[Hilfe... SystemErrorCode 997.. Was sagt mir das?]]></title><description><![CDATA[<p>Hey all...</p>
<p>Ich habe hier einen System Error Code 997, allerdings bringt mir dass von MSDN nicht viel</p>
<p>MSDN schrieb:</p>
<blockquote>
<p>ERROR_IO_PENDING |Overlapped I/O operation is in progress.<br />
997<br />
0x3E5</p>
</blockquote>
<p>Was sagt mir das?</p>
<p>Was ich tue: Ich habe ein funktion (das meiste von <a href="http://wookey.org/usermodehardwareportio.html" rel="nofollow">hier</a>) und die soll dem User HardwareIO erlauben, ohne Admin zu sein.</p>
<p>Ich muss ehrlich sagen im kleinsten detial habe ich noch nicht verstanden wass gemacht wird, aber ich kann schon das meiste -schätz ich mla- verstehen.</p>
<p>Nur mit dieser Fehlermeldung kann ich halt echt nichts anfangen... Währ nett wenn mir wer hilft</p>
<p>Mit freundlichen Grüßen</p>
<p>[eidt]</p>
<pre><code>OpenProcessToken: 2
LookupPrivilegeValue: 997
AdjustTokenPrivileges: 1300
</code></pre>
<p>Dass sind die GetErrorCode s direkt nach den Funktionsaufrufen.(vlt hilft euch dass)</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/206819/hilfe-systemerrorcode-997-was-sagt-mir-das</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Apr 2026 01:03:19 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/206819.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 29 Feb 2008 12:50:16 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Hilfe... SystemErrorCode 997.. Was sagt mir das? on Fri, 29 Feb 2008 12:58:35 GMT]]></title><description><![CDATA[<p>Hey all...</p>
<p>Ich habe hier einen System Error Code 997, allerdings bringt mir dass von MSDN nicht viel</p>
<p>MSDN schrieb:</p>
<blockquote>
<p>ERROR_IO_PENDING |Overlapped I/O operation is in progress.<br />
997<br />
0x3E5</p>
</blockquote>
<p>Was sagt mir das?</p>
<p>Was ich tue: Ich habe ein funktion (das meiste von <a href="http://wookey.org/usermodehardwareportio.html" rel="nofollow">hier</a>) und die soll dem User HardwareIO erlauben, ohne Admin zu sein.</p>
<p>Ich muss ehrlich sagen im kleinsten detial habe ich noch nicht verstanden wass gemacht wird, aber ich kann schon das meiste -schätz ich mla- verstehen.</p>
<p>Nur mit dieser Fehlermeldung kann ich halt echt nichts anfangen... Währ nett wenn mir wer hilft</p>
<p>Mit freundlichen Grüßen</p>
<p>[eidt]</p>
<pre><code>OpenProcessToken: 2
LookupPrivilegeValue: 997
AdjustTokenPrivileges: 1300
</code></pre>
<p>Dass sind die GetErrorCode s direkt nach den Funktionsaufrufen.(vlt hilft euch dass)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1465394</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1465394</guid><dc:creator><![CDATA[lippoliv]]></dc:creator><pubDate>Fri, 29 Feb 2008 12:58:35 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe... SystemErrorCode 997.. Was sagt mir das? on Fri, 29 Feb 2008 13:32:35 GMT]]></title><description><![CDATA[<p>lippoliv schrieb:</p>
<blockquote>
<p>Was ich tue: Ich habe ein funktion (das meiste von <a href="http://wookey.org/usermodehardwareportio.html" rel="nofollow">hier</a>) und die soll dem User HardwareIO erlauben, ohne Admin zu sein.</p>
</blockquote>
<p>Um das benutzen zu können musst Du nicht nur Administratorrechte haben, sondern auch noch als teil des OS agieren...</p>
<p>greetz, Swordfish</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1465458</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1465458</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Fri, 29 Feb 2008 13:32:35 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe... SystemErrorCode 997.. Was sagt mir das? on Mon, 03 Mar 2008 12:31:24 GMT]]></title><description><![CDATA[<p>Wenn ich als Admin mein Programm starte, OHNE diesen Trick, gehts... Nur mit diesem Trick gibt es ein Problem.</p>
<p>Wie bekomme ich das behoben? Wie agiere ich als System?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1467232</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1467232</guid><dc:creator><![CDATA[lippoliv]]></dc:creator><pubDate>Mon, 03 Mar 2008 12:31:24 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe... SystemErrorCode 997.. Was sagt mir das? on Mon, 03 Mar 2008 13:59:30 GMT]]></title><description><![CDATA[<p>Sry wegen DP aber ich habe bischen was geändert und schauts euch an:</p>
<pre><code class="language-cpp">#define STRICT
#define WIN32_LEAN_AND_MEAN

#include &lt;stdio.h&gt;
#include &lt;windows.h&gt;
#include &lt;ddk/ntdddisk.h&gt;
#include &lt;tchar.h&gt;

#define DRIVE_HEAD_REG	0xA0

BOOL allowUserForHardwareIO();
BOOL erlaubeZugriffAufHardwareIO( PTCHAR privilege );

int main( void )
{
	int 			ret;
	HANDLE 			storage;
	DRIVERSTATUS 	myDriveState;
	DWORD 			tmp;
	BYTE			getAttributes;
	UCHAR			buff[512];

	SENDCMDINPARAMS		inCommandParam 	= { 0 };
	SENDCMDOUTPARAMS	outCommandParam	= { 0 };

	if( allowUserForHardwareIO() )
	{
		inCommandParam.cBufferSize = 0;//buffer size
		inCommandParam.bDriveNumber = 1;//wird angeblich ignoriert
		inCommandParam.irDriveRegs.bFeaturesReg = ENABLE_SMART;	//was gemacht werden soll
		inCommandParam.irDriveRegs.bSectorCountReg = 1;//IDE SECTOR COUNT
		inCommandParam.irDriveRegs.bSectorNumberReg = 1;//SECTOR NUMBER REGISTER
		inCommandParam.irDriveRegs.bCylLowReg = SMART_CYL_LOW;//low order register
		inCommandParam.irDriveRegs.bCylHighReg = SMART_CYL_HI;//high order register
		inCommandParam.irDriveRegs.bDriveHeadReg = DRIVE_HEAD_REG;//ide drive/head register
		inCommandParam.irDriveRegs.bCommandReg = SMART_CMD;//command register

		storage = 	CreateFile(
						&quot;\\\\.\\PhysicalDrive0&quot;,			//the drive
						GENERIC_READ|GENERIC_WRITE,			//no access to the drive
						FILE_SHARE_READ | FILE_SHARE_WRITE,
						NULL,								//default sec. attributes
						OPEN_EXISTING,						//just try to open the file
						FILE_ATTRIBUTE_SYSTEM,				//file attributes
						NULL								//dont copy file attributes
					);

		if( INVALID_HANDLE_VALUE != storage )
		{
			ret = 	DeviceIoControl( 	//hier ist nocch was falsches in den parametern
						storage,					//handle to device
						SMART_SEND_DRIVE_COMMAND,	//command
						&amp;inCommandParam,			//incommand
						sizeof(inCommandParam),		//sizeof(incommand)
						&amp;outCommandParam,			//outcommand
						sizeof(outCommandParam),	//sizeof(outcommand)
						&amp;tmp,						//buffer
						NULL						//?
					);
			if( ret )	//hat geklappt
			{
				if( 0 == outCommandParam.DriverStatus.bDriverError )
					printf( &quot;No error\n&quot; );
				else
					printf( &quot;Error on HDD\n&quot; );

				inCommandParam.irDriveRegs.bFeaturesReg = SMART_READ_LOG;	//was gemacht werden soll
				outCommandParam.cBufferSize = 512;	//was gemacht werden soll
				//outCommandParam.bBuffer = buff;	//was gemacht werden soll

				ret = 	DeviceIoControl( 	//hier ist nocch was falsches in den parametern
						storage,					//handle to device
						SMART_RCV_DRIVE_DATA,		//command
						&amp;inCommandParam,			//incommand
						sizeof(inCommandParam),		//sizeof(incommand)
						&amp;outCommandParam,			//outcommand
						sizeof(outCommandParam),	//sizeof(outcommand)
						&amp;tmp,						//buffer
						NULL						//?
					);
				if( ret )
					printf( &quot;out:%s&quot;, outCommandParam.bBuffer );
				else
					printf( &quot;Failure SMART_RCV_DRIVE_DATA: %d\n&quot;, GetLastError() );
			}
			else		//hat nicht geklappt
				printf( &quot;Failure DeviceIoControl: %d\n&quot;, GetLastError() );

			CloseHandle( storage );
		}
		else
			printf( &quot;Failure: %d\n&quot;, GetLastError() );
	}
	else
		printf( &quot;Can't get User-Rights... %d\n&quot;, GetLastError() );
	system( &quot;pause&quot; );
	return 0;
}

BOOL allowUserForHardwareIO()
{
	typedef ULONG (__stdcall* pfn_ZwSetInformationProcess)	(	//typen erzeugen, der später auf die adresse einer funktion gelegt wird
										                    HANDLE,
										                    ULONG, 
										                    PVOID, 
										                    ULONG
															);
	BOOL returnValue = FALSE;
	HMODULE modNtDll = NULL;	//modulehandle zu der dll
	ULONG	IOPL = 3;
	int		usrModeIOPL = 16;	//rechte
	pfn_ZwSetInformationProcess myProcInfo;	//ist im spätereen verlauf eine funktion
	modNtDll = GetModuleHandle( &quot;ntdll.dll&quot; ); //dll library anzapfen

	if( modNtDll )
	{
		myProcInfo = (pfn_ZwSetInformationProcess)GetProcAddress( modNtDll, &quot;ZwSetInformationProcess&quot; ); //addresse einer funktion in der dll auslesen
		if( myProcInfo )//wenn erfolgreich
		{
			returnValue = erlaubeZugriffAufHardwareIO( SE_TCB_NAME ); //zugriff für user erlauben

			if( returnValue )
			{
				returnValue = myProcInfo( GetCurrentProcess(), usrModeIOPL, &amp;IOPL, sizeof(IOPL) );
				//if 0 is returned the function is TRUE, so switch the values
				returnValue = !returnValue;
				if( !returnValue )
					printf( &quot;ZwSetInformationProcess: %d\n&quot;, GetLastError() );
			}

		}
	}

	return returnValue;
}

BOOL erlaubeZugriffAufHardwareIO( PTCHAR privilege )
{
	BOOL returnValue;
	HANDLE myHandle;//unbekannt
	LUID luid; //unbekannt
	TOKEN_PRIVILEGES tokenPriv = { 0 };
	returnValue = 	OpenProcessToken(
							GetCurrentProcess(),					//prozess handle
							TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY,	//zugriffsrechte
							&amp;myHandle								//handle zu den neuen zugriffsrechten
					);
	if( !returnValue )
		printf( &quot;OpenProcessToken: %d\n&quot;, GetLastError() );

	if( returnValue )
	{
		returnValue = 	LookupPrivilegeValue(
										NULL,		//null-terminierter string der den namen des systems festlegt, bei dem die previlege ausgeschaut werden sollen
										privilege,	//name des previleges
										&amp;luid		//die LUID bei der diese Previlegien bekannt sind
						);
		if( !returnValue )
			printf( &quot;LookupPrivilegeValue: %d\n&quot;, GetLastError() );

		if( returnValue )
		{
			tokenPriv.PrivilegeCount = 1; //ein privileg enthalten
			tokenPriv.Privileges[0].Luid = luid; //ein privileg enthalten
			tokenPriv.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; //ein privileg enthalten

			//privilege speichern
			returnValue = 	AdjustTokenPrivileges(
								myHandle,			//handle mit den in openprocesstoken erhaschten rechten
								FALSE,				//deaktivieren aller previlegien für diesen bereich
								&amp;tokenPriv,			//neue privilegien
								sizeof(tokenPriv),	//bufferlänge
								NULL,				//den alten previlegienstand speichern
								NULL				//erhaltene bufferlänge 
							);
			if( !returnValue )
				printf( &quot;AdjustTokenPrivileges: %d\n&quot;, GetLastError() );
		}
	}

	return returnValue;
}
</code></pre>
<p>Da kommt nur am ende &quot;Can't get user rights... 1300&quot; und davor noch &quot;ZwSet...&quot;<br />
keine andere Meldung... das Bedeutet das nur ZwSetInformationProcess einen Fehler hat, da diese Funktion ja irgendwie ein problem hat.</p>
<p>Könnt ihr mir da helfen?</p>
<p>Wenni ch einfach</p>
<pre><code class="language-cpp">returnValue = !returnValue;
</code></pre>
<p>ausskommentiere, dann bekommi ch wieder fehler 5, keine Zugriffsrechte...</p>
<p>[edit]was ich nichtmache: dieser reboot, da weiß ich nicht was das ist...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1467302</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1467302</guid><dc:creator><![CDATA[lippoliv]]></dc:creator><pubDate>Mon, 03 Mar 2008 13:59:30 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe... SystemErrorCode 997.. Was sagt mir das? on Mon, 03 Mar 2008 14:24:46 GMT]]></title><description><![CDATA[<p>lippoliv schrieb:</p>
<blockquote>
<p>was ich nichtmache: dieser reboot, da weiß ich nicht was das ist...</p>
</blockquote>
<p><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>
<p>Warum muss ich's nochmal sagen? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/27a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--right_arrow"
      title=":arrow_right:"
      alt="➡"
    /> <a href="http://technet2.microsoft.com/windowsserver/en/library/ec4fd2bf-8f91-4122-8968-2213f96a95dc1033.mspx?mfr=true" rel="nofollow">Act as Part of the Operating System</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1467338</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1467338</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Mon, 03 Mar 2008 14:24:46 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe... SystemErrorCode 997.. Was sagt mir das? on Mon, 03 Mar 2008 14:32:28 GMT]]></title><description><![CDATA[<p>Du willst mir nicht ernsthaft sagen, das ich MANUELL einstellen muss, das der User das machen darf!?</p>
<p>Eigentlich &quot;Act&quot; ich als Systemprozess und Zwar über:</p>
<pre><code class="language-cpp">returnValue = erlaubeZugriffAufHardwareIO( SE_TCB_NAME ); //zugriff für user erlauben
</code></pre>
<p>MSDN schrieb:</p>
<blockquote>
<p>SE_TCB_NAME<br />
This privilege identifies its holder as part of the trusted computer base. Some trusted protected subsystems are granted this privilege.</p>
<p>User Right: Act as part of the operating system.</p>
</blockquote>
<p>Wenn ich das jetzt nicht falsch verstehe, bin ich somit &quot;vertrauenswürdig&quot;...</p>
<p>Oder veraff ich da jetzt was?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1467343</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1467343</guid><dc:creator><![CDATA[lippoliv]]></dc:creator><pubDate>Mon, 03 Mar 2008 14:32:28 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe... SystemErrorCode 997.. Was sagt mir das? on Mon, 03 Mar 2008 14:43:40 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-14811.html" rel="nofollow">Tim</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-10.html" rel="nofollow">ANSI C</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/1467351</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1467351</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Mon, 03 Mar 2008 14:43:40 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe... SystemErrorCode 997.. Was sagt mir das? on Mon, 03 Mar 2008 15:50:48 GMT]]></title><description><![CDATA[<p>lippoliv schrieb:</p>
<blockquote>
<p>Da kommt nur am ende &quot;Can't get user rights... 1300&quot; und davor noch &quot;ZwSet...&quot;<br />
keine andere Meldung... das Bedeutet das nur ZwSetInformationProcess einen Fehler hat, da diese Funktion ja irgendwie ein problem hat.</p>
</blockquote>
<p>lippoliv schrieb:</p>
<blockquote>
<p>Du willst mir nicht ernsthaft sagen, das ich MANUELL einstellen muss, das der User das machen darf!?</p>
</blockquote>
<p>Fällt dir was auf!?</p>
<p>greetz, Swordfish</p>
<p>PS: Nein, ich sag's nur aus Langeweile und unermesslicher freude am Tippen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1467413</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1467413</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Mon, 03 Mar 2008 15:50:48 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe... SystemErrorCode 997.. Was sagt mir das? on Tue, 04 Mar 2008 13:05:48 GMT]]></title><description><![CDATA[<p>&quot;Fehler 1300: Not all privileges or groups referenced are assigned to the caller.&quot;</p>
<p>Das mit 997 (Overlapped I/O operation is in progress.) scheint ihn nicht zu kratzen, da die Funktion TRUE ( erfolgreich ) zurückgibt.</p>
<p>Die Meldung &quot;Can't get user rights... %d&quot; habe ich selber geschrieben (schätze mal dass ist dir bewusst)</p>
<p>Wenn ich nun manuell einstellen muss, das der Benutzer Hardware I/O betreiben darf warum schreibe ich dann diese nette Funktion, die es mir erlauben soll?</p>
<p>Oder soll ich dem Benutzer erlauben dass Programme sich den Zugriff auf irgendwas erlauben dürfen!?</p>
<p>Kann mir jemand die Pfadangabe &quot;Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\&quot; in der Deutschen version schreiben... Finde den pfad nicht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>MFG und danke bis jetzt...</p>
<p>[eidt]<br />
Habe Lokale Sicherheitsrichtlinien gefunden, und habe auf mich das Recht für &quot;Einsetzen als Teil vom Betriebssystem&quot; eingetragen... Immer noch 1300<br />
Auch mit &quot;Ersetzen eines Tokens auf Prozessebene&quot; geht es nicht.<br />
Auch beides in Kombination zeigt die 1300 an... *help*</p>
<p>[doubledit]Auch als ADMIN bekommm ich diese meldung, und es geht nicht... Der müsste das doch können oder?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1467945</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1467945</guid><dc:creator><![CDATA[lippoliv]]></dc:creator><pubDate>Tue, 04 Mar 2008 13:05:48 GMT</pubDate></item></channel></rss>