dcsimg
Results 1 to 31 of 31

Thread: VB6 compiler corrupting manifest?

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    2,410

    VB6 compiler corrupting manifest?

    Looking to solve a bug IliaPreston is encountering with my ucShellBrowse project, but I can't replicate the problem and don't even know where to begin.

    When I compile a shell browser demo project, all goes well, but when my friend there compiles the exact same project, with all the exact same files, the exe doesn't run, saying the side-by-side config is incorrect, and upon comparing the manifests in ResourceHacker, they're both listed as language code 1033 but then at the bottom one says UCS-2 (the broken one) and the other ANSI (runs fine):


    Don't even know where to start on this one.

  2. #2
    Frenzied Member wqweto's Avatar
    Join Date
    May 2011
    Posts
    1,766

    Re: VB6 compiler corrupting manifest?

    For UCS-2 unicode files there are two variants of "sub-encoding": big-endian and little-endian UCS-2. As a consequence of the different endianness these two variants have different BOMs: \xFF\xFE for LE and \xFE\xFF (reversed) for BE

    Notepad (as everything in x86 Windows) encodes using little-endian i.e. UCS-2 LE. You can use Notepad++ to convert between both UCS-2 LE and UCS-2 BE.

    cheers,
    </wqw>

  3. #3
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,869

    Re: VB6 compiler corrupting manifest?

    Notepad can open and save as big-endian Unicode. It has done so for a very long time, at least since Windows 6.0 (Vista).

    Manifests should be encoded as UTF-8 with no BOM. In the degenerate case the ASCII subset of ANSI is the same as UTF-8 which is why you can often get away with using ANSI. Even having a BOM may be ok, it just wouldn't be strictly correct.

    I'm not sure you can ever use UCS-2 or UTF-16 (LE or BE), but if you could then your XML Declaration element should at least match its encoding.

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    2,410

    Re: VB6 compiler corrupting manifest?

    Right I understand they're two different text encoding types, but how is it winding up in that format?

    The project includes resImagesStd.res, which when opened, shows correctly in ANSI. That's the resource added in the IDE. When I compile, it stays in ANSI; when Ilia compiles, it changes to UCS-2,
    Quote Originally Posted by IliaPreston View Post
    I just opened that vbp project in the VB6 IDE. Then I went to File -> Make prjTest003.exe and made the executable.
    Once done, I opened Windows explorer, went to C:\Dev\VB6\Test003 and in there I first verified (based on the timestamp of the prjTest003.exe), that it was the one I just had made a few seconds ago, and then I double clicked on prjTest003.exe, and that error happened.
    The compiler seems to change it.

  5. #5
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,869

    Re: VB6 compiler corrupting manifest?

    AS far as I can see the compiler wouldn't be implicated.

    A manifest should be added as a Custom resource if using the IDE add-in. Those are imported as BLOB data, not text, so there wouldn't be any reason to do any re-encoding.

    Either there is something wrong with the file being imported as a resource or else something unusual about the procedure followed to import it. Is it safe to assume the add-in is being used?

    I agree this seems pretty odd.

  6. #6
    Hyperactive Member
    Join Date
    Mar 2010
    Posts
    483

    Re: VB6 compiler corrupting manifest?

    I just did the following to see if it made any difference:

    1. I closed my VB6 IDE. (It was open, so I closed it)
    2. Under my C drive (root folder), I created a new folder named xTestFldrForUcShellB. So the full path to the new folder is C:\xTestFldrForUcShellB.
    3. I downloaded the zip file attached to post #49 in the original thread: http://www.vbforums.com/showthread.p...features/page2
    Even though I had myself initially uploaded that zip file, I still decided to download it (instead of using the original copy of the same zip file that still resides on my computer in a different folder.
    4. I moved that zip file to C:\xTestFldrForUcShellB.
    5. I unzipped it there and renamed prjTest003.exe to old_renamed_prjTest003.exe.
    6. I double-clicked on the file prjTest003.vbp. This opened prjTest003.vbp in the VB6 IDE.
    7. Without doing any other thing, I went to File -> Make prjTest003.exe and made that executable.
    8. I closed the Vb6 IDE again.
    9. I went back to Windows Explorer: C:\xTestFldrForUcShellB
    10. I noticed that the new executable prjTest003.exe was there (as expected), and I verified (based on its timestamp) that it was the new executable that I had made a few seconds earlier.
    11. I double-clicked on the new executable prjTest003.exe, and the same problem happened. The same error message popped up:
    https://i.imgur.com/cOpFnW1.jpg
    12. I opened the new prjTest003.exe residing in the new folder C:\xTestFldrForUcShellB in resourcehacker, and it is the same:
    https://i.imgur.com/ep5TxLp.jpg

    This looks really strange.

  7. #7
    Hyperactive Member
    Join Date
    Mar 2010
    Posts
    483

    Re: VB6 compiler corrupting manifest?

    Quote Originally Posted by fafalone View Post
    Right I understand they're two different text encoding types, but how is it winding up in that format?

    The project includes resImagesStd.res, which when opened, shows correctly in ANSI. That's the resource added in the IDE. When I compile, it stays in ANSI; when Ilia compiles, it changes to UCS-2,

    The compiler seems to change it.
    For me, it shows like this (in Notepad, Wordpad and Notepad++):
    https://i.imgur.com/sI6WROk.jpg
    https://i.imgur.com/T1Er3PV.jpg
    https://i.imgur.com/xbs7g4Y.jpg

    Also, when I open VB6.EXE in ResourceHacker and go to manifest, here is the whole result (in case it may be of any help in tracking down this cause of problem):
    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
      <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> 
          <application> 
            <!--This Id value indicates the application supports Windows Vista functionality -->
              <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> 
            <!--This Id value indicates the application supports Windows 7 functionality-->
              <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
            <!--This Id value indicates the application supports Windows 8 functionality-->
              <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
            <!--This Id value indicates the application supports Windows 8.1 functionality-->
              <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
          </application> 
      </compatibility>
      <assemblyIdentity type="win32" 
                        name="myOrganization.myDivision.mySampleApp" 
                        version="6.0.0.0" 
                        processorArchitecture="x86" 
                        publicKeyToken="0000000000000000"
      />
      <dependency>
        <dependentAssembly>
            <assemblyIdentity
                type="win32"
                name="Microsoft.Windows.Common-Controls"
                version="6.0.0.0"
                processorArchitecture="*"
                publicKeyToken="6595b64144ccf1df"
                language="*"
            />
        </dependentAssembly>
      </dependency>
      <application xmlns="urn:schemas-microsoft-com:asm.v3">
        <windowsSettings>
            <dpiAware  xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
        </windowsSettings>
      </application>  
    </assembly>
    Also, let me quote a part of my own post #31 under http://www.vbforums.com/showthread.p...orer-on-a-form (in case it may be of any help):
    Also, when I used the Resource Hacker to add the manifest to VB6.EXE, I forgot to change dpiAware value at the bottom to false:
    https://i.imgur.com/Rl5hIpc.jpg
    Could that be the cause of this problem?

    And also, how do I know if my monitor is high-DPI?
    Any help would be greatly appreciated.

    Thanks.
    Ilia

  8. #8

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    2,410

    Re: VB6 compiler corrupting manifest?

    VB6.EXE's manifest has nothing to do with the compiled .exe, it's only relevant to running from the IDE.
    And .RES files can't be opened in Notepad, you need ResourceHacker.

    But here's what I'm seeing...
    -Your copy of resImagesStd.res opens in ResourceHacker and shows ANSI (good)
    -Your copy of resImagesStd.res is included in prjTest003.vbp -- This is where the manifest that gets put into prjTest003.exe is (good)
    -When you compile prjTest003.exe, and view its manifest in ResourceHacker, it's suddenly USC-2 and not ANSI (bad)

    Hence the list to make sure you do an absolutely clean compile and see what happens... but that didn't seem to work either........



    See that manifest should be compiled into prjTest003.exe by VB, since that's what's in the .res file, I don't know where it's becoming USC-2 and not ANSI.

    Can you open resImagesStd.RES in ResourceHacker and verify it's also in ANSI on your system?


    Of course there's always hoping whatever the problem is disappears with the new release, if you want to try compiling the test version I PM'd you.

  9. #9
    Hyperactive Member
    Join Date
    Mar 2010
    Posts
    483

    Re: VB6 compiler corrupting manifest?

    Hi Jon
    I just replied to your PM (I don't know why I hadn't seen it last night).
    As I explained in my response to your PM, the problem persists (please see my screen prints in my PM that I just sent you).

    Also, in the thread you said:
    Can you open resImagesStd.RES in ResourceHacker and verify it's also in ANSI on your system?
    It looks good.
    Here is the result from my own prjTest003.vbp project C:\Dev\VB6\Test003\ucShellBrowse\resImagesStd.RES:
    https://i.imgur.com/IhV53Yn.jpg

    Also, when I open your latest version of resImagesStd.RES that came in the zip file attached to your last night PM, in ResourceHacker, I see the same thing (ANSI). (No screen print of that in here. Do you want me to attach a screen print of that too?)

    I don't know why the Res file is good but when it is inserted into the exe file it changes.
    Please help.

    Thanks.
    Ilia

  10. #10

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    2,410

    Re: VB6 compiler corrupting manifest?

    Are you familiar with the Windows Event Viewer?

    First, try to run the exe and let the error pop up.

    Then, Go to C:\Windows\System32 and double-click eventvwr.msc

    Expand the Windows Logs entry and click on Application

    See if there's an error with 'SideBySide' listed as the source that refers to your exe.


  11. #11
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,869

    Re: VB6 compiler corrupting manifest?

    You are trying to import an existing .RES file from another Project into yours?

    This is a bad idea for several reasons. To begin with, every project needs its own created from scratch. There are obvious reasons such as the need to have different resources in it that the new Project makes use of. But another very important reason is that each Project needs a unique manifest.

    Manifests hold all sorts of kinds of information. There is no universal manifest. They are also supposed to contain an <assemblyIdentity /> element with a unique name attribute that matches the Project and a version attribute that matches the Project.

    So it sounds like you are trying to use a broken procedure from the get-go.


    However, looking at your images and magnifying them enough to read them... it looks like the actual error might be the use of an incorrect LCID value. 1033 is U.S. English, and that works fine on a U.S. machine (or something close).

    What you want for a manifest is Neutral, LCID = 0.

    We often forget about this, but it can be done via the IDE's Resource Editor add-in. You can probably edit the embedded value in the compiled EXE using Resource Hacker as well.

  12. #12

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    2,410

    Re: VB6 compiler corrupting manifest?

    The manifest is for the demo projects. I specifically distribute different resources, including ones without the demo projects manifest, for the purposes you speak of, but for test projects I've never run into an issue with a generic one; matching name and version has never caused an issue.

    To set it to Neutral like dilettante is talking about, use 'Neutral' and not 'Neutral (Default)' or 'Neutral (Sys. Default)'... only the first is code 0.


    Could a non-US IDE install be messing with the encoding? That's the only thing that makes sense as this point, as it's clearly going in ANSI and coming out USC-2.


    (PS- Are you talking about my images being too small or Ilia's? I thought I was resizing from way-too-big because of my 4k monitor)

  13. #13
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,869

    Re: VB6 compiler corrupting manifest?

    Are you getting the compiled EXE from him and looking at it on your own machine?

    I wonder if it is only Resource Hacker mis-displaying when running in another locale rather than a problem with the resource's encoding? The whole "UCS-2" thing is absurd on the face of it since it should be calling it "UTF-16LE" anyway.

    Sounds more like the contents are being treated as DBCS encoded by Resource Hacker and it foolishly labels that as "UCS-2."


    The IDE is not going to do anything at all with a resource created as type CUSTOM and then renamed as type #24 (manifest). I can't see any way this is an IDE or compiler issue. BLOB data carries no implicit encoding because BLOB data is not text. The "B" is for "binary."

    I was just talking about the image in the first post. In Chrome it is displaying too small to make out text here so i have to copy it and paste into IrfanView or save and open it.

  14. #14
    Hyperactive Member
    Join Date
    Mar 2010
    Posts
    483

    Re: VB6 compiler corrupting manifest?

    Quote Originally Posted by fafalone View Post
    Are you familiar with the Windows Event Viewer?

    First, try to run the exe and let the error pop up.

    Then, Go to C:\Windows\System32 and double-click eventvwr.msc

    Expand the Windows Logs entry and click on Application

    See if there's an error with 'SideBySide' listed as the source that refers to your exe.

    I just made a new executable.
    Then ran the new executable, received that error, and then looked into the Windows event viewer.
    Here is the result:
    https://i.imgur.com/5ceVbm1.jpg

  15. #15
    Hyperactive Member
    Join Date
    Mar 2010
    Posts
    483

    Re: VB6 compiler corrupting manifest?

    Quote Originally Posted by dilettante View Post
    Are you getting the compiled EXE from him and looking at it on your own machine?

    I wonder if it is only Resource Hacker mis-displaying when running in another locale rather than a problem with the resource's encoding? The whole "UCS-2" thing is absurd on the face of it since it should be calling it "UTF-16LE" anyway.

    Sounds more like the contents are being treated as DBCS encoded by Resource Hacker and it foolishly labels that as "UCS-2."


    The IDE is not going to do anything at all with a resource created as type CUSTOM and then renamed as type #24 (manifest). I can't see any way this is an IDE or compiler issue. BLOB data carries no implicit encoding because BLOB data is not text. The "B" is for "binary."

    I was just talking about the image in the first post. In Chrome it is displaying too small to make out text here so i have to copy it and paste into IrfanView or save and open it.
    Actually, I had attached a zip file containing my test project to the main thread (http://www.vbforums.com/showthread.p...features/page2) post #49.
    That zip file also contains the exe file (named prjTest003.exe) that I had cut on my own machine.
    I am copying that same zip file in here:
    http://www.mediafire.com/file/o4uxmh...st003.zip/file

    I guess fafalone may have already downloaded and looked into it on his own machine (not sure though).

    Any help on this would be greatly appreciated.
    Thanks.
    Ilia

  16. #16
    Hyperactive Member
    Join Date
    Mar 2010
    Posts
    483

    Re: VB6 compiler corrupting manifest?

    I also have an idea, but not sure if it is a correct idea or not, and if it is correct, I don't know how to implement it:

    I am thinking, maybe I remove the file "resImagesStd.RES" from my vbp project, then cut an executable without that resImagesStd.RES file, and then use the resourcehacker to insert that file "resImagesStd.RES" into the executable.

    Not sure if this is even a do-able thing or not.
    Can ResourceHacker insert a .Res file into an .exe file?
    How?

  17. #17

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    2,410

    Re: VB6 compiler corrupting manifest?

    You're better off just inserting the manifest after compiling; there's a version of the resource file without a manifest here.

    @dilettante, this has got to be an IDE/compiler issue. I sent Ilia a copy of the exe compiled on my machine, and it runs fine for him. Same exact resource file. And the manifest in the .res before compiling also shows as ANSI. What I'm clueless to is how this may be happening.

    Ilia have you tried the suggestion of changing the language code of the manifest?
    -Open the project's .res in the VB Resource Editor
    -Expand the '24' folder
    -Double-click on '1'
    -Change the language to 'Neutral'. Just plain Neutral, not Neutral (Default) or Neutral (Sys. Default).

  18. #18
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,869

    Re: VB6 compiler corrupting manifest?

    Quote Originally Posted by fafalone View Post
    @dilettante, this has got to be an IDE/compiler issue. I sent Ilia a copy of the exe compiled on my machine, and it runs fine for him. Same exact resource file. And the manifest in the .res before compiling also shows as ANSI. What I'm clueless to is how this may be happening.
    I won't argue, I just can't explain it.

    Have you had a chance to get the compiled EXE from him after he builds it? I'm not sure you can trust Resource Hacker running on his machine displaying an LCID = 1033 resource. Crossing locales like that may turn RH into a funhouse mirror distorting reality.

    It sounds like all you have to go on is the SxS error. That could be due to almost any tiny flaw like failing to pad the manifest with whitespace (Space, Tab, CR, LF) to a whole multiple of 4 bytes long.

    Beyond that all you have is the funhouse mirror screenshot he sent you, right?

  19. #19
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,869

    Re: VB6 compiler corrupting manifest?

    Consider this funhouse mirror demo:

    Code:
    Option Explicit
    
    Private Const TEST_DATA As String = _
            "<?xml version=""1.0"" encoding=""UTF-8"" standalone=""yes""?>" _
          & "<assembly xmlns=""urn:schemas-microsoft-com:asm.v1"" " _
          & "xmlns:asmv3=""urn:schemas-microsoft-com:asm.v3"" manifestVersion=""1.0"">"
    
    Private Sub Form_Load()
        Dim Bytes() As Byte
        Dim Unicode As String
    
        'Slop the Unicode text back into ASCII/ANSI/UTF-8 (same thing for the characters
        'used here):
        Bytes = StrConv(TEST_DATA, vbFromUnicode)
        'Jam these bytes into a String pretending that they are Unicode ("UCS-2"):
        Unicode = Bytes
        InkEdit1.Text = Unicode
    End Sub
    
    Private Sub Form_Resize()
        If WindowState <> vbMinimized Then
            InkEdit1.Move 0, 0, ScaleWidth, ScaleHeight
        End If
    End Sub
    Name:  sshot.png
Views: 170
Size:  7.8 KB

    I don't read Chinese or whatever that is, but quite a few characters seem to match the screenshot from post #1 above.
    Last edited by dilettante; Apr 21st, 2019 at 03:52 AM.

  20. #20
    Frenzied Member wqweto's Avatar
    Join Date
    May 2011
    Posts
    1,766

    Re: VB6 compiler corrupting manifest?

    Yes, this looks similar to OP "visualization".

    Btw, StrConv returns a String (try Debug.Print TypeName(StrConv(TEST_DATA, vbFromUnicode)))

    cheers,
    </wqw>

  21. #21
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,869

    Re: VB6 compiler corrupting manifest?

    I fully realize that. And you can assign String data to/from dynamic Byte arrays. It does a byte-by-byte copy without applying any transcoding.

    In the code above I could have left out the intermediate "Bytes" variable. But as it is you could do a hex dump to see what is actually in there.
    Last edited by dilettante; Apr 21st, 2019 at 05:14 AM.

  22. #22
    Frenzied Member wqweto's Avatar
    Join Date
    May 2011
    Posts
    1,766

    Re: VB6 compiler corrupting manifest?

    I find some of the run-time functions very puzzling because you can never be sure with StrConv(String As Variant, ...) As Variant declaration which gets which data-type :-))

    Obviously the function works for its first parameter being byte-array too but is it because this param gets byte-to-byte transcoded to temporary String or the function is handling the array directly. . .

    cheers,
    </wqw>

  23. #23
    PowerPoster
    Join Date
    Jun 2013
    Posts
    4,601

    Re: VB6 compiler corrupting manifest?

    @IliaPreston
    Do you use a "self-upgraded" or otherwise manipulated Link.exe with your VB6-installation?

    If you are not sure, could you post the FileDate, FileVersion and FileSize of your LINK.exe (located in the Folder where your VB6.exe resides)?

    ...If you are at it, your versions of EditBin*.exe would be interesting as well.

    Olaf
    Last edited by Schmidt; Apr 21st, 2019 at 09:27 AM.

  24. #24

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    2,410

    Re: VB6 compiler corrupting manifest?

    Quote Originally Posted by dilettante View Post
    I won't argue, I just can't explain it.

    Have you had a chance to get the compiled EXE from him after he builds it? I'm not sure you can trust Resource Hacker running on his machine displaying an LCID = 1033 resource. Crossing locales like that may turn RH into a funhouse mirror distorting reality.

    It sounds like all you have to go on is the SxS error. That could be due to almost any tiny flaw like failing to pad the manifest with whitespace (Space, Tab, CR, LF) to a whole multiple of 4 bytes long.

    Beyond that all you have is the funhouse mirror screenshot he sent you, right?
    Yeah I have the exe that produces the error.

    I opened it in Visual Studio 2015, and the manifest looks normal:


    Exported it to plain text and it's identical to the pre-compile manifest; with the exception of the one in the compiled exe showing 3 terminating nulls, and the pre-compile manifest not having any (I exported to binary in reshacker, so if they were there that should have shown).

    Given that the sxs error from Windows Event Viewer is line 49, and that end line with the nulls is line 50... not sure that's it... and line 49 is just </compatibility>.

  25. #25
    Fanatic Member
    Join Date
    Feb 2019
    Posts
    541

    Re: VB6 compiler corrupting manifest?

    Quote Originally Posted by fafalone View Post
    with the exception of the one in the compiled exe showing 3 terminating nulls, and the pre-compile manifest not having any (I exported to binary in reshacker, so if they were there that should have shown).
    See Q297112, VB6 compiler pads resources with extra nulls, if they are not a multiple of 4 bytes, and nulls are not valid in XML.

  26. #26
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,869

    Re: VB6 compiler corrupting manifest?

    Yes, padding is a well known issue. Clearly not as well known as it needs to be though. I'm sorry I didn't bring it up earlier, I took it for granted that anyone working with manifests is already well aware of it.

    It sounds like the resource LCID might not be an issue then either, though 0 would be "correct" and probably preferred.

    I don't think that "padding fix patch" mentioned in the MS KB article linked above ever made it into the VB6 Service Packs.

  27. #27
    Hyperactive Member
    Join Date
    Mar 2010
    Posts
    483

    Re: VB6 compiler corrupting manifest?

    Quote Originally Posted by fafalone View Post
    You're better off just inserting the manifest after compiling; there's a version of the resource file without a manifest here.

    @dilettante, this has got to be an IDE/compiler issue. I sent Ilia a copy of the exe compiled on my machine, and it runs fine for him. Same exact resource file. And the manifest in the .res before compiling also shows as ANSI. What I'm clueless to is how this may be happening.

    Ilia have you tried the suggestion of changing the language code of the manifest?
    -Open the project's .res in the VB Resource Editor
    -Expand the '24' folder
    -Double-click on '1'
    -Change the language to 'Neutral'. Just plain Neutral, not Neutral (Default) or Neutral (Sys. Default).
    Sorry about the delay in responding (I am also working on other projects, so, I have been really busy)

    I did get that resource file without manifest, but I have not yet added it to my vbp project (nor have I yet removed the main resource fie from my vbp project) because, then:
    1- If I have to insert the manifest to the exe file (prjTest003.exe), where is the manifest that I would insert?
    2- How do I insert the manifest to my prjTest003.exe?
    Based on what I see in ResourceHacker:
    https://i.imgur.com/BE8AtGv.jpg
    It lets me do certain things to an EXISTING manifest in my exe file, but doesn't let me add a new one.
    Please note that the pop-up menu in the above screen print shows when I right-click on 1 : 1033
    But if I right-click on its parent node Manifest, no pop-up menu pops up.
    I thought by right-clicking on Manifest a little pop-up menu would pop up with one of its menu items being "Add New Manifest" or something like that, but no such pop-up menu pops up if I right-click on Manifest.

    So, how do I insert the manifest to my prjTest003.exe?

    As for your other suggestion:
    Ilia have you tried the suggestion of changing the language code of the manifest?
    -Open the project's .res in the VB Resource Editor
    -Expand the '24' folder
    -Double-click on '1'
    -Change the language to 'Neutral'. Just plain Neutral, not Neutral (Default) or Neutral (Sys. Default).
    I just tried to load Resource Editor in Add-In Manager, but it tried to install it, and couldn't find the file vs_setup.msi
    And I couldn't find it myself either, and I don't know where the CDs are (I installed it in 2014)

    Regarding the edits that you recommend that I do to the resource file in Resource Editor (changing the language), can you kindly make those edits to a copy of the resource file and post the resulting resource file in here if it is not a trouble?

    And finally, which one of these two recommendations should I try first?
    Should I first use the alternative resource file (without manifest) and then insert the manifest to my prjTest003.exe file?
    Or should I first use the resource file with a changed language?

    Thanks.
    Ilia
    Last edited by IliaPreston; Apr 22nd, 2019 at 09:28 PM.

  28. #28

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    2,410

    Re: VB6 compiler corrupting manifest?

    Is there a circumstance where the padding could become an issue? If it was in the normal course of events this error wouldn't be unique to one persons VB compiler.

    Ilia first try the resource file I'm attaching to this post; it both removes the section that Event Viewer mentioned and the manifest is now a multiple of 4 bytes. Also changed the language. Hopefully one of those will do it.
    Attached Files Attached Files

  29. #29
    Fanatic Member
    Join Date
    Feb 2019
    Posts
    541

    Re: VB6 compiler corrupting manifest?

    Quote Originally Posted by fafalone View Post
    Is there a circumstance where the padding could become an issue? If it was in the normal course of events this error wouldn't be unique to one persons VB compiler.
    This post by LaVolpe mentions that null padding is causing problems with Windows 10. Also, your ucShellBrowse thread mentions LaVolpe's Manifest Creator, which says "RETIRED"(Post last edited April 9, 2017). The new replacement, Manifest Creator II pads with spaces instead of nulls according to post #14. The issue was fixed on May 16, 2017, so the original manifest creator doesn't fix this issue.

    It's possible that Microsoft one day might fix their XML parser so it ignores nulls, but this would become dependent on what OS and service pack the user has.

  30. #30
    Hyperactive Member
    Join Date
    Mar 2010
    Posts
    483

    Re: VB6 compiler corrupting manifest?

    Quote Originally Posted by fafalone View Post
    Is there a circumstance where the padding could become an issue? If it was in the normal course of events this error wouldn't be unique to one persons VB compiler.

    Ilia first try the resource file I'm attaching to this post; it both removes the section that Event Viewer mentioned and the manifest is now a multiple of 4 bytes. Also changed the language. Hopefully one of those will do it.
    Wow!!!
    Problem solved!
    This new resource file that you attached to post #28 decisively solved the problem.
    You are a genius.

    Here is more detailed info:
    1. I downloaded the new zip file attached to post #28, unzipped it and renamed the file inside it from resImagesStd.RES to resImagesStd-v2019042301.RES in order to avoid confusion.
    Then I moved this new file resImagesStd-v2019042301.RES to my vbp folder C:\Dev\VB6\Test003.
    Then I opened VB^, and opened prjTest003.vbp in it.
    Then I removed resImagesStd.RES from my vbp project and then added resImagesStd-v2019042301.RES to the vbp.
    Then I cut an executable prjTest003.exe.
    Then I went to Windows Explorer and to C:\Dev\VB6\Test003 and double-clicked on prjTest003.exe and it opened without a problem and showed everything.
    Perfect!

    And, you may also be interested in seeing this:
    https://i.imgur.com/cEz3wmy.jpg
    Once again: Perfect!

    2. After making sure that the new .Res file fixed the problem, I then also replaced the two files ucShellBrowse.ctl and ucShellBrowse.ctx with the new ones that you sent me a few days ago in a PM.
    and ran the vbp project again, and also cut a new executable.
    The "side-by-side problem is definitely solved.
    The new executable starts and runs without that side-by-side error.
    However, I thought the new package that you sent me a few days ago had already fixed those initial problems with ucShellBrowse. But, those problems still exist.

    To be more precise, I am talking about the two problems regarding ucShellBrowse that I reported in post #44 under the main thread (http://www.vbforums.com/showthread.p...features/page2)
    The "side-by-side problem is definitely solved, but those two initial problems (post #44 under the above thread) still exist. FYI.

    Thanks a lot for this great control (ucShellBrowse) and thanks again for all your help.
    Also, thanks a lot to everybody else who commented, advised or in any way contributed to this thread.
    Ilia

  31. #31

    Thread Starter
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    2,410

    Re: VB6 compiler corrupting manifest?

    Glad it finally works!

    Do you have SP6 installed (Visual Studio 6.0 Service Pack 6)? If you don't, that and the 4-byte padding issue would definitely explain it, since if it was just a Win10 issue it would've come up in testing; but I never tested compiling without SP6 then running on 10.


    If those other problems from that post still exist it looks like we have a whole new round of Windows 10 breaking something, because the posted code changes definitely fixed them on 7

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width