Server threw an exception error in Windows98, VFP7 as COM

If you are a VFP developer and have any questions about using our products from VFP here is the place to post them.
Post Reply
TimoZuidema
Posts: 3
Joined: Thu May 15 2003
Location: Amsterdam, The Netherlands
Contact:

Server threw an exception error in Windows98, VFP7 as COM

Post by TimoZuidema »

Hi,

We are deploying our application with PDF Converter 2.08d.
The application functions normally when run interactively on all platforms.
When we try to create our app as a COM server on Windows 95, 98 or ME, data access commands which normally function like RLOCK, give an error 'OLE error code 0x80010105: The server threw an exception.'.
On examining the code, it looked like fox internally is 'corrupt', changing the call from

Code: Select all

lvar_name=RLOCK('0')
to

Code: Select all

=RLOCK('0')
made the error occur on another, later statement.
When we disable PDFDriver init code the COM server can be created normally, always.

We're initializing the driver with the following calls:

Code: Select all

pdfdriverinit(cPrinterName)
followed by

Code: Select all

driverinit(cPrinterName)
Both are loaded from the fllintf.fll.
This is done in the init of our application.

Anyone seen anything like this, some suggestions perhaps?
We tried our application on different machines, a clean installed Me and windows 98 to no avail.

Greetings,
Timo Zuidema
AccountView BV
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

I didn't face this issue before but I could give you some suggestions:

Please run Install.exe to install the PDF Printer on the server, than in your application please remove the call to PDFDriverInit().


This should help.
TimoZuidema
Posts: 3
Joined: Thu May 15 2003
Location: Amsterdam, The Netherlands
Contact:

Post by TimoZuidema »

Hi,

Thanks for your suggestion. We included the PDFDriverInit to cover for all cases where users deleted the pdf printer.
We can change that code to only run PDFDriverInit when running our app interactively, if that would solve the exception errors.

We already changed some code: both init calles were removed from the init of our app, which removed the Exception on startup. PDF driver initializing now just happens just before the user prints a first PDF report.
This changed COM behaviour somewhat: when we print a report via COM to PDF on a Windows 9x machine, the following error occurs: 'OLE IDispatch exception code 0 from ?: ?..'
At least, we can now run our app from COM on win9x/me machines.

We just removed the PDFDriverInit code from our PDF driver initializing code, but that didn't change that behaviour, same OLE IDispatch error.

Hope you got some more suggestions,

Timo
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Please update to version 2.09 of the PDF Converter from: http://www.amyuni.com/en/support/updates.html

Our latest release of the PDF Converter is 2.10d but 2.09 is the latest update for 2.0x and it should help.

Please note that you need to call PDFDriverInit() when launching your application and not every time you print. Also when calling PDFDriverInit or DriverInit when launching your application there is no need to call DriverInit at some other stages of your code.

Hope this helps.
TimoZuidema
Posts: 3
Joined: Thu May 15 2003
Location: Amsterdam, The Netherlands
Contact:

Post by TimoZuidema »

Hi Joan,

We downloaded and tried the 2.09 version, but no change in behaviour.

By the way, we do not call the PdfDriverInit function (in current build, under test). The DriverInit function is only called when the user is going to print for the first time, so only once for each user.
When we called the DriverInit function in the Init of our application, we got the original error. Didn't retry that with 2.09 though.

The solution we're settling for leaves our customers on Windows 9x/Me who use COM to run our app without an PDF export.

We're going to implement 2.1 in a couple of weeks, to be shipped in our fall release. We're going to retest this issue then.

Greetings,
Timo.
Post Reply