Decrypting the FORMPIC

Author: dennis.vorst@uniface.com (Dennis Vorst)

In Uniface 7 it was possible to read the contents of the formpic field by adding dummy code like "$1 = 0" in the decrypt trigger of the field.
http://users.senet.com.au/~mjbone/UnifHint.html

However this no longer works in Uniface 9. Any thoughts on how to decrypt this field so that we can access the information in the field?

Kind regsards,

Dennis Vorst
Material ICT Solutions

2 Comments

  1. Hi Dennis

    One of the easiest ways is to use an XML export and process it with standard XML tools.

    Or you can offload/reload FORMPIC using filedump/raw and fileload/raw

    Uli


    Author: ulrich-merkel (ulrichmerkel@web.de)
  2. Hoi Dennis,

    In case you're using Uniface 9.4 then you can "simply" use the $encode function to "decrypt" the FORMPIC.

    The following Proc will first decrypt the content of the FORMPIC and assign it to the RAW variable rFormPic. You then can do the "required maniplations" on rFormPic and once you're finished the "updated" FORMPIC information is assigned back to FORMPIC.UFORM.

    variables
        raw rFormPic
    endvariables

    rFormPic = $encode("URAW", FORMPIC.UFORM)
    ; ...
    FORMPIC.UFORM = $encode("USTRING", rFormPic)

    I also had a quick look at the mentioned sample from Michael Bone (http://users.senet.com.au/~mjbone/UnifHint.html) and it is quite easy to update it so that it uses the mentioned version 9.4 functionality (see related content).

    Hope this helps.

    Regards,
    Daniel

    P.S. Needless to say that the described manipulation of the FORMPIC is not supported by Compuware. ;-)

    ***
    DISCLAIMER: PLEASE BE AWARE THAT THE PROVIDED INFORMATION IS SUPPLIED "AS IS". COMPUWARE DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. USER ASSUMES RESPONSIBILITY FOR ANY USE OF THE PROVIDED INFORMATION. COMPUWARE RESERVES THE RIGHT TO CHANGE OR REMOVE THE MENTIONED FUNCTIONALITY FROM A FUTURE VERSION OF UNIFACE WITHOUT ANY PREVIOUS NOTICE OR WARNING.


    Author: diseli (daniel.iseli@uniface.com)