VpeSetupPrinter - Migrate to VPE7.1

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

VpeSetupPrinter - Migrate to VPE7.1

Postby ds-hanau » Thu Dec 28, 2017 1:04 pm

Hello VPE Team

We haved used VPE 6.0 for several years right now and we want to migrate to VPE7.1.
We made some experiences that if we load the PRS files with version VPE7.1, which are initially stored by VPE6.0, our system crashes (sometimes immediate, sometimes after a while).
Do we have to delete all PRS files during migration?

Do you have implemented a funtion which can determine with which version a PRS file was saved? In order to delete the old PRS file at runtime ..

Thanks for your support
Andrej
ds-hanau
 
Posts: 16
Joined: Tue Jun 30, 2015 1:56 pm

Re: VpeSetupPrinter - Migrate to VPE7.1

Postby IDEAL Software Support » Thu Dec 28, 2017 1:52 pm

The PRS file format has not changed since v3.x. As written in the manual, the PRS files store private printer-driver data. If you change the printer-driver version or the platform (i.e. 32-bit vs. 64-bit), this may cause that the private data is no longer compatible with the driver, thus resulting in a GPF.
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm

Re: VpeSetupPrinter - Migrate to VPE7.1

Postby ds-hanau » Wed Jan 03, 2018 2:25 pm

Thanks for reply.
Is there a possibility to check if a prs file still fits to s specific printer?
Because sometimes we do not notice if a printer driver has changed and therefor our application crashes when reading the prs file ...
Unfortunately sometimes the crash happens seconds or minutes after reading the prs file and then we do not event know the reason for the crash.

It would be easier if we could avoid a systemcrash

Thanks
Andrej
ds-hanau
 
Posts: 16
Joined: Tue Jun 30, 2015 1:56 pm

Re: VpeSetupPrinter - Migrate to VPE7.1

Postby IDEAL Software Support » Wed Jan 03, 2018 2:50 pm

See the section "Printer Setup" in our manual / help file titled "Programmer's Manual". There, the structure of the PRS file is documented. The last part of the PRS file holds a DEVMODE structure, which contains printer driver information. It belongs to the Windows API, therefore it is documented by Microsoft.

To ensure compatibility, we recommend to check the following four members of the DEVMODE structure:
WORD dmSpecVersion;
WORD dmDriverVersion;
WORD dmSize;
WORD dmDriverExtra;

In addition you should check the following two members, which are part of the PRS file.
DWORD Version;
WORD Platform;

If Version is changed, you need to abort reading the PRS file and consult the latest version of the "Programmer's Manual", to understand the new PRS file structure. It is not going to change in the foreseeable future.

If Platform is not compatible to the operating system, you should also abort reading the PRS file.
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 7 guests

cron