Foxpro

VFP

=-=-=-=-=-=-=-=-=-=-=-

encryption and zip

https://www.sweetpotatosoftware.com/blog/index.php/2009/08/09/major-vfp-encryption-update/

https://www.sweetpotatosoftware.com/blog/index.php/2005/09/01/visual-foxpro-encrypt-and-decrypt-files/

vfpencryption71.fll if you prefer. This uses the same runtimes that VFP 9 uses.

https://www.foxite.com/articles/read.aspx?id=81&document=extending-craig-boyds-vfpcompressionfll

http://doughennig.com/papers/

http://doughennig.com/papers/Pub/201103dhen.pdf

http://doughennig.com/papers/Pub/201101dhen.pdf

=-=-=-

7zip

https://www.foxite.com/archives/using-7zip-with-foxpro-0000389594.htm

https://sevenzip.osdn.jp/chm/cmdline/switches/

Compression method: LZMA2 is the default in this example is Zzip2
7za u -mx1 -mhe -m0=BZip2 -pPASSWORD Backup.7z ./FILES/*

-mx1 is the fastest compression

-mx9 is the most compression

-aot auto rename existing file (for example, name.txt will be renamed to name_1.txt).

Dictionary size: is -md4m for 4MB and -md128m was the maximum I got without error

Word size: -mfb273 is the max and worked

Solid Block size: -ms64g   worked for 64GB

Number of CPU threads: -mmt4

Encryption method: is AES-256 by default
 

7z a -mx9 -md128m -mfb273 -ms64g -mmt4 -pAmirsToughPassword C:\amirarchive.7z c:\amirfiles\*.*

https://axelstudios.github.io/7z/#!/

https://archive.codeplex.com/?p=DotNetZip

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Foxpro web application:

Yousfi very advanced programs: http://yousfi.over-blog.com/tag/javascript/

https://www.foxite.com/archives/run-javascript-from-vfp-0000242619.htm

SqlExec()

SPT: http://fox.wikis.com/wc.dll?Wiki~SQLPass-Through

http://www.yaldex.com/fox_pro_tutorial/html/8dd6491b-da44-401f-b972-0d51f12f1a07.htm#codeExampleToggle

=-=-=-=-=-=-=-=-=-=-=-

HTTP download system using ULRMON.DLL for years with no problem, but no security:

DECLARE LONG URLDownloadToFile IN URLMON.DLL ;
LONG, STRING, STRING, LONG, LONG
nGetResults = URLDownloadToFile(0, cHttp_file, cDownload_file, 0, 0)

=-=-=-=-=-=-=-=-=–=

POSTing a CSV from FoxPro to an url

The URLMON library contains this function, URLDownloadToFile, which is a way
to download files without user prompts. The ExecWB( _SAVEAS ) function always
prompts the user, even if _DONTPROMPTUSER parameter is specified, for “internet
security reasons”. This function gets around those reasons.
pCaller”>Pointer to caller object (AX).</param>
szURL”>String of the URL.</param>
szFileName”>String of the destination filename/path.</param>
dwReserved”>[reserved].</param>
lpfnCB”>A callback function to monitor progress or abort.</param>

DECLARE INTEGER URLDownloadToFile ;
     IN URLMON.DLL ; 
INTEGER pCaller, ;
 STRING szURL, ;
 STRING szFileName, ; 
INTEGER dwReserved, ;
INTEGER lpfnCB

webPage = some_url
txtFile = some_result_text_file

urlCall = URLDownloadToFile( 0, webPage, txtFile, 0, 0 )
USE MyData
COPY TO MyData.csv TYPE delimited
USE
LOCAL lcMyData
lcMyData = FILETOSTR("MyData.csv")

LOCAL xhr
xhr = CREATEOBJECT("Microsoft.XMLHTTP")
xhr.Open("POST", "http://www.mydomain.com/posthandler.asp", .f.)
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded')
xhr.send("data=" + lcMyData)

LOCAL lcResultText
lcResultText = xhr.responseText;

? lcResultText
xhr = null

 

 

 

 

Posting an XML file to a web service  

LOCAL WS AS MSXML2.ServerXMLHTTP60

* the object to handle the communication to the server
m.WS = CREATEOBJECT("MSXML2.ServerXMLHTTP.6.0")

LOCAL URL AS String

* the location of the service that receives the data
m.URL = "http://www.example.com"

LOCAL XMLFilename AS String

* your XML data
m.XMLFilename = GETFILE("xml")

* post the file contents
m.WS.Open("Post", m.URL, .F.)
m.WS.Setrequestheader("Content-type", "text/xml")
m.WS.Send(FILETOSTR(m.XMLFilename))

* get the http status code
? m.WS.Status, m.WS.Statustext 

-=-=-=-=-=-=-=-=-=-

loGatewayService = CREATEOBJECT("MSSOAP.SoapClient30")
loGatewayService.MsSoapInit("http://....SomeWebService....

like it is suggested in this thread :
http://www.tek-tips.com/viewthread.cfm?qid=1399175&amp;page=1

and I added this before calling the web service :

loDOM = Createobject("MSXML.DomDocument")
loDOM.LoadXML(lcXML)

-=-=-=-=-=–=

URL encoding/decoding:

http://fox.wikis.com/wc.dll?Wiki~Encode/DecodeURL/URI/URIcomponentclass

http://fox.wikis.com/wc.dll?Wiki~ListCategories

=-=-=-=-=-=-=-=-=-=-=-=-

CA connect to other databases

lodo = CreateObject("CursorAdapter")
lodo.DataSourceType="ODBC"
lodo.DataSource=SQLStringConnect("DRIVER=SQL Server;Network=DBMSSOCN;SERVER=w2kas;database=(local);uid=sa;pwd=")
lodo.SelectCmd="select * from foo"
lodo.CursorFill()
Browse

=-=-=-=-=-=-=-=-=-

http://www.foxtools.com/vfp/foxpro-tools

Visual Foxpro Tools

 

Miscellaneous
CodeBlock Stonefield Systems Group Inc
Focus.fll August Technologies (Makers of jKey.fll)
MoleBox(Application Packager) FoxRunner (Automated Application Testing)
VMWare (Multiple Virtual Machines) InstaFox (Installation software written in FoxPro)
Beyond Compare (File comparison utility) Inno Setup(Installation Software)
Tame (16bit apps on NT\2000) Cryptor (Data encryption software)
The Armadillo (Software protection system) VFPSkins
FoxWeb Full-Text Search Engine  
FoxUnit (FoxPro Testing Software)  Client Server
VFP Compiler SunLINE SDK
   
ActiveX Controls Report Printing\Writers
LeadTools (Imaging) DBi Technologies Amyuni Technologies Virtual Print Engine
Classy Components Inc. Data Dynamics XFRX UserQ
Animated Gif’s GridEX WinPrint PDF Solutions
bbControls TX Text Control Win2PDF pdfFactory
Sub Systems     iSEDQuickPDF
MarshallSoft – Email, FTP, Serial Communication Mind’s Eye Report Engine CutePDF
PC Guard – Copy Protection Frx2Any List & Label
  Foxfire! R&R Report Writer
Quick Books Integration Visual Report Engine Pro(VisualRep) Crystal Reports
iBiz Integrator for QuickBooks DataBlox Stonefield Query Report Manager
 CoreObjX    FoxyPreviewer  FoxBarcode
       
       
      Here is a comparison chart on the Wiki
   
Quick Books Articles File Synchronization
ITA – Importing into QB Intuit Developer Site vuBrief
QB SDK Example    
   
Help Files Remote Application Maintenance
Help&Manual Help to RTF pcAnywhere GoToAssist
HTML Help Builder   GoToMyPc  
    Virtual Network Computing (VCN)
.  
   
Screen Cature\AVI Files File Conversion
HyperCam TechSmith SE Tools  
HardCopy ScreenCam  
   
 
Telephony Data Recovery\Fix
ExceleTel Recover FoxFix
  Stonefield Database Toolkit DBF Doctor
  DBF Recovery  
   
Data Compression Credit Card Processing
ZLIB(Free) DynaZip Medasyst XCharge
   

 

   
Codebook and Related Links
Edward Leafe Consulting Wiki-CodeBook

 

 

https://www.lianja.com/overview/lianja-app-builder

——————————

VFPX:

Visual FoxPro Community effort to create open source add-ons for Visual FoxPro 9.0.

https://vfpx.github.io/projects/


INKEY( ) Function

Returns a number corresponding to the first mouse click or key press in the type-ahead buffer.

INKEY([nSeconds] [, cHideCursor])

Parameters

nSeconds
Specifies the number of seconds to wait for a keystroke. If you do not specify a value for nSeconds, INKEY( ) returns a value for a keystroke immediately. If nSeconds is 0, INKEY( ) waits indefinitely for a keystroke.
cHideCursor
Shows or hides the cursor, or checks for a mouse click. The following table lists values for cHideCursor.

cHideCursor Description
S Show cursor.
H Hide cursor.
M Check for a mouse click.
E Expand the keyboard macro if a keyboard macro is assigned to a key or key combination. To return successive values for each keystroke in a macro, execute INKEY( ) repeatedly with E included.
NoteNote
If both S and H are included in cHideCursor, the latter character specified takes precedence. You can combine values for cHideCursor, for example, to check for a mouse click and show the cursor, include M and S. To check for a mouse click and hide the cursor, include H and M. INKEY( ) disregards characters other than S, H, M, and E in cHideCursor.
Numeric. INKEY( ) returns 0 if a key has not been pressed. If several keys are present in the type-ahead buffer, INKEY( ) returns the value of the first key entered in the buffer. INKEY( ) also returns the following values according to certain conditions:

 

  • If M is included for cHideCursor, INKEY( ) returns the value 151.
  • If E is included, INKEY( ) returns a value corresponding to the first keystroke assigned to the keyboard macro. If you omit E, INKEY( ) returns the value for the key or key combination that triggers the keyboard macro.
  • For single keys and key combinations using the SHIFT, CTRL, and ALT keys, the following table lists the return values for INKEY( ). A dash (–) indicates that the key combination returns no value.
    Key Alone SHIFT CTRL ALT
    F1 28 84 94 104
    F2 –1 85 95 105
    F3 –2 86 96 106
    F4 –3 87 97 107
    F5 –4 88 98 108
    F6 –5 89 99 109
    F7 –6 90 100 110
    F8 –7 91 101 111
    F9 –8 92 102 112
    F10 –9 93 103 113
    F11 133 135 137 139
    F12 134 136 138 140
    1 49 33 120
    2 50 64 121
    3 51 35 122
    4 52 36 123
    5 53 37 124
    6 54 94 125
    7 55 38 126
    8 56 42 127
    9 57 40 128
    0 48 41 19
    a 97 65 1 30
    b 98 66 2 48
    c 99 67 3 46
    d 100 68 4 32
    e 101 69 5 18
    f 102 70 6 33
    g 103 71 7 34
    h 104 72 127 35
    I 105 73 9 23
    j 106 74 10 36
    k 107 75 11 37
    l 108 76 12 38
    m 109 77 13 50
    n 110 78 14 49
    o 111 79 15 24
    p 112 80 16 25
    q 113 81 17 16
    r 114 82 18 19
    s 115 83 19 31
    t 116 84 20 20
    u 117 85 21 22
    v 118 86 22 47
    w 119 87 23 17
    x 120 88 24 45
    y 121 89 25 21
    z 122 90 26 44
    INS 22 22 146 162
    HOME 1 55 29 151
    DEL 7 7 147 163
    END 6 49 23 159
    PAGE UP 18 57 31 153
    PAGE DOWN 3 51 30 161
    UP ARROW 5 56 141 152
    DOWN ARROW 24 50 145 160
    RIGHT ARROW 4 54 2 157
    LEFT ARROW 19 52 26 155
    ESC 27 –/27 –*/27 –*/1
    ENTER 13 13 10 –/166
    BACKSPACE 127 127 127 14
    TAB 9 15 148/* *
    SPACEBAR 32 32 32/– 57
    ` or ~ 96 126 41
    – or _ 45 95
    = or + 61 43 13
    [ or { 91 123 27 26
    ] or } 93 125 29 27
    \ or | 92 124 28 43
    ; or : 59 58 39
    ‘ or “ 39 34 40
    , or < 44 60 51
    . or > 46 62 52
    / or ? 47 63 53

    * Keystroke reserved by Windows.