I need to read the data added to the end of the executable from this executable.On win32, I have a problem that I can not open .exe for reading. I tried CreateFile and std :: ifstream.Is there a way to specify non-exclusive read access to a file that was not originally opened when shared.
EDIT - The great thing about stackoverflow, you ask the wrong question and get the right answer.
Why not just use the resources dedicated to this feature. It will not be at the end, but it will be in the executable.
.exe - , .exe
http://msdn.microsoft.com/en-us/library/ms648049(VS.85).aspx
. ? EXE , , . , :
HANDLE file=CreateFile(filename, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0);
32- 64- Windows .
I have no problem opening an executable process image using any of these operators:
FILE* f = fopen( fname, "rb"); hFile = CreateFile( fname, FILE_READ_DATA, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
What is your code?
Source: https://habr.com/ru/post/1699525/More articles:Flex dataGrid itemRenderer, width and height of access cell - flexHow to set caching of static files in IIS? - iisWhen to change the GUID in a type library - guidAre styling tools useful? - coding-styleLearn about SQL Server hardware or speed tests - sql-serverOOP: menu system design - designCase sensitivity when querying SQL Server 2005 with .NET using OleDB - c #Using mySql data in an ASP.NET application - mysqlJava ↔ Javascript for non-applets? - javaDictonaries and lambda inside the classroom? - pythonAll Articles