Folgende Warnungen sind aufgetreten:
Warning [2] preg_match_all(): The /e modifier is no longer supported, use preg_replace_callback instead - Line: 1007 - File: inc/highlighter.php PHP 7.4.33 (Linux)
File Line Function
[PHP]   errorHandler->error
/inc/highlighter.php 1007 preg_match_all
/inc/highlighter.php 353 generic_highlight
/inc/plugins/coolcode.php 133 php_highlight
/inc/plugins/coolcode.php 61 coolcode_run
/inc/class_plugins.php 139 coolcode_end
/inc/class_parser.php 232 pluginSystem->run_hooks
/printthread.php 184 postParser->parse_message
Warning [2] Invalid argument supplied for foreach() - Line: 1008 - File: inc/highlighter.php PHP 7.4.33 (Linux)
File Line Function
/inc/highlighter.php 1008 errorHandler->error
/inc/highlighter.php 353 generic_highlight
/inc/plugins/coolcode.php 133 php_highlight
/inc/plugins/coolcode.php 61 coolcode_run
/inc/class_plugins.php 139 coolcode_end
/inc/class_parser.php 232 pluginSystem->run_hooks
/printthread.php 184 postParser->parse_message
Warning [2] preg_match_all(): The /e modifier is no longer supported, use preg_replace_callback instead - Line: 1007 - File: inc/highlighter.php PHP 7.4.33 (Linux)
File Line Function
[PHP]   errorHandler->error
/inc/highlighter.php 1007 preg_match_all
/inc/highlighter.php 353 generic_highlight
/inc/plugins/coolcode.php 133 php_highlight
/inc/plugins/coolcode.php 61 coolcode_run
/inc/class_plugins.php 139 coolcode_end
/inc/class_parser.php 232 pluginSystem->run_hooks
/printthread.php 184 postParser->parse_message
Warning [2] Invalid argument supplied for foreach() - Line: 1008 - File: inc/highlighter.php PHP 7.4.33 (Linux)
File Line Function
/inc/highlighter.php 1008 errorHandler->error
/inc/highlighter.php 353 generic_highlight
/inc/plugins/coolcode.php 133 php_highlight
/inc/plugins/coolcode.php 61 coolcode_run
/inc/class_plugins.php 139 coolcode_end
/inc/class_parser.php 232 pluginSystem->run_hooks
/printthread.php 184 postParser->parse_message
Warning [2] preg_match_all(): The /e modifier is no longer supported, use preg_replace_callback instead - Line: 1007 - File: inc/highlighter.php PHP 7.4.33 (Linux)
File Line Function
[PHP]   errorHandler->error
/inc/highlighter.php 1007 preg_match_all
/inc/highlighter.php 353 generic_highlight
/inc/plugins/coolcode.php 133 php_highlight
/inc/plugins/coolcode.php 61 coolcode_run
/inc/class_plugins.php 139 coolcode_end
/inc/class_parser.php 232 pluginSystem->run_hooks
/printthread.php 184 postParser->parse_message
Warning [2] Invalid argument supplied for foreach() - Line: 1008 - File: inc/highlighter.php PHP 7.4.33 (Linux)
File Line Function
/inc/highlighter.php 1008 errorHandler->error
/inc/highlighter.php 353 generic_highlight
/inc/plugins/coolcode.php 133 php_highlight
/inc/plugins/coolcode.php 61 coolcode_run
/inc/class_plugins.php 139 coolcode_end
/inc/class_parser.php 232 pluginSystem->run_hooks
/printthread.php 184 postParser->parse_message
Warning [2] preg_match_all(): The /e modifier is no longer supported, use preg_replace_callback instead - Line: 1007 - File: inc/highlighter.php PHP 7.4.33 (Linux)
File Line Function
[PHP]   errorHandler->error
/inc/highlighter.php 1007 preg_match_all
/inc/highlighter.php 353 generic_highlight
/inc/plugins/coolcode.php 133 php_highlight
/inc/plugins/coolcode.php 61 coolcode_run
/inc/class_plugins.php 139 coolcode_end
/inc/class_parser.php 232 pluginSystem->run_hooks
/printthread.php 184 postParser->parse_message
Warning [2] Invalid argument supplied for foreach() - Line: 1008 - File: inc/highlighter.php PHP 7.4.33 (Linux)
File Line Function
/inc/highlighter.php 1008 errorHandler->error
/inc/highlighter.php 353 generic_highlight
/inc/plugins/coolcode.php 133 php_highlight
/inc/plugins/coolcode.php 61 coolcode_run
/inc/class_plugins.php 139 coolcode_end
/inc/class_parser.php 232 pluginSystem->run_hooks
/printthread.php 184 postParser->parse_message
Warning [2] preg_match_all(): The /e modifier is no longer supported, use preg_replace_callback instead - Line: 1007 - File: inc/highlighter.php PHP 7.4.33 (Linux)
File Line Function
[PHP]   errorHandler->error
/inc/highlighter.php 1007 preg_match_all
/inc/highlighter.php 353 generic_highlight
/inc/plugins/coolcode.php 133 php_highlight
/inc/plugins/coolcode.php 61 coolcode_run
/inc/class_plugins.php 139 coolcode_end
/inc/class_parser.php 232 pluginSystem->run_hooks
/printthread.php 184 postParser->parse_message
Warning [2] Invalid argument supplied for foreach() - Line: 1008 - File: inc/highlighter.php PHP 7.4.33 (Linux)
File Line Function
/inc/highlighter.php 1008 errorHandler->error
/inc/highlighter.php 353 generic_highlight
/inc/plugins/coolcode.php 133 php_highlight
/inc/plugins/coolcode.php 61 coolcode_run
/inc/class_plugins.php 139 coolcode_end
/inc/class_parser.php 232 pluginSystem->run_hooks
/printthread.php 184 postParser->parse_message
Warning [2] preg_match_all(): The /e modifier is no longer supported, use preg_replace_callback instead - Line: 1007 - File: inc/highlighter.php PHP 7.4.33 (Linux)
File Line Function
[PHP]   errorHandler->error
/inc/highlighter.php 1007 preg_match_all
/inc/highlighter.php 353 generic_highlight
/inc/plugins/coolcode.php 133 php_highlight
/inc/plugins/coolcode.php 61 coolcode_run
/inc/class_plugins.php 139 coolcode_end
/inc/class_parser.php 232 pluginSystem->run_hooks
/printthread.php 184 postParser->parse_message
Warning [2] Invalid argument supplied for foreach() - Line: 1008 - File: inc/highlighter.php PHP 7.4.33 (Linux)
File Line Function
/inc/highlighter.php 1008 errorHandler->error
/inc/highlighter.php 353 generic_highlight
/inc/plugins/coolcode.php 133 php_highlight
/inc/plugins/coolcode.php 61 coolcode_run
/inc/class_plugins.php 139 coolcode_end
/inc/class_parser.php 232 pluginSystem->run_hooks
/printthread.php 184 postParser->parse_message
Warning [2] preg_match_all(): The /e modifier is no longer supported, use preg_replace_callback instead - Line: 1007 - File: inc/highlighter.php PHP 7.4.33 (Linux)
File Line Function
[PHP]   errorHandler->error
/inc/highlighter.php 1007 preg_match_all
/inc/highlighter.php 353 generic_highlight
/inc/plugins/coolcode.php 133 php_highlight
/inc/plugins/coolcode.php 61 coolcode_run
/inc/class_plugins.php 139 coolcode_end
/inc/class_parser.php 232 pluginSystem->run_hooks
/printthread.php 184 postParser->parse_message
Warning [2] Invalid argument supplied for foreach() - Line: 1008 - File: inc/highlighter.php PHP 7.4.33 (Linux)
File Line Function
/inc/highlighter.php 1008 errorHandler->error
/inc/highlighter.php 353 generic_highlight
/inc/plugins/coolcode.php 133 php_highlight
/inc/plugins/coolcode.php 61 coolcode_run
/inc/class_plugins.php 139 coolcode_end
/inc/class_parser.php 232 pluginSystem->run_hooks
/printthread.php 184 postParser->parse_message
Warning [2] preg_match_all(): The /e modifier is no longer supported, use preg_replace_callback instead - Line: 1007 - File: inc/highlighter.php PHP 7.4.33 (Linux)
File Line Function
[PHP]   errorHandler->error
/inc/highlighter.php 1007 preg_match_all
/inc/highlighter.php 353 generic_highlight
/inc/plugins/coolcode.php 133 php_highlight
/inc/plugins/coolcode.php 61 coolcode_run
/inc/class_plugins.php 139 coolcode_end
/inc/class_parser.php 232 pluginSystem->run_hooks
/printthread.php 184 postParser->parse_message
Warning [2] Invalid argument supplied for foreach() - Line: 1008 - File: inc/highlighter.php PHP 7.4.33 (Linux)
File Line Function
/inc/highlighter.php 1008 errorHandler->error
/inc/highlighter.php 353 generic_highlight
/inc/plugins/coolcode.php 133 php_highlight
/inc/plugins/coolcode.php 61 coolcode_run
/inc/class_plugins.php 139 coolcode_end
/inc/class_parser.php 232 pluginSystem->run_hooks
/printthread.php 184 postParser->parse_message



