|
-
May 16th, 2017, 04:59 PM
#11
Re: [VB6] Manifest Creator II
Self-identified a bug. At least with Win10, using null char Chr(0) as padding to word-align manifest before writing to a resource file prevented the manifest from being applied. The fix was simple enough, use a space as padding instead. Patch uploaded in post #1.
Edited: An example of the Windows Event log showed this:
Activation context generation failed for "C:\Users\LaVolpe\Desktop\..\some.exe". Error in manifest or policy file "C:\Users\LaVolpe\Desktop\..\some.exe" on line 29. Invalid Xml syntax.
There was no invalid XML syntax. Everything I have that could open/validate the XML proved that. So out of curiosity, thinking maybe Windows was interpreting null character as end of XML within the res file and bouncing that byte position relative to dWord alignment, determined invalid XML, not necessarily invalid format (generic error probably). The required padding changed to spaces, no modifications to the XML & Windows had no problems.
Edited: Though the above solution appears to work, not satisfied. I'll look at it again and see if the null characters are indeed the problem, which I find hard to believe. This is just a matter of better understanding the res file format more than anything else. There is very little documentation on how the typical 'data' portions of the resource file should look like for sections other than bitmaps, icons, cursors, and string tables.
Edited yet again. It is possible, depending on whether SP6 is installed and/or the size of the embedded manifest, VB will change the size of the resource. When changed, it will included padded null bytes which can generate that error. As of Oct 2017, the tool will now ensure the manifest is padded with spaces, as needed, to prevent any chance of VB padding with null characters. Just a sanity check. This logic applies only when writing to resource files.
Last edited by LaVolpe; Oct 28th, 2017 at 03:23 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|