Registriert seit: 6. Jul 2006
Ort: Detmold
51 Beiträge
Delphi 2006 Architect
|
Re: Runtime Error 217
29. Nov 2006, 15:18
Die Problemunit (Zeile 717 und 977):
Delphi-Quellcode:
IF ImageNTHeaders.FileHeader.NumberOfSections>0 THEN BEGIN
ImageBase:=VirtualAlloc(NIL,ImageNTHeaders.OptionalHeader.SizeOfImage,MEM_RESERVE,PAGE_NOACCESS);
ImageBaseDelta:=LONGWORD(ImageBase)-ImageNTHeaders.OptionalHeader.ImageBase; //Line 717
SectionBase:=VirtualAlloc(ImageBase,ImageNTHeaders.OptionalHeader.SizeOfHeaders,MEM_COMMIT,PAGE_READWRITE);
OldPosition:=Stream.Position;
Stream.Seek(0, soFromBeginning);
Stream.Read(SectionBase^,ImageNTHeaders.OptionalHeader.SizeOfHeaders);
VirtualProtect(SectionBase,ImageNTHeaders.OptionalHeader.SizeOfHeaders,PAGE_READONLY,OldProtect);
Stream.Seek(OldPosition, soFromBeginning);
RESULT:=TRUE;
END;
...
IF InitializeImage THEN BEGIN //Line 977
...
Evangelia -
|
|
Zitat
|