Home of Gamehacking - Archiv
VirtualProtectEx Error 998 - Druckversion

+- Home of Gamehacking - Archiv (http://archiv-homeofgamehacking.de)
+-- Forum: Coding (http://archiv-homeofgamehacking.de/forumdisplay.php?fid=15)
+--- Forum: C, C#, C++, Visual C++ (http://archiv-homeofgamehacking.de/forumdisplay.php?fid=18)
+--- Thema: VirtualProtectEx Error 998 (/showthread.php?tid=2343)



VirtualProtectEx Error 998 - Prototype - 05.11.2013

Moin,
Habe ein Problem mit der Winapi Funktion VirtualProtectEx(). Und zwar returnt mir diese den error Code 998.

Hier mal der Code:

PHP-Code:
VirtualProtectEx(hProcess,(LPVOID) adressPointer,sizeof(DWORD),PAGE_EXECUTE_READWRITE , NULL)


Das komische ist, meine ReadProcessMemory Funktion bekommt genau den selben adressPointer und funktioniert, also:

PHP-Code:
ReadProcessMemory(hProcess, (LPCVOID) adressPointer, &scoreValue, sizeof(DWORD),NULL)

Liefert den genauen Wert von adressPointer.
Jemand eine Ahnung wieso VirtualProtect fehlschlägt?



System: Win7 Ultimate 64bit
Target Program: 32bit

DebugPrivilege sind an.



RE: VirtualProtectEx Error 998 - iNvIcTUs oRCuS - 05.11.2013

Könnte das sein das Du mit VirtualProtectEx versuchst "ungültige" Speicherbereiche zu ändern.?!

Zitat:ERROR_NOACCESS
998 (0x3E6)
Invalid access to memory location.

Probehalber würde ich jetzt mal "sizeof(DWORD)" mit einer fixen Zahl ersetzen...
Ansonsten denk ich müsste man wohl die Größe der Speicherseiten ermitteln damit VirtualProtectEx nicht über "gültige" Speicherseiten hinaus versucht die Zugriffsrechte zu ändern.


RE: VirtualProtectEx Error 998 - Prototype - 05.11.2013

Das habe ich am Anfang auch gedacht, allerdings liefert mir ReadProcessMemory mit der selben Adressen den richtigen Wert. Und dort gebe ich auch nur ein DWORD als size an. Ob ich jetzt 4 Bytes oder Sizeof(DWORD) angebe sollte eigentlich egal sein. Die größe ist auf jedenfall 4 bytes.

Gerade getestet, selbes Problem. Ich kann es mir nicht erklären.


RE: VirtualProtectEx Error 998 - Acubra - 05.11.2013

Hey,
versuche mal eine Variable für _Out_ PDWORD lpflOldProtect anzugeben:

Code:
DWORD dwOldprotect;
VirtualProtectEx(hProcess,(LPVOID) adressPointer,sizeof(DWORD),PAGE_EXECUTE_READWRITE, &dwOldprotect); 




RE: VirtualProtectEx Error 998 - iNvIcTUs oRCuS - 05.11.2013

Shit... Acubra war schneller...
Da muss ich Acubra zustimmen... Weil,

MSDN schrieb:lpflOldProtect [out]

A pointer to a variable that receives the previous access protection of the first page in the specified region of pages. If this parameter is NULL or does not point to a valid variable, the function fails.



RE: VirtualProtectEx Error 998 - Prototype - 06.11.2013

Ah ****. Funktioniert jetzt. Gibt es irgendwie eine Möglichkeit die Winapi Doku in vs einzubinden?


RE: VirtualProtectEx Error 998 - Acubra - 06.11.2013

Hey,
Nicht das ich wüsste. Aber du kannst ja in VS nen link zu msdn Seite öffnen und dort dann immer nachgucken.


RE: VirtualProtectEx Error 998 - iNvIcTUs oRCuS - 06.11.2013

Weiß net wie das bei Visual Studio is...
Bei Delphi (Rad Studio) gibts die sogenannte Online Hilfe.
In der IDE kann ich z.B. nach "VirtualProtectEx" suchen und dann werden automatisch alle möglichen Quellen aufgelistet.
Also zum Einen wird die lokale Hilfe durchsucht und zum Anderen wird Online und anderem die MSDN durchsucht und die Ergebnisse schließlich angezeigt.
Aber ich denke mal, wie Acubra schon sagte, dürfte das dann bei VS genauso sein.

Ansonsten bräuchtest dann höchstens ein Plugin was dir solch ne Arbeit abnimmt. Für Visual Studio gibts z.B. Visual Assist X, aber inwiefern das eine Erklärung zur jeweiligen API gibt weiß ich net.
Zumindest gibts ne Autovervollständigen Funktion. Aber gut, die is bei VS selbst auch schon drinne...

Wenn's dich interessiert:
Visual Assist X
Visual Assist X - Demonstration Video


RE: VirtualProtectEx Error 998 - Prototype - 08.11.2013

Oh danke, dass habe ich jetzt nicht erwartet. Die Java Api ist z.B bei Eclipse super integriert. Da MSDN auch detaillierte Infos zu den jeweiligen Funktionen hat sollte das doch nicht schwer zu realisieren sein..