VpeSetEditProtection

<< Click to Display Table of Contents >>

Navigation:  Management Functions >

VpeSetEditProtection

Previous pageReturn to chapter overviewNext page

[Professional Edition and above]

The Visual Designer dycodoc can read and edit VPE Document files which have been created with the VPE Professional Edition or any higher edition.

If you want to protect your VPE Document files so they can not be read by dycodoc, call this function. In both cases - either if a document was opened with VpeOpenDocFile() or if you call VpeWriteDoc() - the created VPE document file will be protected.

Once you have called this function, it is impossible to unprotect the document.

[Interactive Edition only:]

If the EditProtection is enabled, the interactive objects stored in VPE Document files are not editable within VPE, nor VPEView.

void VpeSetEditProtection(

VpeHandle hDoc,

int reserved

)

VpeHandle hDoc

Document Handle

int reserved

You must assign the value "1" to this property! Different values are reserved for future extensions. Do not assign any different value!

Default:

0 = the current document is not protected from being edited with dycodoc

Remarks:

Once you have called this function, it is impossible to unprotect the document.

For security reasons, dycodoc can not read VPE Document files which have been created with any release prior to VPE v3.20.

Example:

VpeSetEditProtection(hDoc, 1);

VpeWriteDoc(hDoc, "my_file.vpe");

Activates the edit protection and writes the current document as protected file to disk.