Syntax
VM_RESULT vm_pmng_exit_and_update_application(
    VMCWSTR filename, 
    const VMCHAR* key, 
    VMINT key_length, 
    VM_PMNG_ENCRYPTION encryption
);
ContentsIndex
PreviousUpNext
vm_pmng_exit_and_update_application
Syntax
VM_RESULT vm_pmng_exit_and_update_application(
    VMCWSTR filename, 
    const VMCHAR* key, 
    VMINT key_length, 
    VM_PMNG_ENCRYPTION encryption
);
Description

For application update. A LinkIt application may call this function to quit and update itself by assiging path to the new VXP executable. The framework would verify the integrity of the new VXP executable, and update the executable. 

While the SDK does not provide facility to encrypt the VXP binary, 3rd party software may be used to encrypt the binary with supported encryption method. This method is defined by the VM_PMNG_ENCRYPTION. In this version of SDK only DES encryption is supported. 

If update succeeded, the new VXP executable replaces the original executable and launches. 

If update failed, the original VXP executable is launched again, and a system message VM_MSG_UPDATE_FAIL is sent with the parameter VM_PMNG_UPDATE_RESULT.

Parameters
Parameters 
Description 
VMCWSTR filename 
[IN] The full path to the new application executable. 
const VMCHAR* key 
[IN] The key to decrypt the executable. Pass NULL if the new app have no encryption. 
VMINT key_length 
[IN] Length of key, Pass 0 if there is no ecryption. 
VM_PMNG_ENCRYPTION encryption 
[IN] encryption method, see VM_PMNG_ENCRYPTION. Note that key must be NULL and key_length must be 0 if encryption is set to VM_PMNG_ENCRYPTION_NONE, otherwise VM_PMNG_UPDATE_ERROR_MISSING_ENCRYTION_METHOD may return. Currently, only DES encryption is supported, and developers should avoid padding during DES encryption. The file size of the encrypted executable must be the same as the un-encrypted executable, otherwise the application may fail to update. 
Returns

VM_RESULT. See VM_PMNG_UPDATE_RESULT for details.

File

vmsystem.h

Group
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.