levelii

Upload: fanepix

Post on 04-Jun-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 Levelii

    1/3

    APPLICATION DISTRIBUTION WITH BRANDED LEVEL II FILES====================================================

    The LEVII_?0.APP's------------------ LEVII_50.APP (VFP 5.0) LEVII_30.APP (VFP 3.0)

    These APP's for Visual FoxPro 3.0 and 5.0 allowprocessing of the FoxPro application and runtime files toenable them to be run without affecting existing non-branded(or differently branded) FoxPro applications. This isachieved by ensuring the branded FoxPro runtime files: VFP300.ESL for VFP 3.0

    VFP500.DLL for VFP 5.0can be referenced only by the associated branded application.This requires the EXE file to reference an alternate registryentry:

    VisualFoxProRuntime for VFP 3.0 VisualFoxProRuntime.5 for VFP 5.0The new references must be the same length as the original, sothe APP's will pad out shorter references to the required lengthwith "_" characters and truncate longer ones. The registry entrynormally points to the \WINDOWS\SYSTEM directory where the

    runtime ESL/DLL typically resides. It is this reference thatwhen changed allows the location and name of the runtime file to bemodified to your choice. The dependencies are as follows:

    FoxPro Application EXE \ \ (internally holds) \ Registry Entry \ \ (points to) \ ESL/DLL location

    Branding Using ReFox and Level II Apps--------------------------------------1. Produce your VFP EXE application file(s) as normal, with compile set as ENCRYPTED in the project. eg C:\MYSTUFF\MYAPP.EXE

    2. Copy the VFP500.DLL or VFP300.ESL runtime into your app directory, and optionally rename. Also copy the resource DLL files into this directory.

    3. Load ReFox, ensure options shows Level II Branding.

    Also the timestamp of the VFP DLL/ESL can be changed, this would be reflected when issuing a VERSION(1), and may therefore help to identify whether a normal or branded VFP DLL/ESL is being run. The timestamp can be modified to custom values by specifying the new value.4. Brand, Select your EXE files and the corresponding runtime DLL/ESL, and then enter the branding password. Check branding of EXE is successful by selecting and seeing if ReFox no longer recognises it as FoxPro code (just displays file contents). Quit ReFox.

  • 8/13/2019 Levelii

    2/3

    5. Load Visual FoxPro

    6. Run LEVII_?0.APP, parameters are : (i) Your new Application Registry entry (ii) New location and name of branded VFP runtime DLL (iii) Location and name of branded FoxPro EXE (optional)

    eg =LEVII_50('MyFoxProAPP','C:\MYSTUFF\VFP5X.DLL',; 'C:\MYSTUFF\MYAPP.EXE')

    7. Run your EXE, which should now work relying only on the specified branded VFP Runtime DLL/ESL.

    eg C:\MYSTUFF\MYAPP.EXE

    8. This has set up the application in this current environment only.

    It is likely that your own installer program can make Registry updates, so after running LEVII_?0.APP to modify the EXE and DLL/ESL files, you just need the installer program to update the registry with the same value as passed as the first parameter to the LEVII_?0.APP.

    The LEVII_?0.APP's create a LEVEL2.REG registry file so the registry options can be seen. Registry files can be imported or processed by clicking on them in the Explorer.

    Sample LEVEL2.REG file----------------------

    REGEDIT ; Registry entry for ReFox level 2 branded app : c:\vfp5\orb2.exe HKEY_CLASSES_ROOT\MyVisualFoxProApp____ = Microsoft Visual FoxPro 5.0 Runtime HKEY_CLASSES_ROOT\MyVisualFoxProApp____\shell\open\command = C:\VFP5\VFP500.DLL %1

    OTHER APPROACHES================

    Visual FoxPro 5.0 -D startup switch-----------------------------------Visual FoxPro can specify an alternate runtime DLL file by useof the startup switch -D.

    eg Branded Level 2 DLL located in C:\VFP\RUNTIME

    Start branded VFP apps with MYAPP.EXE -DC:\VFP\RUNTIME\VFP500.DLLThe disadvantage of this is that users may create shortcuts to theapplications and lose the startup switch, causing the application tofail with incorrect version errors. Care should be taken that thecorrect FoxPro version specific resource file is also used.For example, the VFP5ENU.DLL resource from 5.0 will not work with5.0a version. This file can also be mentioned by the -L startupswitch. Spaces are not allowed in the directory or between the

  • 8/13/2019 Levelii

    3/3

    switch and the path.

    MYAPP.EXE -DC:\VFP\RT\VFP500.DLL -LC:\VFP\RT\VFP5ENU.DLL

    Applications Compiled Non-Encrypted-----------------------------------Applications that are not compiled with the ENCRYPT option stillwork with a branded level II runtime file.

    Xitech Cryptor 2.5 Users------------------------Cryptor users who wish to modify the Visual FoxPro runtime fileto another name should contact Xitech who can give directions topatch the FLL accordingly. Cryptor will otherwise give an"unable to initialize" error if running with a non-standard namedruntime DLL file.

    email: [email protected] tel: +44 (0)1707 276637

    fax: +44 (0)1707 267777

    web: http://www.xitech-europe.co.uk