in reply to How can I integrate within the PDK perlapp the manifest assembly workaround for Vista UAC?
Just a guess, but from the error message (Cannot be run in DOS mode), it sounds like by inserting data into the binary, you are changing the offsets of the subsequent PE format sections, but failing to adjust the appropriate offsets within the PE header.
Hence, when NTLDR attempts to load the executable image by following the now mis-sized offsets, it fails to locate the appropriate sections, and so rejects it with a generic error message indicating that it does not recognise, or cannot make sense of the format of the file.
To correct this would require you to parse the header, figure out which section offsets come after the position where you are inserting your xml, and adjust them by the amount you insert. There is the additional complication that the offsets have to be aligned to certain boundaries. I'm not sure whether these would be 4-byte, 8-byte or conceivably even page-sized boundaries under Vista. Conceivably it could be processor size (32-bit -v- 60-bit dependant. You would need to find a document describing the latest (Vista compatible) definition of the PE executable format. I have previously found these to be available on-line, but depending where you get it, it may or may not be complete description.
Like I say, just a semi-informed guess.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How can I integrate within the PDK perlapp the manifest assembly workaround for Vista UAC?
by ddn123456 (Pilgrim) on Apr 03, 2007 at 10:03 UTC | |
by BrowserUk (Patriarch) on Apr 03, 2007 at 11:34 UTC | |
by ddn123456 (Pilgrim) on Apr 03, 2007 at 13:16 UTC |