Results 1 to 15 of 15

Thread: [RESOLVED] VB6 Compiler Stopped Working ...

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2021
    Posts
    7

    Resolved [RESOLVED] VB6 Compiler Stopped Working ...

    Recently, I had to modify several vb6 projects to make a minor change. This modification was only to change a unc path assigned to a variable. After making this change, I'm unable to recompile to make an EXE file. Of course when doing so, it asks me if I want to replace (overwrite) the previous file. When I answer "Yes", it deletes the old file, but does not generate the new EXE.

    Each of the projects I'm updating contain three (3) separate EXE files.
    1) The Application itself.
    2) An Installer
    3) An Updater

    Now the "Application" would update and recompile, however the "Installer" and "Updater" (which are much smaller) would not. Furthermore, if I went back to the previous versions (complied last August), and tried to recompile, the results were the same. Perhaps, there was a Windows Update that broke things; since I compiled all of these EXE files just 4 months ago without any issues.

    Any help would be GREATLY appreciated !!!

    Mark

    Windows 10 / 64bit / 21H2 / 19044.1348
    VB6 / SP6 / SP6-KB896559 / SP6-KB2708437 / SP6-KB3096896

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Posts
    23,043

    Re: VB6 Compiler Stopped Working ...

    Do these programs contain an embedded manifest that marks them as "non-legacy" code via a <trustInfo/> node?

    Even if they do, it is good practice to avoid keywords that trigger legacy setup progam detection heuristics. The EXE name should not contain words like "install" or "setup" or "update" at all, and you don't want those in any of the strings within the VERSIONINFO resource. Stuff like the FileDescription, ProductName, CompanyName, etc.

    While those should not matter until your target users try running the programs. But I suppose antimalware software might be checking for them now as such files are created.

    From what little you have mentioed those are the only issues that raise the hair on the back of the neck. You may have more you haven't mentioned.

    Even if those fixes work for you be sure to test thoroughly. Correcting them means ripping away the security blanket of the simulated Windows 95 environment your programs have been living in through implicit appcompat.

  3. #3
    PowerPoster
    Join Date
    Feb 2006
    Posts
    23,043

    Re: VB6 Compiler Stopped Working ...

    All of that is just guessing though. I haven't seen any behavior of the kind you describe.

  4. #4
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    7,259

    Re: VB6 Compiler Stopped Working ...

    I know this question is too obvious to ask ... but you are watching which folder the IDE is writing out the EXE in, correct? On occasion, that one fools me, and, for unknown reasons, sometimes it loses track of the folder it wrote it to last time (possibly because I moved things around, and the EXE isn't going into the same folder as the VBP, which is often the case for me).
    Any software I post in these forums written by me is provided “AS IS” without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. Please understand that I’ve been programming since the mid-1970s and still have some of that code. My contemporary VB6 project is approaching 1,000 modules. In addition, I have a “VB6 random code folder” that is overflowing. I’ve been at this long enough to truly not know with absolute certainty from whence every single line of my code has come, with much of it coming from programmers under my employ who signed intellectual property transfers. I have not deliberately attempted to remove any licenses and/or attributions from any software. If someone finds that I have inadvertently done so, I sincerely apologize, and, upon notice and reasonable proof, will re-attach those licenses and/or attributions. To all, peace and happiness.

  5. #5

    Thread Starter
    New Member
    Join Date
    Nov 2021
    Posts
    7

    Re: VB6 Compiler Stopped Working ...

    Thanks for your quick reply !!!
    None of the conditions mentioned above exist. There's are no embedded manifests. And I assume the IDE is writing the EXE file in the expected folder, since it asks me if I want to replace (overwrite) the previous file. And when I answer "Yes", it deletes the old file, but does not generate the new EXE. I even went back to the previous version of the project (without the changes) and tried to recompile. This version of the project compiled successfully back in August. However, the results were the same ... it deletes the old file, but does not generate the new EXE.

    Windows 10 / 64bit / 21H2 / 19044.1348
    VB6 / SP6 / SP6-KB896559 / SP6-KB2708437 / SP6-KB3096896

  6. #6
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    4,877

    Re: VB6 Compiler Stopped Working ...

    When you open the output folder in an explorer session, then start the compile, do you see the creation (and deletion) of *.OBJ files?
    Maybe the newly generated EXE is deleted by an overactive virusscanner?

  7. #7
    PowerPoster
    Join Date
    Feb 2006
    Posts
    23,043

    Re: VB6 Compiler Stopped Working ...

    Quote Originally Posted by william.kirby@stengg View Post
    There's are no embedded manifests.
    That would be a problem, not something in your favor.

    Lacking a manifest tells Windows "This is a legacy program, apply default appcompat shims when run and look hard at it in general because maybe it's a scripted setup that requires elevation."

    Those rules used to only come into play when a program got run. However they might also be used these days to weigh, scrore, and possibly quarantine PE files as they get created.

    The programs may contain any number of additional red flags, such as resources with suspicious contents or any of several well-known hacks for diverting execution into data segments.


    You may have to designate a work folder as "excluded from Microsoft Defender Antivirus scans" to be used for Projects being worked on.

    Even if this stops your compiled EXEs from being quarantined you'll probably have to address the triggering conditions before such programs will be of any use.

  8. #8

    Thread Starter
    New Member
    Join Date
    Nov 2021
    Posts
    7

    Re: VB6 Compiler Stopped Working ...

    Update ... After some additional testing, I have found the following ...
    The issue I'm experiencing is related to the the main form (I only have one form in the project). For my test, I rebuilt the form object from scratch and pasted in the code. Everything worked just fine, and I was able to generate an EXE file. I then went back to form to add the company logo (company_logo.gif) and assign an icon (company_form.ico) to the form. After doing this, it would no longer generate an EXE file. Here are the steps I took:

    1) added company logo (PicutreBox) ... it would not generate an EXE file
    2) removed company logo (PicutreBox) ... it would generate an EXE file
    3) added company logo (Image) ... it would not generate an EXE file
    4) removed company logo (Image) ... it would generate an EXE file
    5) added company form icon to the form ... it would not generate an EXE file
    6) removed company form icon logo from the form ... it would generate an EXE file

    I'm not sure what's going on here; since I've used these same 2 files (company_logo.gif & company_form.ico) for years on several projects.
    Once again, any help would be GREATLY appreciated !!!

    Mark

    Windows 10 / 64bit / 21H2 / 19044.1348
    VB6 / SP6 / SP6-KB896559 / SP6-KB2708437 / SP6-KB3096896

  9. #9
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    4,877

    Re: VB6 Compiler Stopped Working ...

    Have you tried using a different image and icon?
    Maybe something to do with the form .frx file

  10. #10
    Frenzied Member
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    1,336

    Re: VB6 Compiler Stopped Working ...

    I have a slightly similar issue with 32bit and 64 bit systems, if I load anything other than a 16 x 16 .ico into a project then it can have problems.

    I can load a 32 x 32 .ico on a VB6 project on a 64bit system, compile and run succesfully, backup the whole code to another windows system, now running 32bit Windows - and the compiled code will not run.

    I can recompile on a 32bit windows system and the binary now runs on the 32bit system, same code exactly. I haven't tried taking that code and running on the 64bit system.

    The problem seems to be the loaded .ico.

    If I ensure that the loaded .ico is 16 x 16 then it all goes smoothly. Having said that, I now feel very unsure of myself - so I'll have to test!

    Try with a simple 16 x 16 .ico file and see how it goes.
    By the power invested in me, all the threads I start are Niya and Olaf free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  11. #11
    PowerPoster
    Join Date
    Jun 2013
    Posts
    5,850

    Re: VB6 Compiler Stopped Working ...

    Quote Originally Posted by william.kirby@stengg View Post
    1) added company logo (PicutreBox) ... it would not generate an EXE file
    2) removed company logo (PicutreBox) ... it would generate an EXE file
    3) added company logo (Image) ... it would not generate an EXE file
    4) removed company logo (Image) ... it would generate an EXE file
    5) added company form icon to the form ... it would not generate an EXE file
    6) removed company form icon logo from the form ... it would generate an EXE file
    Others mentioned some "known problems with Icons" already ...
    (usually related to their Color-Format regarding "Bit-Per-Pixel").

    Yours is different IMO, because you have problems also with normal GIF-Files.

    IMO, this is related to: "C:\Windows\SysWOW64\stdole2.tlb"
    - which is either faulty or sitting there in a wrong version
    - or is not included at all (as a reference) into the VB6-Project

    It is one of the already checked-in Default-References in a new VB6-Project (Friendly-Name = "Ole Automation").

    In your shoes, I would try to:
    - open a brand-new, virginal VB6-Form-Project
    - check, whether it has a reference to "Ole Automation"
    - if yes, include your "Problem-Gif" (in a similar way as in your other APP)
    - try to compile and see what happens

    Olaf

  12. #12

    Thread Starter
    New Member
    Join Date
    Nov 2021
    Posts
    7

    Re: VB6 Compiler Stopped Working ...

    Update ... After applying some of the suggestions above, here's I stand right now ...
    1) The original icon was 32x32. I changed this to 16x16 and was able generate the EXE.
    2) After performing step 1 above, I went back, added the company logo (GIF), and was then able generate the EXE (strange).
    So at this point, it would "appear" to be related to the icon. However, I'm still not sure how this effected the GIF when no icon was being used.

    That being said, I'm still puzzled as to what's going on here. As mentioned before, I've used these same 2 files (company_logo.gif & company_form.ico) for years on several projects. And I now have 9 more projects to update. What's going to happen now? Will some update, and some not? I guess I'll find out.

    However, I am curious on Schmidt's post regarding the "OLE Automation" (C:\Windows\SysWOW64\stdole2.tlb). This is being included automatically at the start of a new project. How can I determine if it is the correct version?
    - Included in VB6 binaries: stdole2.tbl 17.5kb 06/17/1998
    - Currently in syswow64: stdole2.tbl 18.0kb 12/07/1999

    Once again, any help would be GREATLY appreciated !!!

    Mark

    Windows 10 / 64bit / 21H2 / 19044.1348
    VB6 / SP6 / SP6-KB896559 / SP6-KB2708437 / SP6-KB3096896

  13. #13
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    4,877

    Re: VB6 Compiler Stopped Working ...

    The date of the version in SP6 is 2002/05/08
    The date of the version in my SysWOW64 is 2019/12/07 ..


    Is there a typo in the year??
    Currently in syswow64: stdole2.tbl 18.0kb 12/07/1999

  14. #14

    Thread Starter
    New Member
    Join Date
    Nov 2021
    Posts
    7

    Re: VB6 Compiler Stopped Working ...

    my bad ...
    - Currently in syswow64: stdole2.tbl 18.0kb 12/07/2019 @ 4:09am

  15. #15

    Thread Starter
    New Member
    Join Date
    Nov 2021
    Posts
    7

    Re: VB6 Compiler Stopped Working ...

    ISSUE RESOLVED !!!

    After many attempts using the suggestions above, I was able to get the code to compile. However, the very next day, the same code (untouched) would not compile. That reminded me of a similar situation I had in the past, where I had a script that would copy an EXE file from the NAS to my laptop. Sometimes the file would copy, and sometimes it would not. As it turned out, our Enterprise Anti-Virus solution was blocking the action (most of the time). So I turned to the IT security team to look into my compile issue. Low and behold, this is what was causing my compile issues. Once the exceptions were put in, I was back in business. So as it turned out, it was not the icons or the GIF causing the issue, it was the antivirus solution (of course I still don't know why it would compile without the icon and GIF).

    In any event, I would like to thank everyone for your help !!!

    There is one other issue I'm experiencing, but I will start a new post for that one.

    Once again, THANKS AGAIN to EVERYONE !!!

    Mark

    Windows 10 / 64bit / 21H2 / 19044.1348
    VB6 / SP6 / SP6-KB896559 / SP6-KB2708437 / SP6-KB3096896

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