Is the closeDoc-functioncall mandatory?

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

Is the closeDoc-functioncall mandatory?

Postby IDEAL Software Support » Tue Nov 23, 2004 5:35 pm

Hi,

The common sequence of function calls envisions that every virtual
document is closed with "CloseDoc" in the end.
In our Application we leave the document open and the form
containing the VPE-Engine is destroyed only when the user wishes to
print a new form and a new VPE is openend.
Should we call "CloseDoc" before destroying the form with the VPE?
What happens if we don't (that's what we do at the moment)?

Thanks for advice!

Daniela
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby IDEAL Software Support » Tue Nov 23, 2004 5:36 pm

The CloseDoc() call is not mandatory. If VPE is connected to a form
(this is usually the case when using the VPE ActiveX, the Winforms
VPE.NET component or the Delphi / CBuilder VCL), VPE will call
CloseDoc() internally, when the form is closed, regardless whether the
preview is shown or not.

The CloseDoc() call is mandatory in the following cases:
* You are using the VPE-DLL and have set hwndParent = NULL as parameter
for VpeOpenDoc().
* You are using the the ASP.NET component of VPE.

Note: in any case all documents that belong to your application are
closed, when your application terminates. (Be careful with ASP and
ASP.NET, the Internet Information Server might hold VPE "alive" in
memory, so calling CloseDoc() is mandatory for ASP and ASP.NET.)

Regards
Thorsten Radde
IDEAL Software GmbH
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 33 guests