Results 1 to 8 of 8

Thread: [RESOLVED] DWord Alignment of VB Resource File Entries

Threaded View

  1. #1

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Resolved [RESOLVED] DWord Alignment of VB Resource File Entries

    I've seen posts regarding this topic from time to time. So, trying to get a definitive answer from you guys/gals from your personal, verifiable experiences.

    Can VB change the reported actual size of an individual resource once it is compiled into the application?

    FYI. I know that prior to SP6, this was a bug and supposedly fixed with SP6. That bug resulted in VB padding the resource, as needed, 1 to 3 vbNullChar bytes to force dword alignment. That in itself is not the problem, the problem is if the size of the resource was adjusted to match. This bug appears primarily with HTML/XML resources (RT_HTML/RT_MANIFEST respectively). The resource size includes the null characters and null characters are not valid in that context.

    Note: I've seen a couple of Elroy's posts regarding this topic, but do not know if they were pre-SP6 or not. In his case, his concern was checksums/CRCs when extracting data from a resource to file. If the resource was padded and size was modified to reflect the padding, then the extracted resource would be 1-3 bytes larger than original; resulting in a failed checksum/CRC validation.

    Edited: msdn comments about the pre-SP6 padding bug
    Last edited by LaVolpe; Oct 27th, 2017 at 09:38 PM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width