Web Connection
Error compiling EXE
Gravatar is a globally recognized avatar based on your email address. Error compiling EXE
  Luca
  All
  Jul 6, 2021 @ 11:32pm

Dear Rick,
I buyed a new laptop with Windows 10 Pro, installed VFP 9, SP2 and WC as usual.
I can work in development environment and project runs rightly by selecting main prg and clicking Run button.
However if I compile EXE I get a strange error "function agrument value, type or count is invalid" without any other detail.

The error comes when the FoxPro status bar shows "creating type library and registering COM component", but I am not sure it is important.
I do not get any error rebuilding project or compiling application (App), the error comes only compiling Win32 executable of Web Connection project, previous projects not-WC are not affected from this problem.
Double clicking on EXE manually opens a window "Do" asking for an fxp file and the application starts only if I select manually the fxp of main prg (tlkmain.fxp in this example).

I do not get this error on previous machine with Windows 7.
There is the same antivirus on both machines (BitDefender), I tried also to disable BitDendender on new machine, but the error persists.
Please what is wrong?
I am seriously worried.
Thank you very much for support!

Gravatar is a globally recognized avatar based on your email address. re: Error compiling EXE
  Rick Strahl
  Luca
  Jul 7, 2021 @ 09:58am

Make sure you run as Administrator in order to compile your EXE as it contains a COM component that has to be stored in the registry.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Error compiling EXE
  Luca
  Rick Strahl
  Jul 7, 2021 @ 12:22pm

Dear Rick,
I uninstalled VPF9 and reinstalled it with SP2 (VFP 9.0.0.5815).
I did run as administrator but unfortunately I have the same error on all Web Connection projects, while standard FoxPro projects compile EXE rightly.
Maybe I have to install Web Connection as administrator?
Maybe to use VirtualBox?
I have not this error on Windows 7 with the same projects.
Please help me!

Gravatar is a globally recognized avatar based on your email address. re: Error compiling EXE
  Rick Strahl
  Luca
  Jul 7, 2021 @ 01:36pm

Are you sure you're running as Administrator? Use Run As Administrator to launch FoxPro.

When in doubt remove the OLEPUBLIC clause from the main server class and try compiling again and see if the error goes away. It may be something different.

Actually just checked the error you get from a non-admin compile is something different so that's not the problem.

Not sure what the issue is then. I've run into this too (on other projects as well) but I can't recall what the issue is. Do a build with error tracking on and look at the error file after compilation.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Error compiling EXE
  Luca
  Rick Strahl
  Jul 7, 2021 @ 11:22pm

Dear Rick, you are mythical!
Problem solved by removing the OLEPUBLIC clause from the class, without even having to run FoxPro as an administrator.
This explains why the problem only occurred in Web Connection projects.
Finally I can start to work on Windows 10 with FoxPro and web Connection, hopefully for many years to come.
Many greetings from Italy.
Sincerely

Gravatar is a globally recognized avatar based on your email address. re: Error compiling EXE
  Luca
  Rick Strahl
  Jul 8, 2021 @ 02:13am

I have a new problem now, in practice I am still at the starting point... I am starting to hate Windows 10
If I run a webpage (from executable) with wwDatePicker object, the wwDatePicker is not more visible and I see "select date" on its place.
If I run a webpage (from development environment) with wwDatePicker object, the wwDatePicker is visible.
How other customers of you are able to compile West Wind executables on Windows 10?
I tried to access as super administrator, but I got the same error by compiling the executable.
Maybe the solution to remove OLEPUBLIC clause is not right.

How build with error tracking on to look at the error file after compilation?
I do not see any err file in curdir.

I have found I can run an executable with the command line:
C:\Wconnect\MyProject.exe MyProjectMain.fxp
hovever I have to deliver both EXE and FXP files to customer, not much professional.

Many thanks again for support!

Gravatar is a globally recognized avatar based on your email address. re: Error compiling EXE
  Rick Strahl
  Luca
  Jul 8, 2021 @ 11:59am

Well if taking the OLEPUBLIC out solves your problem then there's some sort of permission problem on your machine - either writing to the registry or generating the related output files.

I've run into this before but I can't recall what the solution was at the time.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Error compiling EXE
  Rick Strahl
  Luca
  Jul 8, 2021 @ 12:02pm

None of that should be necessary - there's something else going on here.

I suggest:

  • Delete all your FXP files in the project and subfolders
  • Rebuild your project

Also make sure that you have the same version of FoxPro installed including the same service packs you had before. If you compile against a mismatched version of the runtime vs. what the IDE is running that can cause problems.

FWIW, this has nothing to do with Windows and all to do with your FoxPro configuration.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Error compiling EXE
  Luca
  Rick Strahl
  Jul 8, 2021 @ 10:20pm

Nothing to do, the compiling error remains in Web Connection projects.
I removed the OLEPUBLIC clause from main class to be able to compiling executables.
I have to specify manually ButtonImage in every wwDatePicker object of every webpage to view the calendar image.
I hope this is the only consequence.

Gravatar is a globally recognized avatar based on your email address. re: Error compiling EXE
  Luca
  Rick Strahl
  Jul 12, 2021 @ 08:54pm

Dear Rick,
in Windows 10 I see the IUSR user is the only one to have not write rights on Wconnect folder.
By giving write rights to IUSR user on Wconnect folder finally I am able to build executables.
I can restore the OLEPUBLIC clause on main class.
Problem solved.

© 1996-2021