home *** CD-ROM | disk | FTP | other *** search
FoxPro Memo File | 1998-05-26 | 266.5 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: FoxPro Memo File
(other/foxProMemo).
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
1%
| dexvert
| FoxPro Memo File (other/foxProMemo)
| magic
| Unsupported |
100%
| file
| Adobe Photoshop Color swatch, version 0, 4264 colors; 1st RGB space (0), w 0x40, x 0, y 0, z 0 ; 2nd RGB space (0), w 0, x 0, y 0, z 0
| default (weak)
| |
99%
| file
| FoxPro FPT, blocks size 64, next free block index 4264, field type 1, field length 478, 1st item "unsigned int _ActivateHandler(FPFI handler) "
| default
| |
98%
| file
| data
| default
| |
57%
| TrID
| Sybase iAnywhere memo files
| default
| |
42%
| TrID
| MacBinary 1
| default (weak)
| |
100%
| siegfried
| x-fmt/342 Microsoft FoxPro Memo
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 00 10 a8 00 00 00 40 | 00 00 00 00 00 00 00 00 |.......@|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000080| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000090| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 00 00 00 01 00 00 01 de | 75 6e 73 69 67 6e 65 64 |........|unsigned|
|00000210| 20 69 6e 74 20 5f 41 63 | 74 69 76 61 74 65 48 61 | int _Ac|tivateHa|
|00000220| 6e 64 6c 65 72 28 46 50 | 46 49 20 68 61 6e 64 6c |ndler(FP|FI handl|
|00000230| 65 72 29 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |er) | |
|00000240| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000250| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000260| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000270| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000280| 20 20 20 20 20 20 20 20 | 20 0d 0a 0d 0a 54 68 69 | | ....Thi|
|00000290| 73 20 65 78 61 6d 70 6c | 65 20 61 63 74 69 76 61 |s exampl|e activa|
|000002a0| 74 65 73 20 61 6e 20 65 | 76 65 6e 74 20 68 61 6e |tes an e|vent han|
|000002b0| 64 6c 65 72 20 77 68 65 | 6e 20 74 68 65 20 6c 69 |dler whe|n the li|
|000002c0| 62 72 61 72 79 20 69 73 | 20 6c 6f 61 64 65 64 2e |brary is| loaded.|
|000002d0| 20 20 54 68 65 20 65 76 | 65 6e 74 20 68 61 6e 64 | The ev|ent hand|
|000002e0| 6c 65 72 20 6a 75 73 74 | 20 70 72 69 6e 74 73 20 |ler just| prints |
|000002f0| 61 20 6d 65 73 73 61 67 | 65 20 61 6e 64 20 6c 65 |a messag|e and le|
|00000300| 74 73 20 46 6f 78 50 72 | 6f 20 70 72 6f 63 65 73 |ts FoxPr|o proces|
|00000310| 73 20 74 68 65 20 6d 65 | 73 73 61 67 65 20 61 73 |s the me|ssage as|
|00000320| 20 69 74 20 77 6f 75 6c | 64 20 6e 6f 72 6d 61 6c | it woul|d normal|
|00000330| 6c 79 2e 20 20 54 68 65 | 20 65 76 65 6e 74 20 68 |ly. The| event h|
|00000340| 61 6e 64 6c 65 72 20 69 | 73 20 64 65 61 63 74 69 |andler i|s deacti|
|00000350| 76 61 74 65 64 20 77 68 | 65 6e 20 74 68 65 20 6c |vated wh|en the l|
|00000360| 69 62 72 61 72 79 20 69 | 73 20 75 6e 6c 6f 61 64 |ibrary i|s unload|
|00000370| 65 64 2e 0d 0a 0d 0a 53 | 6f 6d 65 20 6d 6f 72 65 |ed.....S|ome more|
|00000380| 20 66 75 6e 63 74 69 6f | 6e 61 6c 20 65 78 61 6d | functio|nal exam|
|00000390| 70 6c 65 73 20 6f 66 20 | 65 76 65 6e 74 20 68 61 |ples of |event ha|
|000003a0| 6e 64 6c 69 6e 67 20 63 | 61 6e 20 62 65 20 66 6f |ndling c|an be fo|
|000003b0| 75 6e 64 20 69 6e 20 74 | 68 65 20 45 58 41 4d 50 |und in t|he EXAMP|
|000003c0| 4c 45 53 20 64 69 72 65 | 63 74 6f 72 79 20 61 73 |LES dire|ctory as|
|000003d0| 20 45 56 45 4e 54 2e 43 | 20 61 6e 64 20 53 57 41 | EVENT.C| and SWA|
|000003e0| 54 43 48 2e 43 2e 00 00 | 00 00 00 00 00 00 00 00 |TCH.C...|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 00 00 00 01 00 00 02 fa | 23 69 6e 63 6c 75 64 65 |........|#include|
|00000410| 20 3c 70 72 6f 5f 65 78 | 74 2e 68 3e 0d 0a 0d 0a | <pro_ex|t.h>....|
|00000420| 73 74 61 74 69 63 20 69 | 6e 74 20 48 61 6e 64 6c |static i|nt Handl|
|00000430| 65 72 49 44 3b 0d 0a 0d | 0a 2f 2f 0d 0a 2f 2f 09 |erID;...|.//..//.|
|00000440| 54 68 69 73 20 69 73 20 | 74 68 65 20 72 6f 75 74 |This is |the rout|
|00000450| 69 6e 65 20 74 68 61 74 | 20 69 73 20 72 65 67 69 |ine that| is regi|
|00000460| 73 74 65 72 65 64 20 61 | 73 20 61 6e 20 65 76 65 |stered a|s an eve|
|00000470| 6e 74 20 68 61 6e 64 6c | 65 72 2e 0d 0a 2f 2f 0d |nt handl|er...//.|
|00000480| 0a 46 41 52 20 45 76 65 | 6e 74 48 61 6e 64 6c 65 |.FAR Eve|ntHandle|
|00000490| 72 28 57 48 61 6e 64 6c | 65 20 74 68 65 57 69 6e |r(WHandl|e theWin|
|000004a0| 64 6f 77 2c 20 45 76 65 | 6e 74 52 65 63 20 46 41 |dow, Eve|ntRec FA|
|000004b0| 52 20 2a 65 76 29 0d 0a | 7b 0d 0a 09 5f 50 75 74 |R *ev)..|{..._Put|
|000004c0| 53 74 72 28 22 5c 6e 45 | 76 65 6e 74 48 61 6e 64 |Str("\nE|ventHand|
|000004d0| 6c 65 72 28 29 20 63 61 | 6c 6c 65 64 2e 22 29 3b |ler() ca|lled.");|
|000004e0| 0d 0a 09 72 65 74 75 72 | 6e 20 4e 4f 3b 09 2f 2f |...retur|n NO;.//|
|000004f0| 20 65 76 65 6e 74 20 73 | 74 69 6c 6c 20 6e 65 65 | event s|till nee|
|00000500| 64 73 20 74 6f 20 62 65 | 20 68 61 6e 64 6c 65 64 |ds to be| handled|
|00000510| 20 62 79 20 46 6f 78 50 | 72 6f 0d 0a 7d 0d 0a 0d | by FoxP|ro..}...|
|00000520| 0a 46 41 52 20 41 63 74 | 69 76 61 74 65 28 29 0d |.FAR Act|ivate().|
|00000530| 0a 7b 0d 0a 09 48 61 6e | 64 6c 65 72 49 44 20 3d |.{...Han|dlerID =|
|00000540| 20 5f 41 63 74 69 76 61 | 74 65 48 61 6e 64 6c 65 | _Activa|teHandle|
|00000550| 72 28 45 76 65 6e 74 48 | 61 6e 64 6c 65 72 29 3b |r(EventH|andler);|
|00000560| 0d 0a 09 72 65 74 75 72 | 6e 20 30 3b 0d 0a 7d 0d |...retur|n 0;..}.|
|00000570| 0a 0d 0a 2f 2f 0d 0a 2f | 2f 09 57 68 65 6e 20 74 |...//../|/.When t|
|00000580| 68 65 20 6c 69 62 72 61 | 72 79 20 69 73 20 75 6e |he libra|ry is un|
|00000590| 6c 6f 61 64 65 64 20 77 | 65 20 6d 75 73 74 20 64 |loaded w|e must d|
|000005a0| 65 61 63 74 69 76 61 74 | 65 20 74 68 65 20 65 76 |eactivat|e the ev|
|000005b0| 65 6e 74 20 68 61 6e 64 | 6c 65 72 0d 0a 2f 2f 09 |ent hand|ler..//.|
|000005c0| 69 6e 20 61 20 43 41 4c | 4c 4f 4e 55 4e 4c 4f 41 |in a CAL|LONUNLOA|
|000005d0| 44 20 66 75 6e 63 74 69 | 6f 6e 2e 0d 0a 2f 2f 0d |D functi|on...//.|
|000005e0| 0a 46 41 52 20 44 65 41 | 63 74 69 76 61 74 65 28 |.FAR DeA|ctivate(|
|000005f0| 29 0d 0a 7b 0d 0a 09 5f | 44 65 41 63 74 69 76 61 |)..{..._|DeActiva|
|00000600| 74 65 48 61 6e 64 6c 65 | 72 28 48 61 6e 64 6c 65 |teHandle|r(Handle|
|00000610| 72 49 44 29 3b 0d 0a 09 | 72 65 74 75 72 6e 20 30 |rID);...|return 0|
|00000620| 3b 0d 0a 7d 0d 0a 0d 0a | 46 6f 78 49 6e 66 6f 20 |;..}....|FoxInfo |
|00000630| 6d 79 46 6f 78 49 6e 66 | 6f 5b 5d 20 3d 0d 0a 7b |myFoxInf|o[] =..{|
|00000640| 0d 0a 09 7b 22 41 43 54 | 49 56 41 54 45 22 2c 20 |...{"ACT|IVATE", |
|00000650| 20 41 63 74 69 76 61 74 | 65 2c 09 43 41 4c 4c 4f | Activat|e,.CALLO|
|00000660| 4e 4c 4f 41 44 2c 20 22 | 22 7d 2c 0d 0a 09 7b 22 |NLOAD, "|"},...{"|
|00000670| 44 45 41 43 54 49 56 41 | 54 45 22 2c 20 44 65 41 |DEACTIVA|TE", DeA|
|00000680| 63 74 69 76 61 74 65 2c | 20 43 41 4c 4c 4f 4e 55 |ctivate,| CALLONU|
|00000690| 4e 4c 4f 41 44 2c 20 22 | 22 7d 0d 0a 7d 3b 0d 0a |NLOAD, "|"}..};..|
|000006a0| 0d 0a 46 6f 78 54 61 62 | 6c 65 20 5f 46 6f 78 54 |..FoxTab|le _FoxT|
|000006b0| 61 62 6c 65 20 3d 0d 0a | 7b 0d 0a 09 28 46 6f 78 |able =..|{...(Fox|
|000006c0| 54 61 62 6c 65 20 46 41 | 52 20 2a 29 20 30 2c 20 |Table FA|R *) 0, |
|000006d0| 73 69 7a 65 6f 66 28 6d | 79 46 6f 78 49 6e 66 6f |sizeof(m|yFoxInfo|
|000006e0| 29 2f 73 69 7a 65 6f 66 | 28 46 6f 78 49 6e 66 6f |)/sizeof|(FoxInfo|
|000006f0| 29 2c 20 6d 79 46 6f 78 | 49 6e 66 6f 0d 0a 7d 3b |), myFox|Info..};|
|00000700| 0d 0a 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000720| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000740| 00 00 00 01 00 00 00 3e | 53 45 54 20 4c 49 42 52 |.......>|SET LIBR|
|00000750| 41 52 59 20 54 4f 20 65 | 78 61 6d 70 6c 65 0d 0a |ARY TO e|xample..|
|00000760| 57 41 49 54 20 54 4f 20 | 64 75 6d 6d 79 20 54 49 |WAIT TO |dummy TI|
|00000770| 4d 45 20 35 0d 0a 53 45 | 54 20 4c 49 42 52 41 52 |ME 5..SE|T LIBRAR|
|00000780| 59 20 54 4f 0d 0a 00 00 | 00 00 00 00 00 00 00 00 |Y TO....|........|
|00000790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007c0| 00 00 00 01 00 00 00 cd | 53 65 74 74 69 6e 67 20 |........|Setting |
|000007d0| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 66 6f 72 20 |environm|ent for |
|000007e0| 75 73 69 6e 67 20 4d 69 | 63 72 6f 73 6f 66 74 20 |using Mi|crosoft |
|000007f0| 56 69 73 75 61 6c 20 43 | 2b 2b 20 74 6f 6f 6c 73 |Visual C|++ tools|
|00000800| 2e 0d 0a 09 63 6c 2e 65 | 78 65 20 40 64 3a 5c 74 |....cl.e|xe @d:\t|
|00000810| 65 6d 70 5c 6e 6d 61 30 | 30 32 35 35 2e 0d 0a 65 |emp\nma0|0255...e|
|00000820| 78 61 6d 70 6c 65 2e 63 | 0d 0a 09 6c 69 6e 6b 2e |xample.c|...link.|
|00000830| 65 78 65 20 40 64 3a 5c | 74 65 6d 70 5c 6e 6d 62 |exe @d:\|temp\nmb|
|00000840| 30 30 32 35 35 2e 0d 0a | 20 20 20 43 72 65 61 74 |00255...| Creat|
|00000850| 69 6e 67 20 6c 69 62 72 | 61 72 79 20 2e 5c 65 78 |ing libr|ary .\ex|
|00000860| 61 6d 70 6c 65 2e 6c 69 | 62 20 61 6e 64 20 6f 62 |ample.li|b and ob|
|00000870| 6a 65 63 74 20 2e 5c 65 | 78 61 6d 70 6c 65 2e 65 |ject .\e|xample.e|
|00000880| 78 70 0d 0a 0d 0a 42 55 | 49 4c 44 20 53 55 43 43 |xp....BU|ILD SUCC|
|00000890| 45 45 44 45 44 00 00 00 | 00 00 00 00 00 00 00 00 |EEDED...|........|
|000008a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008c0| 00 00 00 01 00 00 01 43 | 75 6e 73 69 67 6e 65 64 |.......C|unsigned|
|000008d0| 20 69 6e 74 20 5f 41 63 | 74 69 76 61 74 65 49 64 | int _Ac|tivateId|
|000008e0| 6c 65 28 46 50 46 49 20 | 68 61 6e 64 6c 65 72 29 |le(FPFI |handler)|
|000008f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000900| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000910| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000920| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000930| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000940| 20 20 20 20 20 20 20 20 | 20 0d 0a 0d 0a 54 68 69 | | ....Thi|
|00000950| 73 20 65 78 61 6d 70 6c | 65 20 61 63 74 69 76 61 |s exampl|e activa|
|00000960| 74 65 73 20 61 6e 20 69 | 64 6c 65 20 65 76 65 6e |tes an i|dle even|
|00000970| 74 20 68 61 6e 64 6c 65 | 72 20 77 68 65 6e 20 74 |t handle|r when t|
|00000980| 68 65 20 6c 69 62 72 61 | 72 79 20 69 73 20 6c 6f |he libra|ry is lo|
|00000990| 61 64 65 64 2e 20 20 54 | 68 65 20 69 64 6c 65 20 |aded. T|he idle |
|000009a0| 65 76 65 6e 74 20 68 61 | 6e 64 6c 65 72 20 6a 75 |event ha|ndler ju|
|000009b0| 73 74 20 70 72 69 6e 74 | 73 20 61 20 6d 65 73 73 |st print|s a mess|
|000009c0| 61 67 65 2e 20 20 54 68 | 65 20 69 64 6c 65 20 65 |age. Th|e idle e|
|000009d0| 76 65 6e 74 20 68 61 6e | 64 6c 65 72 20 69 73 20 |vent han|dler is |
|000009e0| 64 65 61 63 74 69 76 61 | 74 65 64 20 77 68 65 6e |deactiva|ted when|
|000009f0| 20 74 68 65 20 6c 69 62 | 72 61 72 79 20 69 73 20 | the lib|rary is |
|00000a00| 75 6e 6c 6f 61 64 65 64 | 2e 0d 0a 00 00 00 00 00 |unloaded|........|
|00000a10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a40| 00 00 00 01 00 00 02 f3 | 23 69 6e 63 6c 75 64 65 |........|#include|
|00000a50| 20 3c 70 72 6f 5f 65 78 | 74 2e 68 3e 0d 0a 0d 0a | <pro_ex|t.h>....|
|00000a60| 73 74 61 74 69 63 20 75 | 6e 73 69 67 6e 65 64 20 |static u|nsigned |
|00000a70| 49 64 6c 65 72 49 44 3b | 0d 0a 0d 0a 2f 2f 0d 0a |IdlerID;|....//..|
|00000a80| 2f 2f 09 54 68 69 73 20 | 69 73 20 74 68 65 20 72 |//.This |is the r|
|00000a90| 6f 75 74 69 6e 65 20 74 | 68 61 74 20 69 73 20 72 |outine t|hat is r|
|00000aa0| 65 67 69 73 74 65 72 65 | 64 20 61 73 20 61 6e 20 |egistere|d as an |
|00000ab0| 69 64 6c 65 20 65 76 65 | 6e 74 20 68 61 6e 64 6c |idle eve|nt handl|
|00000ac0| 65 72 2e 0d 0a 2f 2f 0d | 0a 76 6f 69 64 20 46 41 |er...//.|.void FA|
|00000ad0| 52 20 49 64 6c 65 48 61 | 6e 64 6c 65 72 28 57 48 |R IdleHa|ndler(WH|
|00000ae0| 61 6e 64 6c 65 20 77 68 | 2c 20 45 76 65 6e 74 52 |andle wh|, EventR|
|00000af0| 65 63 20 2a 65 76 29 0d | 0a 7b 0d 0a 09 5f 50 75 |ec *ev).|.{..._Pu|
|00000b00| 74 53 74 72 28 22 5c 6e | 49 64 6c 65 48 61 6e 64 |tStr("\n|IdleHand|
|00000b10| 6c 65 72 28 29 20 63 61 | 6c 6c 65 64 2e 22 29 3b |ler() ca|lled.");|
|00000b20| 0d 0a 7d 0d 0a 0d 0a 76 | 6f 69 64 20 46 41 52 20 |..}....v|oid FAR |
|00000b30| 41 63 74 69 76 61 74 65 | 28 50 61 72 61 6d 42 6c |Activate|(ParamBl|
|00000b40| 6b 20 46 41 52 20 2a 70 | 61 72 6d 29 0d 0a 7b 0d |k FAR *p|arm)..{.|
|00000b50| 0a 09 49 64 6c 65 72 49 | 44 20 3d 20 5f 41 63 74 |..IdlerI|D = _Act|
|00000b60| 69 76 61 74 65 49 64 6c | 65 28 28 46 50 46 49 29 |ivateIdl|e((FPFI)|
|00000b70| 20 49 64 6c 65 48 61 6e | 64 6c 65 72 29 3b 0d 0a | IdleHan|dler);..|
|00000b80| 7d 0d 0a 0d 0a 2f 2f 0d | 0a 2f 2f 09 57 68 65 6e |}....//.|.//.When|
|00000b90| 20 74 68 65 20 6c 69 62 | 72 61 72 79 20 69 73 20 | the lib|rary is |
|00000ba0| 75 6e 6c 6f 61 64 65 64 | 20 77 65 20 6d 75 73 74 |unloaded| we must|
|00000bb0| 20 64 65 61 63 74 69 76 | 61 74 65 20 74 68 65 20 | deactiv|ate the |
|00000bc0| 69 64 6c 65 20 65 76 65 | 6e 74 20 68 61 6e 64 6c |idle eve|nt handl|
|00000bd0| 65 72 0d 0a 2f 2f 09 69 | 6e 20 61 20 43 41 4c 4c |er..//.i|n a CALL|
|00000be0| 4f 4e 55 4e 4c 4f 41 44 | 20 66 75 6e 63 74 69 6f |ONUNLOAD| functio|
|00000bf0| 6e 2e 0d 0a 2f 2f 0d 0a | 76 6f 69 64 20 46 41 52 |n...//..|void FAR|
|00000c00| 20 44 65 41 63 74 69 76 | 61 74 65 28 50 61 72 61 | DeActiv|ate(Para|
|00000c10| 6d 42 6c 6b 20 46 41 52 | 20 2a 70 61 72 6d 29 0d |mBlk FAR| *parm).|
|00000c20| 0a 7b 0d 0a 20 20 20 20 | 5f 44 65 41 63 74 69 76 |.{.. |_DeActiv|
|00000c30| 61 74 65 49 64 6c 65 28 | 49 64 6c 65 72 49 44 29 |ateIdle(|IdlerID)|
|00000c40| 3b 0d 0a 7d 0d 0a 0d 0a | 46 6f 78 49 6e 66 6f 20 |;..}....|FoxInfo |
|00000c50| 6d 79 46 6f 78 49 6e 66 | 6f 5b 5d 20 3d 0d 0a 7b |myFoxInf|o[] =..{|
|00000c60| 0d 0a 09 7b 22 41 43 54 | 49 56 41 54 45 22 2c 20 |...{"ACT|IVATE", |
|00000c70| 20 20 20 28 46 50 46 49 | 29 20 41 63 74 69 76 61 | (FPFI|) Activa|
|00000c80| 74 65 2c 20 20 20 43 41 | 4c 4c 4f 4e 4c 4f 41 44 |te, CA|LLONLOAD|
|00000c90| 2c 20 20 20 20 20 22 22 | 7d 2c 0d 0a 09 7b 22 44 |, ""|},...{"D|
|00000ca0| 45 41 43 54 49 56 41 54 | 45 22 2c 20 20 28 46 50 |EACTIVAT|E", (FP|
|00000cb0| 46 49 29 20 44 65 41 63 | 74 69 76 61 74 65 2c 20 |FI) DeAc|tivate, |
|00000cc0| 43 41 4c 4c 4f 4e 55 4e | 4c 4f 41 44 2c 20 20 20 |CALLONUN|LOAD, |
|00000cd0| 22 22 7d 0d 0a 7d 3b 0d | 0a 0d 0a 46 6f 78 54 61 |""}..};.|...FoxTa|
|00000ce0| 62 6c 65 20 5f 46 6f 78 | 54 61 62 6c 65 20 3d 0d |ble _Fox|Table =.|
|00000cf0| 0a 7b 0d 0a 09 28 46 6f | 78 54 61 62 6c 65 20 46 |.{...(Fo|xTable F|
|00000d00| 41 52 20 2a 29 20 30 2c | 20 73 69 7a 65 6f 66 28 |AR *) 0,| sizeof(|
|00000d10| 6d 79 46 6f 78 49 6e 66 | 6f 29 2f 73 69 7a 65 6f |myFoxInf|o)/sizeo|
|00000d20| 66 28 46 6f 78 49 6e 66 | 6f 29 2c 20 6d 79 46 6f |f(FoxInf|o), myFo|
|00000d30| 78 49 6e 66 6f 0d 0a 7d | 3b 0d 0a 00 00 00 00 00 |xInfo..}|;.......|
|00000d40| 00 00 00 01 00 00 00 3e | 53 45 54 20 4c 49 42 52 |.......>|SET LIBR|
|00000d50| 41 52 59 20 54 4f 20 65 | 78 61 6d 70 6c 65 0d 0a |ARY TO e|xample..|
|00000d60| 57 41 49 54 20 54 4f 20 | 64 75 6d 6d 79 20 54 49 |WAIT TO |dummy TI|
|00000d70| 4d 45 20 35 0d 0a 53 45 | 54 20 4c 49 42 52 41 52 |ME 5..SE|T LIBRAR|
|00000d80| 59 20 54 4f 0d 0a 00 00 | 00 00 00 00 00 00 00 00 |Y TO....|........|
|00000d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000dc0| 00 00 00 01 00 00 00 cd | 53 65 74 74 69 6e 67 20 |........|Setting |
|00000dd0| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 66 6f 72 20 |environm|ent for |
|00000de0| 75 73 69 6e 67 20 4d 69 | 63 72 6f 73 6f 66 74 20 |using Mi|crosoft |
|00000df0| 56 69 73 75 61 6c 20 43 | 2b 2b 20 74 6f 6f 6c 73 |Visual C|++ tools|
|00000e00| 2e 0d 0a 09 63 6c 2e 65 | 78 65 20 40 64 3a 5c 74 |....cl.e|xe @d:\t|
|00000e10| 65 6d 70 5c 6e 6d 61 30 | 30 32 38 35 2e 0d 0a 65 |emp\nma0|0285...e|
|00000e20| 78 61 6d 70 6c 65 2e 63 | 0d 0a 09 6c 69 6e 6b 2e |xample.c|...link.|
|00000e30| 65 78 65 20 40 64 3a 5c | 74 65 6d 70 5c 6e 6d 62 |exe @d:\|temp\nmb|
|00000e40| 30 30 32 38 35 2e 0d 0a | 20 20 20 43 72 65 61 74 |00285...| Creat|
|00000e50| 69 6e 67 20 6c 69 62 72 | 61 72 79 20 2e 5c 65 78 |ing libr|ary .\ex|
|00000e60| 61 6d 70 6c 65 2e 6c 69 | 62 20 61 6e 64 20 6f 62 |ample.li|b and ob|
|00000e70| 6a 65 63 74 20 2e 5c 65 | 78 61 6d 70 6c 65 2e 65 |ject .\e|xample.e|
|00000e80| 78 70 0d 0a 0d 0a 42 55 | 49 4c 44 20 53 55 43 43 |xp....BU|ILD SUCC|
|00000e90| 45 45 44 45 44 00 00 00 | 00 00 00 00 00 00 00 00 |EEDED...|........|
|00000ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ec0| 00 00 00 01 00 00 01 d9 | 75 6e 73 69 67 6e 65 64 |........|unsigned|
|00000ed0| 20 69 6e 74 20 20 5f 41 | 63 74 69 76 61 74 65 49 | int _A|ctivateI|
|00000ee0| 64 6c 65 28 46 50 46 49 | 20 68 61 6e 64 6c 65 72 |dle(FPFI| handler|
|00000ef0| 29 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |) | |
|00000f00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000f10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000f20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000f30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000f40| 20 20 20 20 20 20 20 20 | 20 20 0d 0a 0d 0a 54 68 | | ....Th|
|00000f50| 69 73 20 65 78 61 6d 70 | 6c 65 20 62 75 69 6c 64 |is examp|le build|
|00000f60| 73 20 61 20 70 6f 70 75 | 70 20 73 74 79 6c 65 20 |s a popu|p style |
|00000f70| 22 6e 6f 6e 2d 6d 6f 64 | 61 6c 22 20 6d 65 6e 75 |"non-mod|al" menu|
|00000f80| 20 77 69 74 68 20 74 68 | 72 65 65 20 69 74 65 6d | with th|ree item|
|00000f90| 73 2e 20 20 5f 41 63 74 | 69 76 61 74 65 4d 65 6e |s. _Act|ivateMen|
|00000fa0| 75 28 29 20 64 69 73 70 | 6c 61 79 73 20 74 68 65 |u() disp|lays the|
|00000fb0| 20 6d 65 6e 75 2e 20 20 | 54 68 69 73 20 6d 65 6e | menu. |This men|
|00000fc0| 75 20 69 73 20 6e 6f 6e | 2d 6d 6f 64 61 6c 20 69 |u is non|-modal i|
|00000fd0| 6e 20 74 68 61 74 20 69 | 6e 74 65 72 61 63 74 69 |n that i|nteracti|
|00000fe0| 6f 6e 20 69 73 20 6e 6f | 74 20 66 6f 72 63 65 64 |on is no|t forced|
|00000ff0| 20 61 73 20 77 69 74 68 | 20 5f 4d 65 6e 75 49 6e | as with| _MenuIn|
|00001000| 74 65 72 61 63 74 28 29 | 2e 20 20 52 61 74 68 65 |teract()|. Rathe|
|00001010| 72 20 77 68 65 6e 20 74 | 68 65 20 75 73 65 72 20 |r when t|he user |
|00001020| 6d 61 6b 65 73 20 61 20 | 73 65 6c 65 63 74 69 6f |makes a |selectio|
|00001030| 6e 20 74 68 65 20 5f 4f | 6e 53 65 6c 65 63 74 69 |n the _O|nSelecti|
|00001040| 6f 6e 28 29 20 72 6f 75 | 74 69 6e 65 20 69 73 20 |on() rou|tine is |
|00001050| 63 61 6c 6c 65 64 2c 20 | 74 68 65 20 69 74 65 6d |called, |the item|
|00001060| 20 73 65 6c 65 63 74 65 | 64 20 69 73 20 70 72 69 | selecte|d is pri|
|00001070| 6e 74 65 64 20 6f 75 74 | 20 74 6f 20 74 68 65 20 |nted out| to the |
|00001080| 73 63 72 65 65 6e 2c 20 | 61 6e 64 20 74 68 65 20 |screen, |and the |
|00001090| 6d 65 6e 75 20 64 69 73 | 70 6f 73 65 64 20 6f 66 |menu dis|posed of|
|000010a0| 2e 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010c0| 00 00 00 01 00 00 05 6f | 23 69 6e 63 6c 75 64 65 |.......o|#include|
|000010d0| 20 3c 70 72 6f 5f 65 78 | 74 2e 68 3e 0d 0a 0d 0a | <pro_ex|t.h>....|
|000010e0| 73 74 61 74 69 63 20 4d | 45 4e 55 49 44 20 6d 65 |static M|ENUID me|
|000010f0| 6e 75 49 64 3b 0d 0a 73 | 74 61 74 69 63 20 6c 6f |nuId;..s|tatic lo|
|00001100| 6e 67 20 6e 44 69 64 53 | 65 6c 65 63 74 3d 30 3b |ng nDidS|elect=0;|
|00001110| 0d 0a 0d 0a 0d 0a 76 6f | 69 64 20 70 75 74 4c 6f |......vo|id putLo|
|00001120| 6e 67 28 6c 6f 6e 67 20 | 6e 29 0d 0a 7b 0d 0a 09 |ng(long |n)..{...|
|00001130| 56 61 6c 75 65 20 76 61 | 6c 3b 0d 0a 0d 0a 09 76 |Value va|l;.....v|
|00001140| 61 6c 2e 65 76 5f 74 79 | 70 65 20 3d 20 27 49 27 |al.ev_ty|pe = 'I'|
|00001150| 3b 0d 0a 09 76 61 6c 2e | 65 76 5f 6c 6f 6e 67 20 |;...val.|ev_long |
|00001160| 3d 20 6e 3b 0d 0a 09 76 | 61 6c 2e 65 76 5f 77 69 |= n;...v|al.ev_wi|
|00001170| 64 74 68 20 3d 20 31 30 | 3b 0d 0a 0d 0a 09 5f 50 |dth = 10|;....._P|
|00001180| 75 74 56 61 6c 75 65 28 | 26 76 61 6c 29 3b 0d 0a |utValue(|&val);..|
|00001190| 7d 0d 0a 0d 0a 46 41 52 | 20 6f 6e 53 65 6c 65 63 |}....FAR| onSelec|
|000011a0| 74 69 6f 6e 28 6c 6f 6e | 67 20 6d 65 6e 75 49 64 |tion(lon|g menuId|
|000011b0| 2c 20 6c 6f 6e 67 20 69 | 74 65 6d 49 64 29 0d 0a |, long i|temId)..|
|000011c0| 7b 0d 0a 09 5f 50 75 74 | 53 74 72 28 22 5c 6e 69 |{..._Put|Str("\ni|
|000011d0| 74 65 6d 49 64 20 3d 20 | 22 29 3b 20 70 75 74 4c |temId = |"); putL|
|000011e0| 6f 6e 67 28 69 74 65 6d | 49 64 29 3b 0d 0a 09 5f |ong(item|Id);..._|
|000011f0| 45 78 65 63 75 74 65 28 | 22 63 6c 65 61 72 20 65 |Execute(|"clear e|
|00001200| 76 65 6e 74 73 22 29 3b | 0d 0a 09 6e 44 69 64 53 |vents");|...nDidS|
|00001210| 65 6c 65 63 74 20 3d 20 | 69 74 65 6d 49 64 3b 0d |elect = |itemId;.|
|00001220| 0a 09 72 65 74 75 72 6e | 20 30 3b 0d 0a 7d 0d 0a |..return| 0;..}..|
|00001230| 0d 0a 76 6f 69 64 20 46 | 41 52 20 44 69 64 53 65 |..void F|AR DidSe|
|00001240| 6c 65 63 74 28 50 61 72 | 61 6d 42 6c 6b 20 46 41 |lect(Par|amBlk FA|
|00001250| 52 20 2a 70 61 72 6d 29 | 0d 0a 7b 0d 0a 09 56 61 |R *parm)|..{...Va|
|00001260| 6c 75 65 20 76 61 6c 3b | 0d 0a 09 76 61 6c 2e 65 |lue val;|...val.e|
|00001270| 76 5f 6c 6f 6e 67 20 3d | 20 6e 44 69 64 53 65 6c |v_long =| nDidSel|
|00001280| 65 63 74 3b 0d 0a 09 76 | 61 6c 2e 65 76 5f 74 79 |ect;...v|al.ev_ty|
|00001290| 70 65 20 20 3d 20 27 49 | 27 3b 0d 0a 09 5f 52 65 |pe = 'I|';..._Re|
|000012a0| 74 56 61 6c 28 26 76 61 | 6c 29 3b 0d 0a 7d 0d 0a |tVal(&va|l);..}..|
|000012b0| 0d 0a 76 6f 69 64 20 46 | 41 52 20 64 65 61 63 74 |..void F|AR deact|
|000012c0| 69 76 61 74 65 4d 65 6e | 75 28 50 61 72 61 6d 42 |ivateMen|u(ParamB|
|000012d0| 6c 6b 20 46 41 52 20 2a | 70 61 72 6d 29 0d 0a 7b |lk FAR *|parm)..{|
|000012e0| 0d 0a 20 20 20 20 5f 44 | 65 41 63 74 69 76 61 74 |.. _D|eActivat|
|000012f0| 65 4d 65 6e 75 28 6d 65 | 6e 75 49 64 29 3b 0d 0a |eMenu(me|nuId);..|
|00001300| 09 5f 44 69 73 70 6f 73 | 65 4d 65 6e 75 28 6d 65 |._Dispos|eMenu(me|
|00001310| 6e 75 49 64 29 3b 0d 0a | 7d 0d 0a 0d 0a 76 6f 69 |nuId);..|}....voi|
|00001320| 64 20 46 41 52 20 61 63 | 74 69 76 61 74 65 4d 65 |d FAR ac|tivateMe|
|00001330| 6e 75 28 50 61 72 61 6d | 42 6c 6b 20 46 41 52 20 |nu(Param|Blk FAR |
|00001340| 2a 70 61 72 6d 29 0d 0a | 7b 0d 0a 09 49 54 45 4d |*parm)..|{...ITEM|
|00001350| 49 44 20 69 74 65 6d 49 | 64 3b 0d 0a 09 50 6f 69 |ID itemI|d;...Poi|
|00001360| 6e 74 20 6c 6f 63 3b 0d | 0a 0d 0a 09 6d 65 6e 75 |nt loc;.|....menu|
|00001370| 49 64 20 3d 20 5f 47 65 | 74 4e 65 77 4d 65 6e 75 |Id = _Ge|tNewMenu|
|00001380| 49 64 28 29 3b 0d 0a 09 | 5f 4e 65 77 4d 65 6e 75 |Id();...|_NewMenu|
|00001390| 28 4d 50 4f 50 55 50 2c | 20 6d 65 6e 75 49 64 29 |(MPOPUP,| menuId)|
|000013a0| 3b 0d 0a 0d 0a 09 69 74 | 65 6d 49 64 20 3d 20 5f |;.....it|emId = _|
|000013b0| 47 65 74 4e 65 77 49 74 | 65 6d 49 64 28 6d 65 6e |GetNewIt|emId(men|
|000013c0| 75 49 64 29 3b 0d 0a 09 | 5f 4e 65 77 49 74 65 6d |uId);...|_NewItem|
|000013d0| 28 6d 65 6e 75 49 64 2c | 20 69 74 65 6d 49 64 2c |(menuId,| itemId,|
|000013e0| 20 2d 32 2c 20 22 5c 5c | 3c 31 73 74 20 69 74 65 | -2, "\\|<1st ite|
|000013f0| 6d 22 29 3b 0d 0a 0d 0a | 09 69 74 65 6d 49 64 20 |m");....|.itemId |
|00001400| 3d 20 5f 47 65 74 4e 65 | 77 49 74 65 6d 49 64 28 |= _GetNe|wItemId(|
|00001410| 6d 65 6e 75 49 64 29 3b | 0d 0a 09 5f 4e 65 77 49 |menuId);|..._NewI|
|00001420| 74 65 6d 28 6d 65 6e 75 | 49 64 2c 20 69 74 65 6d |tem(menu|Id, item|
|00001430| 49 64 2c 20 2d 32 2c 20 | 22 5c 5c 3c 32 6e 64 20 |Id, -2, |"\\<2nd |
|00001440| 69 74 65 6d 22 29 3b 0d | 0a 0d 0a 09 69 74 65 6d |item");.|....item|
|00001450| 49 64 20 3d 20 5f 47 65 | 74 4e 65 77 49 74 65 6d |Id = _Ge|tNewItem|
|00001460| 49 64 28 6d 65 6e 75 49 | 64 29 3b 0d 0a 09 5f 4e |Id(menuI|d);..._N|
|00001470| 65 77 49 74 65 6d 28 6d | 65 6e 75 49 64 2c 20 69 |ewItem(m|enuId, i|
|00001480| 74 65 6d 49 64 2c 20 2d | 32 2c 20 22 5c 5c 3c 33 |temId, -|2, "\\<3|
|00001490| 72 64 20 69 74 65 6d 22 | 29 3b 0d 0a 0d 0a 09 6c |rd item"|);.....l|
|000014a0| 6f 63 2e 76 20 3d 20 31 | 30 3b 20 6c 6f 63 2e 68 |oc.v = 1|0; loc.h|
|000014b0| 20 3d 20 32 30 3b 0d 0a | 09 5f 53 65 74 4d 65 6e | = 20;..|._SetMen|
|000014c0| 75 50 6f 69 6e 74 28 6d | 65 6e 75 49 64 2c 20 6c |uPoint(m|enuId, l|
|000014d0| 6f 63 29 3b 0d 0a 0d 0a | 09 5f 41 63 74 69 76 61 |oc);....|._Activa|
|000014e0| 74 65 4d 65 6e 75 28 6d | 65 6e 75 49 64 29 3b 0d |teMenu(m|enuId);.|
|000014f0| 0a 09 5f 4f 6e 53 65 6c | 65 63 74 69 6f 6e 28 6d |.._OnSel|ection(m|
|00001500| 65 6e 75 49 64 2c 20 2d | 31 2c 20 6f 6e 53 65 6c |enuId, -|1, onSel|
|00001510| 65 63 74 69 6f 6e 29 3b | 0d 0a 7d 0d 0a 0d 0a 46 |ection);|..}....F|
|00001520| 6f 78 49 6e 66 6f 20 6d | 79 46 6f 78 49 6e 66 6f |oxInfo m|yFoxInfo|
|00001530| 5b 5d 20 3d 0d 0a 7b 0d | 0a 09 7b 22 4f 4e 4c 4f |[] =..{.|..{"ONLO|
|00001540| 41 44 22 2c 20 28 46 50 | 46 49 29 20 61 63 74 69 |AD", (FP|FI) acti|
|00001550| 76 61 74 65 4d 65 6e 75 | 2c 20 43 41 4c 4c 4f 4e |vateMenu|, CALLON|
|00001560| 4c 4f 41 44 2c 20 22 22 | 7d 2c 0d 0a 09 7b 22 44 |LOAD, ""|},...{"D|
|00001570| 49 44 53 45 4c 45 43 54 | 22 2c 20 28 46 50 46 49 |IDSELECT|", (FPFI|
|00001580| 29 20 44 69 64 53 65 6c | 65 63 74 2c 20 30 2c 20 |) DidSel|ect, 0, |
|00001590| 22 22 7d 2c 0d 0a 09 7b | 22 4f 4e 55 4e 4c 4f 41 |""},...{|"ONUNLOA|
|000015a0| 44 22 2c 20 28 46 50 46 | 49 29 20 64 65 61 63 74 |D", (FPF|I) deact|
|000015b0| 69 76 61 74 65 4d 65 6e | 75 2c 20 43 41 4c 4c 4f |ivateMen|u, CALLO|
|000015c0| 4e 55 4e 4c 4f 41 44 2c | 20 22 22 7d 2c 0d 0a 7d |NUNLOAD,| ""},..}|
|000015d0| 3b 0d 0a 0d 0a 46 6f 78 | 54 61 62 6c 65 20 5f 46 |;....Fox|Table _F|
|000015e0| 6f 78 54 61 62 6c 65 20 | 3d 0d 0a 7b 0d 0a 09 28 |oxTable |=..{...(|
|000015f0| 46 6f 78 54 61 62 6c 65 | 20 46 41 52 20 2a 29 20 |FoxTable| FAR *) |
|00001600| 30 2c 20 73 69 7a 65 6f | 66 28 6d 79 46 6f 78 49 |0, sizeo|f(myFoxI|
|00001610| 6e 66 6f 29 2f 73 69 7a | 65 6f 66 28 46 6f 78 49 |nfo)/siz|eof(FoxI|
|00001620| 6e 66 6f 29 2c 20 6d 79 | 46 6f 78 49 6e 66 6f 0d |nfo), my|FoxInfo.|
|00001630| 0a 7d 3b 0d 0a 0d 0a 00 | 00 00 00 00 00 00 00 00 |.};.....|........|
|00001640| 00 00 00 01 00 00 00 67 | 53 45 54 20 4c 49 42 52 |.......g|SET LIBR|
|00001650| 41 52 59 20 54 4f 20 65 | 78 61 6d 70 6c 65 0d 0a |ARY TO e|xample..|
|00001660| 57 41 49 54 20 57 49 4e | 44 4f 57 20 22 4d 61 6b |WAIT WIN|DOW "Mak|
|00001670| 65 20 73 65 6c 65 63 74 | 69 6f 6e 20 66 72 6f 6d |e select|ion from|
|00001680| 20 6d 65 6e 75 2e 22 20 | 4e 4f 57 41 49 54 0d 0a | menu." |NOWAIT..|
|00001690| 0d 0a 52 45 41 44 20 45 | 56 45 4e 54 53 0d 0a 53 |..READ E|VENTS..S|
|000016a0| 45 54 20 4c 49 42 52 41 | 52 59 20 54 4f 0d 0a 00 |ET LIBRA|RY TO...|
|000016b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000016c0| 00 00 00 01 00 00 00 cd | 53 65 74 74 69 6e 67 20 |........|Setting |
|000016d0| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 66 6f 72 20 |environm|ent for |
|000016e0| 75 73 69 6e 67 20 4d 69 | 63 72 6f 73 6f 66 74 20 |using Mi|crosoft |
|000016f0| 56 69 73 75 61 6c 20 43 | 2b 2b 20 74 6f 6f 6c 73 |Visual C|++ tools|
|00001700| 2e 0d 0a 09 63 6c 2e 65 | 78 65 20 40 64 3a 5c 74 |....cl.e|xe @d:\t|
|00001710| 65 6d 70 5c 6e 6d 61 30 | 30 32 37 31 2e 0d 0a 65 |emp\nma0|0271...e|
|00001720| 78 61 6d 70 6c 65 2e 63 | 0d 0a 09 6c 69 6e 6b 2e |xample.c|...link.|
|00001730| 65 78 65 20 40 64 3a 5c | 74 65 6d 70 5c 6e 6d 62 |exe @d:\|temp\nmb|
|00001740| 30 30 32 37 31 2e 0d 0a | 20 20 20 43 72 65 61 74 |00271...| Creat|
|00001750| 69 6e 67 20 6c 69 62 72 | 61 72 79 20 2e 5c 65 78 |ing libr|ary .\ex|
|00001760| 61 6d 70 6c 65 2e 6c 69 | 62 20 61 6e 64 20 6f 62 |ample.li|b and ob|
|00001770| 6a 65 63 74 20 2e 5c 65 | 78 61 6d 70 6c 65 2e 65 |ject .\e|xample.e|
|00001780| 78 70 0d 0a 0d 0a 42 55 | 49 4c 44 20 53 55 43 43 |xp....BU|ILD SUCC|
|00001790| 45 45 44 45 44 00 00 00 | 00 00 00 00 00 00 00 00 |EEDED...|........|
|000017a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000017c0| 00 00 00 01 00 00 00 d6 | 6c 6f 6e 67 20 20 5f 41 |........|long _A|
|000017d0| 4c 65 6e 28 4e 54 49 20 | 6e 74 69 2c 20 69 6e 74 |Len(NTI |nti, int|
|000017e0| 20 6d 6f 64 65 29 20 20 | 20 20 20 20 20 20 20 20 | mode) | |
|000017f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001800| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001810| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001820| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001830| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001840| 20 20 20 20 20 20 20 20 | 20 20 0d 0a 0d 0a 54 68 | | ....Th|
|00001850| 69 73 20 65 78 61 6d 70 | 6c 65 20 70 72 6f 76 69 |is examp|le provi|
|00001860| 64 65 73 20 61 6e 20 41 | 50 49 20 72 6f 75 74 69 |des an A|PI routi|
|00001870| 6e 65 20 66 6f 72 20 65 | 61 63 68 20 6f 66 20 74 |ne for e|ach of t|
|00001880| 68 65 20 74 68 72 65 65 | 20 70 6f 73 73 69 62 6c |he three| possibl|
|00001890| 65 20 6d 6f 64 65 20 76 | 61 6c 75 65 73 2e 00 00 |e mode v|alues...|
|000018a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018c0| 00 00 00 01 00 00 02 53 | 23 69 6e 63 6c 75 64 65 |.......S|#include|
|000018d0| 20 3c 70 72 6f 5f 65 78 | 74 2e 68 3e 0d 0a 0d 0a | <pro_ex|t.h>....|
|000018e0| 76 6f 69 64 20 46 41 52 | 20 61 6c 65 6e 45 6c 65 |void FAR| alenEle|
|000018f0| 6d 28 50 61 72 61 6d 42 | 6c 6b 20 46 41 52 20 2a |m(ParamB|lk FAR *|
|00001900| 70 61 72 6d 29 0d 0a 7b | 0d 0a 09 5f 52 65 74 49 |parm)..{|..._RetI|
|00001910| 6e 74 28 5f 41 4c 65 6e | 28 70 61 72 6d 2d 3e 70 |nt(_ALen|(parm->p|
|00001920| 5b 30 5d 2e 6c 6f 63 2e | 6c 5f 4e 54 49 2c 20 41 |[0].loc.|l_NTI, A|
|00001930| 4c 5f 45 4c 45 4d 45 4e | 54 53 29 2c 20 31 30 29 |L_ELEMEN|TS), 10)|
|00001940| 3b 0d 0a 7d 0d 0a 0d 0a | 76 6f 69 64 20 46 41 52 |;..}....|void FAR|
|00001950| 20 61 6c 65 6e 53 75 62 | 31 28 50 61 72 61 6d 42 | alenSub|1(ParamB|
|00001960| 6c 6b 20 46 41 52 20 2a | 70 61 72 6d 29 0d 0a 7b |lk FAR *|parm)..{|
|00001970| 0d 0a 09 5f 52 65 74 49 | 6e 74 28 5f 41 4c 65 6e |..._RetI|nt(_ALen|
|00001980| 28 70 61 72 6d 2d 3e 70 | 5b 30 5d 2e 6c 6f 63 2e |(parm->p|[0].loc.|
|00001990| 6c 5f 4e 54 49 2c 20 41 | 4c 5f 53 55 42 53 43 52 |l_NTI, A|L_SUBSCR|
|000019a0| 49 50 54 31 29 2c 20 31 | 30 29 3b 0d 0a 7d 0d 0a |IPT1), 1|0);..}..|
|000019b0| 0d 0a 76 6f 69 64 20 46 | 41 52 20 61 6c 65 6e 53 |..void F|AR alenS|
|000019c0| 75 62 32 28 50 61 72 61 | 6d 42 6c 6b 20 46 41 52 |ub2(Para|mBlk FAR|
|000019d0| 20 2a 70 61 72 6d 29 0d | 0a 7b 0d 0a 09 5f 52 65 | *parm).|.{..._Re|
|000019e0| 74 49 6e 74 28 5f 41 4c | 65 6e 28 70 61 72 6d 2d |tInt(_AL|en(parm-|
|000019f0| 3e 70 5b 30 5d 2e 6c 6f | 63 2e 6c 5f 4e 54 49 2c |>p[0].lo|c.l_NTI,|
|00001a00| 20 41 4c 5f 53 55 42 53 | 43 52 49 50 54 32 29 2c | AL_SUBS|CRIPT2),|
|00001a10| 20 31 30 29 3b 0d 0a 7d | 0d 0a 0d 0a 46 6f 78 49 | 10);..}|....FoxI|
|00001a20| 6e 66 6f 20 6d 79 46 6f | 78 49 6e 66 6f 5b 5d 20 |nfo myFo|xInfo[] |
|00001a30| 3d 0d 0a 7b 0d 0a 09 7b | 22 41 4c 45 4e 45 4c 45 |=..{...{|"ALENELE|
|00001a40| 4d 22 2c 20 28 46 50 46 | 49 29 20 61 6c 65 6e 45 |M", (FPF|I) alenE|
|00001a50| 6c 65 6d 2c 20 31 2c 20 | 22 52 22 7d 2c 0d 0a 09 |lem, 1, |"R"},...|
|00001a60| 7b 22 41 4c 45 4e 53 55 | 42 31 22 2c 20 28 46 50 |{"ALENSU|B1", (FP|
|00001a70| 46 49 29 20 61 6c 65 6e | 53 75 62 31 2c 20 31 2c |FI) alen|Sub1, 1,|
|00001a80| 20 22 52 22 7d 2c 0d 0a | 09 7b 22 41 4c 45 4e 53 | "R"},..|.{"ALENS|
|00001a90| 55 42 32 22 2c 20 28 46 | 50 46 49 29 20 61 6c 65 |UB2", (F|PFI) ale|
|00001aa0| 6e 53 75 62 32 2c 20 31 | 2c 20 22 52 22 7d 2c 0d |nSub2, 1|, "R"},.|
|00001ab0| 0a 7d 3b 0d 0a 0d 0a 46 | 6f 78 54 61 62 6c 65 20 |.};....F|oxTable |
|00001ac0| 5f 46 6f 78 54 61 62 6c | 65 20 3d 0d 0a 7b 0d 0a |_FoxTabl|e =..{..|
|00001ad0| 09 28 46 6f 78 54 61 62 | 6c 65 20 46 41 52 20 2a |.(FoxTab|le FAR *|
|00001ae0| 29 20 30 2c 20 73 69 7a | 65 6f 66 28 6d 79 46 6f |) 0, siz|eof(myFo|
|00001af0| 78 49 6e 66 6f 29 2f 73 | 69 7a 65 6f 66 28 46 6f |xInfo)/s|izeof(Fo|
|00001b00| 78 49 6e 66 6f 29 2c 20 | 6d 79 46 6f 78 49 6e 66 |xInfo), |myFoxInf|
|00001b10| 6f 0d 0a 7d 3b 0d 0a 0d | 0a 0d 0a 00 00 00 00 00 |o..};...|........|
|00001b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b40| 00 00 00 01 00 00 01 e7 | 53 45 54 20 4c 49 42 52 |........|SET LIBR|
|00001b50| 41 52 59 20 54 4f 20 65 | 78 61 6d 70 6c 65 20 20 |ARY TO e|xample |
|00001b60| 20 20 0d 0a 44 49 4d 45 | 4e 53 49 4f 4e 20 61 5b | ..DIME|NSION a[|
|00001b70| 31 30 2c 20 31 31 5d 0d | 0a 3f 20 41 4c 45 4e 45 |10, 11].|.? ALENE|
|00001b80| 4c 45 4d 28 40 61 29 20 | 20 26 26 20 72 65 74 75 |LEM(@a) | && retu|
|00001b90| 72 6e 73 20 31 31 30 0d | 0a 3f 20 41 4c 45 4e 53 |rns 110.|.? ALENS|
|00001ba0| 55 42 31 28 40 61 29 20 | 20 26 26 20 72 65 74 75 |UB1(@a) | && retu|
|00001bb0| 72 6e 73 20 31 30 0d 0a | 3f 20 41 4c 45 4e 53 55 |rns 10..|? ALENSU|
|00001bc0| 42 32 28 40 61 29 20 20 | 26 26 20 72 65 74 75 72 |B2(@a) |&& retur|
|00001bd0| 6e 73 20 31 31 0d 0a 0d | 0a 44 49 4d 45 4e 53 49 |ns 11...|.DIMENSI|
|00001be0| 4f 4e 20 62 5b 33 5d 0d | 0a 3f 20 41 4c 45 4e 45 |ON b[3].|.? ALENE|
|00001bf0| 4c 45 4d 28 40 62 29 20 | 20 26 26 20 72 65 74 75 |LEM(@b) | && retu|
|00001c00| 72 6e 73 20 33 0d 0a 3f | 20 41 4c 45 4e 53 55 42 |rns 3..?| ALENSUB|
|00001c10| 31 28 40 62 29 20 20 26 | 26 20 72 65 74 75 72 6e |1(@b) &|& return|
|00001c20| 73 20 33 0d 0a 3f 20 41 | 4c 45 4e 53 55 42 32 28 |s 3..? A|LENSUB2(|
|00001c30| 40 62 29 20 20 26 26 20 | 72 65 74 75 72 6e 73 20 |@b) && |returns |
|00001c40| 30 3b 20 6e 6f 20 73 65 | 63 6f 6e 64 20 73 75 62 |0; no se|cond sub|
|00001c50| 73 63 72 69 70 74 0d 0a | 0d 0a 63 20 3d 20 2e 46 |script..|..c = .F|
|00001c60| 2e 0d 0a 3f 20 41 4c 45 | 4e 45 4c 45 4d 28 40 63 |...? ALE|NELEM(@c|
|00001c70| 29 20 20 26 26 20 72 65 | 74 75 72 6e 73 20 2d 31 |) && re|turns -1|
|00001c80| 20 62 65 63 61 75 73 65 | 20 76 61 72 69 61 62 6c | because| variabl|
|00001c90| 65 20 22 63 22 20 69 73 | 20 6e 6f 74 20 61 6e 20 |e "c" is| not an |
|00001ca0| 61 72 72 61 79 0d 0a 3f | 20 41 4c 45 4e 53 55 42 |array..?| ALENSUB|
|00001cb0| 31 28 40 63 29 20 20 26 | 26 20 72 65 74 75 72 6e |1(@c) &|& return|
|00001cc0| 73 20 2d 31 20 62 65 63 | 61 75 73 65 20 76 61 72 |s -1 bec|ause var|
|00001cd0| 69 61 62 6c 65 20 22 63 | 22 20 69 73 20 6e 6f 74 |iable "c|" is not|
|00001ce0| 20 61 6e 20 61 72 72 61 | 79 0d 0a 3f 20 41 4c 45 | an arra|y..? ALE|
|00001cf0| 4e 53 55 42 32 28 40 63 | 29 20 20 26 26 20 72 65 |NSUB2(@c|) && re|
|00001d00| 74 75 72 6e 73 20 2d 31 | 20 62 65 63 61 75 73 65 |turns -1| because|
|00001d10| 20 76 61 72 69 61 62 6c | 65 20 22 63 22 20 69 73 | variabl|e "c" is|
|00001d20| 20 6e 6f 74 20 61 6e 20 | 61 72 72 61 79 0d 0a 00 | not an |array...|
|00001d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d40| 00 00 00 01 00 00 00 cd | 53 65 74 74 69 6e 67 20 |........|Setting |
|00001d50| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 66 6f 72 20 |environm|ent for |
|00001d60| 75 73 69 6e 67 20 4d 69 | 63 72 6f 73 6f 66 74 20 |using Mi|crosoft |
|00001d70| 56 69 73 75 61 6c 20 43 | 2b 2b 20 74 6f 6f 6c 73 |Visual C|++ tools|
|00001d80| 2e 0d 0a 09 63 6c 2e 65 | 78 65 20 40 64 3a 5c 74 |....cl.e|xe @d:\t|
|00001d90| 65 6d 70 5c 6e 6d 61 30 | 30 32 36 36 2e 0d 0a 65 |emp\nma0|0266...e|
|00001da0| 78 61 6d 70 6c 65 2e 63 | 0d 0a 09 6c 69 6e 6b 2e |xample.c|...link.|
|00001db0| 65 78 65 20 40 64 3a 5c | 74 65 6d 70 5c 6e 6d 62 |exe @d:\|temp\nmb|
|00001dc0| 30 30 32 36 36 2e 0d 0a | 20 20 20 43 72 65 61 74 |00266...| Creat|
|00001dd0| 69 6e 67 20 6c 69 62 72 | 61 72 79 20 2e 5c 65 78 |ing libr|ary .\ex|
|00001de0| 61 6d 70 6c 65 2e 6c 69 | 62 20 61 6e 64 20 6f 62 |ample.li|b and ob|
|00001df0| 6a 65 63 74 20 2e 5c 65 | 78 61 6d 70 6c 65 2e 65 |ject .\e|xample.e|
|00001e00| 78 70 0d 0a 0d 0a 42 55 | 49 4c 44 20 53 55 43 43 |xp....BU|ILD SUCC|
|00001e10| 45 45 44 45 44 00 00 00 | 00 00 00 00 00 00 00 00 |EEDED...|........|
|00001e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e40| 00 00 00 01 00 00 01 21 | 76 6f 69 64 20 46 41 52 |.......!|void FAR|
|00001e50| 20 2a 20 20 5f 41 6c 6c | 6f 63 61 28 75 6e 73 69 | * _All|oca(unsi|
|00001e60| 67 6e 65 64 20 69 6e 74 | 20 73 69 7a 65 29 20 20 |gned int| size) |
|00001e70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001e80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001e90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001ea0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001eb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001ec0| 20 20 20 20 20 20 20 20 | 20 20 0d 0a 0d 0a 54 68 | | ....Th|
|00001ed0| 69 73 20 65 78 61 6d 70 | 6c 65 20 64 75 70 6c 69 |is examp|le dupli|
|00001ee0| 63 61 74 65 73 20 74 68 | 65 20 66 75 6e 63 74 69 |cates th|e functi|
|00001ef0| 6f 6e 61 6c 69 74 79 20 | 6f 66 20 74 68 65 20 46 |onality |of the F|
|00001f00| 6f 78 50 72 6f 20 66 75 | 6e 63 74 69 6f 6e 20 52 |oxPro fu|nction R|
|00001f10| 45 50 4c 49 43 41 54 45 | 28 29 2e 20 20 54 68 65 |EPLICATE|(). The|
|00001f20| 20 74 65 6d 70 6f 72 61 | 72 79 20 6d 65 6d 6f 72 | tempora|ry memor|
|00001f30| 79 20 75 73 65 64 20 74 | 6f 20 64 75 70 6c 69 63 |y used t|o duplic|
|00001f40| 61 74 65 20 74 68 65 20 | 63 68 61 72 61 63 74 65 |ate the |characte|
|00001f50| 72 20 63 6f 6d 65 73 20 | 66 72 6f 6d 20 5f 41 6c |r comes |from _Al|
|00001f60| 6c 6f 63 61 28 29 2e 0d | 0a 00 00 00 00 00 00 00 |loca()..|........|
|00001f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001f80| 00 00 00 01 00 00 01 f6 | 23 69 6e 63 6c 75 64 65 |........|#include|
|00001f90| 20 3c 70 72 6f 5f 65 78 | 74 2e 68 3e 0d 0a 0d 0a | <pro_ex|t.h>....|
|00001fa0| 76 6f 69 64 20 46 41 52 | 20 61 6c 6c 6f 63 61 45 |void FAR| allocaE|
|00001fb0| 78 28 50 61 72 61 6d 42 | 6c 6b 20 46 41 52 20 2a |x(ParamB|lk FAR *|
|00001fc0| 70 61 72 6d 29 0d 0a 7b | 0d 0a 09 63 68 61 72 20 |parm)..{|...char |
|00001fd0| 46 41 52 20 2a 72 65 70 | 3b 0d 0a 09 63 68 61 72 |FAR *rep|;...char|
|00001fe0| 20 63 20 3d 20 2a 28 63 | 68 61 72 20 2a 29 20 5f | c = *(c|har *) _|
|00001ff0| 48 61 6e 64 54 6f 50 74 | 72 28 70 61 72 6d 2d 3e |HandToPt|r(parm->|
|00002000| 70 5b 30 5d 2e 76 61 6c | 2e 65 76 5f 68 61 6e 64 |p[0].val|.ev_hand|
|00002010| 6c 65 29 3b 0d 0a 0d 0a | 09 72 65 70 20 3d 20 5f |le);....|.rep = _|
|00002020| 41 6c 6c 6f 63 61 28 28 | 69 6e 74 29 20 70 61 72 |Alloca((|int) par|
|00002030| 6d 2d 3e 70 5b 31 5d 2e | 76 61 6c 2e 65 76 5f 6c |m->p[1].|val.ev_l|
|00002040| 6f 6e 67 20 2b 20 31 29 | 3b 0d 0a 09 5f 4d 65 6d |ong + 1)|;..._Mem|
|00002050| 46 69 6c 6c 28 72 65 70 | 2c 20 63 2c 20 28 69 6e |Fill(rep|, c, (in|
|00002060| 74 29 20 70 61 72 6d 2d | 3e 70 5b 31 5d 2e 76 61 |t) parm-|>p[1].va|
|00002070| 6c 2e 65 76 5f 6c 6f 6e | 67 29 3b 0d 0a 20 20 20 |l.ev_lon|g);.. |
|00002080| 20 72 65 70 5b 70 61 72 | 6d 2d 3e 70 5b 31 5d 2e | rep[par|m->p[1].|
|00002090| 76 61 6c 2e 65 76 5f 6c | 6f 6e 67 5d 20 3d 20 27 |val.ev_l|ong] = '|
|000020a0| 5c 30 27 3b 20 20 2f 2f | 20 6e 75 6c 6c 20 74 65 |\0'; //| null te|
|000020b0| 72 6d 69 6e 61 74 65 0d | 0a 0d 0a 09 5f 52 65 74 |rminate.|...._Ret|
|000020c0| 43 68 61 72 28 72 65 70 | 29 3b 0d 0a 7d 0d 0a 0d |Char(rep|);..}...|
|000020d0| 0a 46 6f 78 49 6e 66 6f | 20 6d 79 46 6f 78 49 6e |.FoxInfo| myFoxIn|
|000020e0| 66 6f 5b 5d 20 3d 0d 0a | 7b 0d 0a 09 7b 22 58 52 |fo[] =..|{...{"XR|
|000020f0| 45 50 4c 49 43 41 54 45 | 22 2c 20 28 46 50 46 49 |EPLICATE|", (FPFI|
|00002100| 29 20 61 6c 6c 6f 63 61 | 45 78 2c 20 32 2c 20 22 |) alloca|Ex, 2, "|
|00002110| 43 2c 49 22 7d 2c 0d 0a | 7d 3b 0d 0a 0d 0a 46 6f |C,I"},..|};....Fo|
|00002120| 78 54 61 62 6c 65 20 5f | 46 6f 78 54 61 62 6c 65 |xTable _|FoxTable|
|00002130| 20 3d 0d 0a 7b 0d 0a 09 | 28 46 6f 78 54 61 62 6c | =..{...|(FoxTabl|
|00002140| 65 20 46 41 52 20 2a 29 | 20 30 2c 20 73 69 7a 65 |e FAR *)| 0, size|
|00002150| 6f 66 28 6d 79 46 6f 78 | 49 6e 66 6f 29 2f 73 69 |of(myFox|Info)/si|
|00002160| 7a 65 6f 66 28 46 6f 78 | 49 6e 66 6f 29 2c 20 6d |zeof(Fox|Info), m|
|00002170| 79 46 6f 78 49 6e 66 6f | 0d 0a 7d 3b 0d 0a 00 00 |yFoxInfo|..};....|
|00002180| 00 00 00 01 00 00 00 43 | 53 45 54 20 4c 49 42 52 |.......C|SET LIBR|
|00002190| 41 52 59 20 54 4f 20 65 | 78 61 6d 70 6c 65 20 20 |ARY TO e|xample |
|000021a0| 0d 0a 78 20 3d 20 78 52 | 45 50 4c 49 43 41 54 45 |..x = xR|EPLICATE|
|000021b0| 28 22 78 22 2c 20 31 32 | 30 29 0d 0a 3f 20 78 0d |("x", 12|0)..? x.|
|000021c0| 0a 3f 20 4c 45 4e 28 78 | 29 0d 0a 00 00 00 00 00 |.? LEN(x|).......|
|000021d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000021f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002200| 00 00 00 01 00 00 00 cd | 53 65 74 74 69 6e 67 20 |........|Setting |
|00002210| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 66 6f 72 20 |environm|ent for |
|00002220| 75 73 69 6e 67 20 4d 69 | 63 72 6f 73 6f 66 74 20 |using Mi|crosoft |
|00002230| 56 69 73 75 61 6c 20 43 | 2b 2b 20 74 6f 6f 6c 73 |Visual C|++ tools|
|00002240| 2e 0d 0a 09 63 6c 2e 65 | 78 65 20 40 64 3a 5c 74 |....cl.e|xe @d:\t|
|00002250| 65 6d 70 5c 6e 6d 61 30 | 30 31 30 38 2e 0d 0a 65 |emp\nma0|0108...e|
|00002260| 78 61 6d 70 6c 65 2e 63 | 0d 0a 09 6c 69 6e 6b 2e |xample.c|...link.|
|00002270| 65 78 65 20 40 64 3a 5c | 74 65 6d 70 5c 6e 6d 62 |exe @d:\|temp\nmb|
|00002280| 30 30 31 30 38 2e 0d 0a | 20 20 20 43 72 65 61 74 |00108...| Creat|
|00002290| 69 6e 67 20 6c 69 62 72 | 61 72 79 20 2e 5c 65 78 |ing libr|ary .\ex|
|000022a0| 61 6d 70 6c 65 2e 6c 69 | 62 20 61 6e 64 20 6f 62 |ample.li|b and ob|
|000022b0| 6a 65 63 74 20 2e 5c 65 | 78 61 6d 70 6c 65 2e 65 |ject .\e|xample.e|
|000022c0| 78 70 0d 0a 0d 0a 42 55 | 49 4c 44 20 53 55 43 43 |xp....BU|ILD SUCC|
|000022d0| 45 45 44 45 44 00 00 00 | 00 00 00 00 00 00 00 00 |EEDED...|........|
|000022e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002300| 00 00 00 01 00 00 01 92 | 4d 48 41 4e 44 4c 45 20 |........|MHANDLE |
|00002310| 20 5f 41 6c 6c 6f 63 48 | 61 6e 64 28 75 6e 73 69 | _AllocH|and(unsi|
|00002320| 67 6e 65 64 20 69 6e 74 | 20 68 73 69 7a 65 29 20 |gned int| hsize) |
|00002330| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002340| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002350| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002360| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002370| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002380| 20 20 20 20 20 20 20 20 | 20 20 0d 0a 0d 0a 49 6e | | ....In|
|00002390| 20 74 68 69 73 20 65 78 | 61 6d 70 6c 65 20 61 20 | this ex|ample a |
|000023a0| 63 68 61 72 61 63 74 65 | 72 20 69 73 20 72 65 70 |characte|r is rep|
|000023b0| 6c 69 63 61 74 65 64 20 | 69 6e 20 6d 65 6d 6f 72 |licated |in memor|
|000023c0| 79 20 73 75 70 70 6c 69 | 65 64 20 62 79 20 5f 41 |y suppli|ed by _A|
|000023d0| 6c 6c 6f 63 48 61 6e 64 | 28 29 2e 20 20 54 68 65 |llocHand|(). The|
|000023e0| 20 41 50 49 20 66 75 6e | 63 74 69 6f 6e 20 72 65 | API fun|ction re|
|000023f0| 70 6c 54 6f 4d 48 28 29 | 20 72 65 74 75 72 6e 73 |plToMH()| returns|
|00002400| 20 74 68 65 20 6d 65 6d | 6f 72 79 20 68 61 6e 64 | the mem|ory hand|
|00002410| 6c 65 20 74 6f 20 46 6f | 78 50 72 6f 2e 20 20 46 |le to Fo|xPro. F|
|00002420| 72 6f 6d 20 46 6f 78 50 | 72 6f 20 74 68 65 20 6d |rom FoxP|ro the m|
|00002430| 65 6d 6f 72 79 20 68 61 | 6e 64 6c 65 20 69 73 20 |emory ha|ndle is |
|00002440| 70 61 73 73 65 64 20 74 | 6f 20 41 50 49 20 66 75 |passed t|o API fu|
|00002450| 6e 63 74 69 6f 6e 73 20 | 77 68 69 63 68 20 65 78 |nctions |which ex|
|00002460| 70 65 63 74 20 61 20 6d | 65 6d 6f 72 79 20 68 61 |pect a m|emory ha|
|00002470| 6e 64 6c 65 20 61 72 67 | 75 6d 65 6e 74 20 28 70 |ndle arg|ument (p|
|00002480| 61 73 73 65 64 20 61 73 | 20 61 6e 20 69 6e 74 65 |assed as| an inte|
|00002490| 67 65 72 2c 20 22 49 22 | 29 2e 00 00 00 00 00 00 |ger, "I"|).......|
|000024a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024c0| 00 00 00 01 00 00 05 3a | 23 69 6e 63 6c 75 64 65 |.......:|#include|
|000024d0| 20 3c 70 72 6f 5f 65 78 | 74 2e 68 3e 0d 0a 0d 0a | <pro_ex|t.h>....|
|000024e0| 2f 2f 0d 0a 2f 2f 09 52 | 65 70 6c 69 63 61 74 65 |//..//.R|eplicate|
|000024f0| 20 63 68 61 72 20 61 72 | 67 75 6d 65 6e 74 20 74 | char ar|gument t|
|00002500| 6f 20 6d 65 6d 6f 72 79 | 20 61 6c 6c 6f 63 61 74 |o memory| allocat|
|00002510| 65 64 20 77 69 74 68 20 | 5f 41 6c 6c 6f 63 48 61 |ed with |_AllocHa|
|00002520| 6e 64 28 29 2e 0d 0a 2f | 2f 09 52 65 74 75 72 6e |nd().../|/.Return|
|00002530| 20 74 68 65 20 6d 65 6d | 6f 72 79 20 68 61 6e 64 | the mem|ory hand|
|00002540| 6c 65 20 74 6f 20 46 6f | 78 50 72 6f 2e 0d 0a 2f |le to Fo|xPro.../|
|00002550| 2f 0d 0a 76 6f 69 64 20 | 46 41 52 20 72 65 70 6c |/..void |FAR repl|
|00002560| 54 6f 4d 48 28 50 61 72 | 61 6d 42 6c 6b 20 46 41 |ToMH(Par|amBlk FA|
|00002570| 52 20 2a 70 61 72 6d 29 | 0d 0a 7b 0d 0a 09 63 68 |R *parm)|..{...ch|
|00002580| 61 72 20 46 41 52 20 2a | 72 65 70 3b 0d 0a 09 63 |ar FAR *|rep;...c|
|00002590| 68 61 72 20 63 20 3d 20 | 2a 28 63 68 61 72 20 2a |har c = |*(char *|
|000025a0| 29 20 5f 48 61 6e 64 54 | 6f 50 74 72 28 70 61 72 |) _HandT|oPtr(par|
|000025b0| 6d 2d 3e 70 5b 30 5d 2e | 76 61 6c 2e 65 76 5f 68 |m->p[0].|val.ev_h|
|000025c0| 61 6e 64 6c 65 29 3b 0d | 0a 09 4d 48 41 4e 44 4c |andle);.|..MHANDL|
|000025d0| 45 20 6d 68 3b 0d 0a 0d | 0a 09 69 66 20 28 28 6d |E mh;...|..if ((m|
|000025e0| 68 20 3d 20 5f 41 6c 6c | 6f 63 48 61 6e 64 28 28 |h = _All|ocHand((|
|000025f0| 69 6e 74 29 20 70 61 72 | 6d 2d 3e 70 5b 31 5d 2e |int) par|m->p[1].|
|00002600| 76 61 6c 2e 65 76 5f 6c | 6f 6e 67 20 2b 20 31 29 |val.ev_l|ong + 1)|
|00002610| 29 20 3d 3d 20 30 29 0d | 0a 09 7b 0d 0a 09 09 5f |) == 0).|..{...._|
|00002620| 45 72 72 6f 72 28 31 38 | 32 29 3b 20 20 2f 2f 20 |Error(18|2); // |
|00002630| 22 49 6e 73 75 66 66 69 | 63 69 65 6e 74 20 6d 65 |"Insuffi|cient me|
|00002640| 6d 6f 72 79 22 0d 0a 20 | 20 20 20 7d 0d 0a 09 5f |mory".. | }..._|
|00002650| 48 4c 6f 63 6b 28 6d 68 | 29 3b 0d 0a 09 72 65 70 |HLock(mh|);...rep|
|00002660| 20 3d 20 5f 48 61 6e 64 | 54 6f 50 74 72 28 6d 68 | = _Hand|ToPtr(mh|
|00002670| 29 3b 0d 0a 09 5f 4d 65 | 6d 46 69 6c 6c 28 72 65 |);..._Me|mFill(re|
|00002680| 70 2c 20 63 2c 20 28 69 | 6e 74 29 20 70 61 72 6d |p, c, (i|nt) parm|
|00002690| 2d 3e 70 5b 31 5d 2e 76 | 61 6c 2e 65 76 5f 6c 6f |->p[1].v|al.ev_lo|
|000026a0| 6e 67 29 3b 0d 0a 09 72 | 65 70 5b 70 61 72 6d 2d |ng);...r|ep[parm-|
|000026b0| 3e 70 5b 31 5d 2e 76 61 | 6c 2e 65 76 5f 6c 6f 6e |>p[1].va|l.ev_lon|
|000026c0| 67 5d 20 3d 20 27 5c 30 | 27 3b 20 20 2f 2f 20 6e |g] = '\0|'; // n|
|000026d0| 75 6c 6c 20 74 65 72 6d | 69 6e 61 74 65 0d 0a 09 |ull term|inate...|
|000026e0| 5f 48 55 6e 4c 6f 63 6b | 28 6d 68 29 3b 0d 0a 0d |_HUnLock|(mh);...|
|000026f0| 0a 09 5f 52 65 74 49 6e | 74 28 6d 68 2c 20 31 30 |.._RetIn|t(mh, 10|
|00002700| 29 3b 0d 0a 7d 0d 0a 0d | 0a 2f 2f 0d 0a 2f 2f 09 |);..}...|.//..//.|
|00002710| 52 65 74 75 72 6e 73 20 | 63 68 61 72 61 63 74 65 |Returns |characte|
|00002720| 72 73 20 69 6e 20 6d 65 | 6d 6f 72 79 20 68 61 6e |rs in me|mory han|
|00002730| 64 6c 65 2e 20 20 41 72 | 67 75 6d 65 6e 74 20 69 |dle. Ar|gument i|
|00002740| 6e 20 63 61 6c 6c 20 66 | 72 6f 6d 20 46 6f 78 50 |n call f|rom FoxP|
|00002750| 72 6f 0d 0a 2f 2f 09 6d | 75 73 74 20 62 65 20 61 |ro..//.m|ust be a|
|00002760| 20 76 61 6c 69 64 20 46 | 6f 78 50 72 6f 20 6d 65 | valid F|oxPro me|
|00002770| 6d 6f 72 79 20 68 61 6e | 64 6c 65 2e 0d 0a 2f 2f |mory han|dle...//|
|00002780| 0d 0a 76 6f 69 64 20 46 | 41 52 20 4d 48 54 6f 46 |..void F|AR MHToF|
|00002790| 6f 78 53 74 72 69 6e 67 | 28 50 61 72 61 6d 42 6c |oxString|(ParamBl|
|000027a0| 6b 20 46 41 52 20 2a 70 | 61 72 6d 29 0d 0a 7b 0d |k FAR *p|arm)..{.|
|000027b0| 0a 09 63 68 61 72 20 46 | 41 52 20 2a 73 74 72 69 |..char F|AR *stri|
|000027c0| 6e 67 3b 0d 0a 09 4d 48 | 41 4e 44 4c 45 20 6d 68 |ng;...MH|ANDLE mh|
|000027d0| 20 3d 20 70 61 72 6d 2d | 3e 70 5b 30 5d 2e 76 61 | = parm-|>p[0].va|
|000027e0| 6c 2e 65 76 5f 6c 6f 6e | 67 3b 0d 0a 0d 0a 09 5f |l.ev_lon|g;....._|
|000027f0| 48 4c 6f 63 6b 28 6d 68 | 29 3b 0d 0a 09 73 74 72 |HLock(mh|);...str|
|00002800| 69 6e 67 20 3d 20 5f 48 | 61 6e 64 54 6f 50 74 72 |ing = _H|andToPtr|
|00002810| 28 6d 68 29 3b 0d 0a 09 | 5f 52 65 74 43 68 61 72 |(mh);...|_RetChar|
|00002820| 28 73 74 72 69 6e 67 29 | 3b 0d 0a 09 5f 48 55 6e |(string)|;..._HUn|
|00002830| 4c 6f 63 6b 28 6d 68 29 | 3b 0d 0a 7d 0d 0a 0d 0a |Lock(mh)|;..}....|
|00002840| 2f 2f 0d 0a 2f 2f 09 46 | 72 65 65 73 20 6d 65 6d |//..//.F|rees mem|
|00002850| 6f 72 79 20 68 61 6e 64 | 6c 65 2e 20 20 41 72 67 |ory hand|le. Arg|
|00002860| 75 6d 65 6e 74 20 69 6e | 20 63 61 6c 6c 20 66 72 |ument in| call fr|
|00002870| 6f 6d 20 46 6f 78 50 72 | 6f 20 6d 75 73 74 20 62 |om FoxPr|o must b|
|00002880| 65 20 61 20 76 61 6c 69 | 64 0d 0a 2f 2f 09 46 6f |e a vali|d..//.Fo|
|00002890| 78 50 72 6f 20 6d 65 6d | 6f 72 79 20 68 61 6e 64 |xPro mem|ory hand|
|000028a0| 6c 65 2e 0d 0a 2f 2f 0d | 0a 76 6f 69 64 20 46 41 |le...//.|.void FA|
|000028b0| 52 20 66 72 65 65 4d 48 | 28 50 61 72 61 6d 42 6c |R freeMH|(ParamBl|
|000028c0| 6b 20 46 41 52 20 2a 70 | 61 72 6d 29 0d 0a 7b 0d |k FAR *p|arm)..{.|
|000028d0| 0a 09 5f 46 72 65 65 48 | 61 6e 64 28 28 4d 48 41 |.._FreeH|and((MHA|
|000028e0| 4e 44 4c 45 29 20 70 61 | 72 6d 2d 3e 70 5b 30 5d |NDLE) pa|rm->p[0]|
|000028f0| 2e 76 61 6c 2e 65 76 5f | 6c 6f 6e 67 29 3b 0d 0a |.val.ev_|long);..|
|00002900| 7d 0d 0a 0d 0a 46 6f 78 | 49 6e 66 6f 20 6d 79 46 |}....Fox|Info myF|
|00002910| 6f 78 49 6e 66 6f 5b 5d | 20 3d 0d 0a 7b 0d 0a 09 |oxInfo[]| =..{...|
|00002920| 7b 22 52 45 50 4c 54 4f | 4d 48 22 2c 20 28 46 50 |{"REPLTO|MH", (FP|
|00002930| 46 49 29 20 72 65 70 6c | 54 6f 4d 48 2c 20 32 2c |FI) repl|ToMH, 2,|
|00002940| 20 22 43 2c 49 22 7d 2c | 0d 0a 09 7b 22 4d 48 54 | "C,I"},|...{"MHT|
|00002950| 4f 46 4f 58 22 2c 20 28 | 46 50 46 49 29 20 4d 48 |OFOX", (|FPFI) MH|
|00002960| 54 6f 46 6f 78 53 74 72 | 69 6e 67 2c 20 31 2c 20 |ToFoxStr|ing, 1, |
|00002970| 22 49 22 7d 2c 0d 0a 09 | 7b 22 46 52 45 45 4d 48 |"I"},...|{"FREEMH|
|00002980| 22 2c 20 28 46 50 46 49 | 29 20 66 72 65 65 4d 48 |", (FPFI|) freeMH|
|00002990| 2c 20 31 2c 20 22 49 22 | 7d 2c 0d 0a 7d 3b 0d 0a |, 1, "I"|},..};..|
|000029a0| 0d 0a 46 6f 78 54 61 62 | 6c 65 20 5f 46 6f 78 54 |..FoxTab|le _FoxT|
|000029b0| 61 62 6c 65 20 3d 0d 0a | 7b 0d 0a 09 28 46 6f 78 |able =..|{...(Fox|
|000029c0| 54 61 62 6c 65 20 46 41 | 52 20 2a 29 20 30 2c 20 |Table FA|R *) 0, |
|000029d0| 73 69 7a 65 6f 66 28 6d | 79 46 6f 78 49 6e 66 6f |sizeof(m|yFoxInfo|
|000029e0| 29 2f 73 69 7a 65 6f 66 | 28 46 6f 78 49 6e 66 6f |)/sizeof|(FoxInfo|
|000029f0| 29 2c 20 6d 79 46 6f 78 | 49 6e 66 6f 0d 0a 7d 3b |), myFox|Info..};|
|00002a00| 0d 0a 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002a10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002a40| 00 00 00 01 00 00 00 71 | 53 45 54 20 4c 49 42 52 |.......q|SET LIBR|
|00002a50| 41 52 59 20 54 4f 20 65 | 78 61 6d 70 6c 65 0d 0a |ARY TO e|xample..|
|00002a60| 6d 68 20 3d 20 52 45 50 | 4c 54 4f 4d 48 28 22 78 |mh = REP|LTOMH("x|
|00002a70| 22 2c 20 31 32 30 29 0d | 0a 3f 20 4d 48 54 4f 46 |", 120).|.? MHTOF|
|00002a80| 4f 58 28 6d 68 29 0d 0a | 3f 20 4c 45 4e 28 4d 48 |OX(mh)..|? LEN(MH|
|00002a90| 54 4f 46 4f 58 28 6d 68 | 29 29 0d 0a 3f 20 4d 48 |TOFOX(mh|))..? MH|
|00002aa0| 54 4f 46 4f 58 28 6d 68 | 29 0d 0a 3d 20 46 52 45 |TOFOX(mh|)..= FRE|
|00002ab0| 45 4d 48 28 6d 68 29 0d | 0a 00 00 00 00 00 00 00 |EMH(mh).|........|
|00002ac0| 00 00 00 01 00 00 00 cd | 53 65 74 74 69 6e 67 20 |........|Setting |
|00002ad0| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 66 6f 72 20 |environm|ent for |
|00002ae0| 75 73 69 6e 67 20 4d 69 | 63 72 6f 73 6f 66 74 20 |using Mi|crosoft |
|00002af0| 56 69 73 75 61 6c 20 43 | 2b 2b 20 74 6f 6f 6c 73 |Visual C|++ tools|
|00002b00| 2e 0d 0a 09 63 6c 2e 65 | 78 65 20 40 64 3a 5c 74 |....cl.e|xe @d:\t|
|00002b10| 65 6d 70 5c 6e 6d 61 30 | 30 31 38 39 2e 0d 0a 65 |emp\nma0|0189...e|
|00002b20| 78 61 6d 70 6c 65 2e 63 | 0d 0a 09 6c 69 6e 6b 2e |xample.c|...link.|
|00002b30| 65 78 65 20 40 64 3a 5c | 74 65 6d 70 5c 6e 6d 62 |exe @d:\|temp\nmb|
|00002b40| 30 30 31 38 39 2e 0d 0a | 20 20 20 43 72 65 61 74 |00189...| Creat|
|00002b50| 69 6e 67 20 6c 69 62 72 | 61 72 79 20 2e 5c 65 78 |ing libr|ary .\ex|
|00002b60| 61 6d 70 6c 65 2e 6c 69 | 62 20 61 6e 64 20 6f 62 |ample.li|b and ob|
|00002b70| 6a 65 63 74 20 2e 5c 65 | 78 61 6d 70 6c 65 2e 65 |ject .\e|xample.e|
|00002b80| 78 70 0d 0a 0d 0a 42 55 | 49 4c 44 20 53 55 43 43 |xp....BU|ILD SUCC|
|00002b90| 45 45 44 45 44 00 00 00 | 00 00 00 00 00 00 00 00 |EEDED...|........|
|00002ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002bc0| 00 00 00 01 00 00 00 b5 | 6c 6f 6e 67 20 20 5f 41 |........|long _A|
|00002bd0| 6c 6c 6f 63 4d 65 6d 6f | 28 4c 6f 63 61 74 6f 72 |llocMemo|(Locator|
|00002be0| 20 46 41 52 20 2a 66 6c | 64 2c 20 6c 6f 6e 67 20 | FAR *fl|d, long |
|00002bf0| 73 69 7a 65 29 20 20 20 | 20 20 20 20 20 20 20 20 |size) | |
|00002c00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002c10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002c20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002c30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002c40| 20 20 20 20 20 20 20 20 | 20 20 0d 0a 0d 0a 54 68 | | ....Th|
|00002c50| 69 73 20 65 78 61 6d 70 | 6c 65 20 63 72 65 61 74 |is examp|le creat|
|00002c60| 65 73 20 6e 65 77 20 6d | 65 6d 6f 20 66 69 65 6c |es new m|emo fiel|
|00002c70| 64 20 63 6f 6e 74 65 6e | 74 73 2e 0d 0a 00 00 00 |d conten|ts......|
|00002c80| 00 00 00 01 00 00 02 fc | 23 69 6e 63 6c 75 64 65 |........|#include|
|00002c90| 20 3c 70 72 6f 5f 65 78 | 74 2e 68 3e 0d 0a 0d 0a | <pro_ex|t.h>....|
|00002ca0| 76 6f 69 64 20 46 41 52 | 20 6e 65 77 4d 65 6d 6f |void FAR| newMemo|
|00002cb0| 28 50 61 72 61 6d 42 6c | 6b 20 46 41 52 20 2a 70 |(ParamBl|k FAR *p|
|00002cc0| 61 72 6d 29 0d 0a 7b 0d | 0a 0d 0a 09 4c 6f 63 61 |arm)..{.|....Loca|
|00002cd0| 74 6f 72 20 46 41 52 20 | 2a 6d 65 6d 6f 46 6c 64 |tor FAR |*memoFld|
|00002ce0| 4c 6f 63 3b 0d 0a 09 46 | 43 48 41 4e 20 66 63 68 |Loc;...F|CHAN fch|
|00002cf0| 4d 65 6d 6f 3b 0d 0a 09 | 69 6e 74 20 6d 65 6d 6f |Memo;...|int memo|
|00002d00| 4c 65 6e 3b 0d 0a 09 6c | 6f 6e 67 20 6c 6f 63 3b |Len;...l|ong loc;|
|00002d10| 0d 0a 0d 0a 09 69 66 20 | 28 28 66 63 68 4d 65 6d |.....if |((fchMem|
|00002d20| 6f 20 3d 20 5f 4d 65 6d | 6f 43 68 61 6e 28 2d 31 |o = _Mem|oChan(-1|
|00002d30| 29 29 20 3d 3d 20 2d 31 | 29 0d 0a 09 7b 0d 0a 09 |)) == -1|)...{...|
|00002d40| 09 5f 55 73 65 72 45 72 | 72 6f 72 28 22 5f 4d 65 |._UserEr|ror("_Me|
|00002d50| 6d 6f 43 68 61 6e 28 29 | 20 66 61 69 6c 65 64 22 |moChan()| failed"|
|00002d60| 29 3b 0d 0a 09 7d 0d 0a | 20 20 20 20 6d 65 6d 6f |);...}..| memo|
|00002d70| 46 6c 64 4c 6f 63 20 3d | 20 26 70 61 72 6d 2d 3e |FldLoc =| &parm->|
|00002d80| 70 5b 30 5d 2e 6c 6f 63 | 3b 0d 0a 20 20 20 20 6d |p[0].loc|;.. m|
|00002d90| 65 6d 6f 4c 65 6e 20 3d | 20 70 61 72 6d 2d 3e 70 |emoLen =| parm->p|
|00002da0| 5b 31 5d 2e 76 61 6c 2e | 65 76 5f 6c 65 6e 67 74 |[1].val.|ev_lengt|
|00002db0| 68 3b 0d 0a 0d 0a 20 20 | 20 20 69 66 20 28 28 6c |h;.... | if ((l|
|00002dc0| 6f 63 20 3d 20 5f 41 6c | 6c 6f 63 4d 65 6d 6f 28 |oc = _Al|locMemo(|
|00002dd0| 6d 65 6d 6f 46 6c 64 4c | 6f 63 2c 20 6d 65 6d 6f |memoFldL|oc, memo|
|00002de0| 4c 65 6e 29 29 20 3d 3d | 20 2d 31 29 0d 0a 09 7b |Len)) ==| -1)...{|
|00002df0| 0d 0a 09 09 5f 55 73 65 | 72 45 72 72 6f 72 28 22 |...._Use|rError("|
|00002e00| 5f 41 6c 6c 6f 63 4d 65 | 6d 6f 28 29 20 66 61 69 |_AllocMe|mo() fai|
|00002e10| 6c 65 64 22 29 3b 0d 0a | 09 7d 0d 0a 20 20 20 20 |led");..|.}.. |
|00002e20| 5f 46 53 65 65 6b 28 66 | 63 68 4d 65 6d 6f 2c 20 |_FSeek(f|chMemo, |
|00002e30| 6c 6f 63 2c 20 46 53 5f | 46 52 4f 4d 42 4f 46 29 |loc, FS_|FROMBOF)|
|00002e40| 3b 0d 0a 20 20 20 20 5f | 48 4c 6f 63 6b 28 70 61 |;.. _|HLock(pa|
|00002e50| 72 6d 2d 3e 70 5b 31 5d | 2e 76 61 6c 2e 65 76 5f |rm->p[1]|.val.ev_|
|00002e60| 68 61 6e 64 6c 65 29 3b | 0d 0a 09 5f 46 57 72 69 |handle);|..._FWri|
|00002e70| 74 65 28 66 63 68 4d 65 | 6d 6f 2c 20 5f 48 61 6e |te(fchMe|mo, _Han|
|00002e80| 64 54 6f 50 74 72 28 70 | 61 72 6d 2d 3e 70 5b 31 |dToPtr(p|arm->p[1|
|00002e90| 5d 2e 76 61 6c 2e 65 76 | 5f 68 61 6e 64 6c 65 29 |].val.ev|_handle)|
|00002ea0| 2c 20 6d 65 6d 6f 4c 65 | 6e 29 3b 0d 0a 09 5f 48 |, memoLe|n);..._H|
|00002eb0| 55 6e 4c 6f 63 6b 28 70 | 61 72 6d 2d 3e 70 5b 31 |UnLock(p|arm->p[1|
|00002ec0| 5d 2e 76 61 6c 2e 65 76 | 5f 68 61 6e 64 6c 65 29 |].val.ev|_handle)|
|00002ed0| 3b 0d 0a 7d 0d 0a 0d 0a | 46 6f 78 49 6e 66 6f 20 |;..}....|FoxInfo |
|00002ee0| 6d 79 46 6f 78 49 6e 66 | 6f 5b 5d 20 3d 0d 0a 7b |myFoxInf|o[] =..{|
|00002ef0| 0d 0a 09 7b 22 4e 45 57 | 4d 45 4d 4f 22 2c 20 28 |...{"NEW|MEMO", (|
|00002f00| 46 50 46 49 29 20 6e 65 | 77 4d 65 6d 6f 2c 20 32 |FPFI) ne|wMemo, 2|
|00002f10| 2c 20 22 52 2c 43 22 7d | 2c 0d 0a 7d 3b 0d 0a 0d |, "R,C"}|,..};...|
|00002f20| 0a 46 6f 78 54 61 62 6c | 65 20 5f 46 6f 78 54 61 |.FoxTabl|e _FoxTa|
|00002f30| 62 6c 65 20 3d 0d 0a 7b | 0d 0a 20 20 20 20 28 46 |ble =..{|.. (F|
|00002f40| 6f 78 54 61 62 6c 65 20 | 46 41 52 20 2a 29 20 30 |oxTable |FAR *) 0|
|00002f50| 2c 20 73 69 7a 65 6f 66 | 28 6d 79 46 6f 78 49 6e |, sizeof|(myFoxIn|
|00002f60| 66 6f 29 2f 73 69 7a 65 | 6f 66 28 46 6f 78 49 6e |fo)/size|of(FoxIn|
|00002f70| 66 6f 29 2c 20 6d 79 46 | 6f 78 49 6e 66 6f 0d 0a |fo), myF|oxInfo..|
|00002f80| 7d 3b 0d 0a 00 00 00 00 | 00 00 00 00 00 00 00 00 |};......|........|
|00002f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002fc0| 00 00 00 01 00 00 00 b6 | 53 45 54 20 4c 49 42 52 |........|SET LIBR|
|00002fd0| 41 52 59 20 54 4f 20 65 | 78 61 6d 70 6c 65 0d 0a |ARY TO e|xample..|
|00002fe0| 43 52 45 41 54 45 20 54 | 41 42 4c 45 20 77 4d 65 |CREATE T|ABLE wMe|
|00002ff0| 6d 6f 20 28 6d 65 6d 6f | 46 69 65 6c 64 20 4d 29 |mo (memo|Field M)|
|00003000| 0d 0a 41 50 50 45 4e 44 | 20 42 4c 41 4e 4b 0d 0a |..APPEND| BLANK..|
|00003010| 3d 20 4e 65 77 4d 65 6d | 6f 28 40 4d 65 6d 6f 46 |= NewMem|o(@MemoF|
|00003020| 69 65 6c 64 2c 20 22 48 | 65 6c 6c 6f 2c 20 57 6f |ield, "H|ello, Wo|
|00003030| 72 6c 64 2e 22 29 0d 0a | 41 50 50 45 4e 44 20 42 |rld.")..|APPEND B|
|00003040| 4c 41 4e 4b 0d 0a 3d 20 | 4e 65 77 4d 65 6d 6f 28 |LANK..= |NewMemo(|
|00003050| 40 4d 65 6d 6f 46 69 65 | 6c 64 2c 20 22 49 73 20 |@MemoFie|ld, "Is |
|00003060| 74 68 69 73 20 6f 72 20 | 69 73 20 74 68 69 73 20 |this or |is this |
|00003070| 61 69 6e 27 74 20 66 75 | 6e 3f 22 29 0d 0a 00 00 |ain't fu|n?")....|
|00003080| 00 00 00 01 00 00 00 cd | 53 65 74 74 69 6e 67 20 |........|Setting |
|00003090| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 66 6f 72 20 |environm|ent for |
|000030a0| 75 73 69 6e 67 20 4d 69 | 63 72 6f 73 6f 66 74 20 |using Mi|crosoft |
|000030b0| 56 69 73 75 61 6c 20 43 | 2b 2b 20 74 6f 6f 6c 73 |Visual C|++ tools|
|000030c0| 2e 0d 0a 09 63 6c 2e 65 | 78 65 20 40 64 3a 5c 74 |....cl.e|xe @d:\t|
|000030d0| 65 6d 70 5c 6e 6d 61 30 | 30 31 33 38 2e 0d 0a 65 |emp\nma0|0138...e|
|000030e0| 78 61 6d 70 6c 65 2e 63 | 0d 0a 09 6c 69 6e 6b 2e |xample.c|...link.|
|000030f0| 65 78 65 20 40 64 3a 5c | 74 65 6d 70 5c 6e 6d 62 |exe @d:\|temp\nmb|
|00003100| 30 30 31 33 38 2e 0d 0a | 20 20 20 43 72 65 61 74 |00138...| Creat|
|00003110| 69 6e 67 20 6c 69 62 72 | 61 72 79 20 2e 5c 65 78 |ing libr|ary .\ex|
|00003120| 61 6d 70 6c 65 2e 6c 69 | 62 20 61 6e 64 20 6f 62 |ample.li|b and ob|
|00003130| 6a 65 63 74 20 2e 5c 65 | 78 61 6d 70 6c 65 2e 65 |ject .\e|xample.e|
|00003140| 78 70 0d 0a 0d 0a 42 55 | 49 4c 44 20 53 55 43 43 |xp....BU|ILD SUCC|
|00003150| 45 45 44 45 44 00 00 00 | 00 00 00 00 00 00 00 00 |EEDED...|........|
|00003160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003180| 00 00 00 01 00 00 00 f6 | 76 6f 69 64 20 20 5f 42 |........|void _B|
|00003190| 72 65 61 6b 50 6f 69 6e | 74 28 76 6f 69 64 29 20 |reakPoin|t(void) |
|000031a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000031b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000031c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000031d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000031e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000031f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003200| 20 20 20 20 20 20 20 20 | 20 20 0d 0a 0d 0a 54 68 | | ....Th|
|00003210| 69 73 20 65 78 61 6d 70 | 6c 65 20 69 6e 63 6c 75 |is examp|le inclu|
|00003220| 64 65 73 20 74 68 65 20 | 6d 61 63 72 6f 20 5f 42 |des the |macro _B|
|00003230| 72 65 61 6b 50 6f 69 6e | 74 28 29 20 77 68 69 63 |reakPoin|t() whic|
|00003240| 68 20 70 6c 61 63 65 73 | 20 61 6e 20 49 4e 54 20 |h places| an INT |
|00003250| 33 20 74 68 61 74 20 64 | 65 62 75 67 67 65 72 73 |3 that d|ebuggers|
|00003260| 20 72 65 63 6f 67 6e 69 | 7a 65 20 61 73 20 61 20 | recogni|ze as a |
|00003270| 62 72 65 61 6b 20 70 6f | 69 6e 74 2e 0d 0a 00 00 |break po|int.....|
|00003280| 00 00 00 01 00 00 02 74 | 23 69 6e 63 6c 75 64 65 |.......t|#include|
|00003290| 20 3c 70 72 6f 5f 65 78 | 74 2e 68 3e 0d 0a 0d 0a | <pro_ex|t.h>....|
|000032a0| 76 6f 69 64 20 46 41 52 | 20 45 78 61 6d 70 6c 65 |void FAR| Example|
|000032b0| 28 50 61 72 61 6d 42 6c | 6b 20 46 41 52 20 2a 70 |(ParamBl|k FAR *p|
|000032c0| 61 72 6d 29 0d 0a 7b 0d | 0a 09 69 6e 74 20 52 65 |arm)..{.|..int Re|
|000032d0| 74 56 61 6c 75 65 3b 0d | 0a 0d 0a 09 5f 42 72 65 |tValue;.|...._Bre|
|000032e0| 61 6b 50 6f 69 6e 74 28 | 29 3b 20 2f 2f 20 64 65 |akPoint(|); // de|
|000032f0| 62 75 67 67 65 72 20 62 | 72 65 61 6b 73 20 65 78 |bugger b|reaks ex|
|00003300| 65 63 75 74 69 6f 6e 20 | 68 65 72 65 0d 0a 0d 0a |ecution |here....|
|00003310| 20 20 20 20 5f 48 4c 6f | 63 6b 28 70 61 72 6d 2d | _HLo|ck(parm-|
|00003320| 3e 70 5b 30 5d 2e 76 61 | 6c 2e 65 76 5f 68 61 6e |>p[0].va|l.ev_han|
|00003330| 64 6c 65 29 3b 0d 0a 09 | 5f 48 4c 6f 63 6b 28 70 |dle);...|_HLock(p|
|00003340| 61 72 6d 2d 3e 70 5b 31 | 5d 2e 76 61 6c 2e 65 76 |arm->p[1|].val.ev|
|00003350| 5f 68 61 6e 64 6c 65 29 | 3b 0d 0a 0d 0a 09 52 65 |_handle)|;.....Re|
|00003360| 74 56 61 6c 75 65 20 3d | 20 5f 53 74 72 43 6d 70 |tValue =| _StrCmp|
|00003370| 28 5f 48 61 6e 64 54 6f | 50 74 72 28 70 61 72 6d |(_HandTo|Ptr(parm|
|00003380| 2d 3e 70 5b 30 5d 2e 76 | 61 6c 2e 65 76 5f 68 61 |->p[0].v|al.ev_ha|
|00003390| 6e 64 6c 65 29 2c 0d 0a | 09 09 5f 48 61 6e 64 54 |ndle),..|.._HandT|
|000033a0| 6f 50 74 72 28 70 61 72 | 6d 2d 3e 70 5b 31 5d 2e |oPtr(par|m->p[1].|
|000033b0| 76 61 6c 2e 65 76 5f 68 | 61 6e 64 6c 65 29 29 3b |val.ev_h|andle));|
|000033c0| 0d 0a 0d 0a 09 5f 52 65 | 74 49 6e 74 28 52 65 74 |....._Re|tInt(Ret|
|000033d0| 56 61 6c 75 65 2c 20 31 | 30 29 3b 20 2f 2f 20 64 |Value, 1|0); // d|
|000033e0| 6f 65 73 20 72 65 74 75 | 72 6e 20 63 6f 6e 74 72 |oes retu|rn contr|
|000033f0| 6f 6c 20 68 65 72 65 0d | 0a 0d 0a 20 20 20 20 5f |ol here.|... _|
|00003400| 48 55 6e 4c 6f 63 6b 28 | 70 61 72 6d 2d 3e 70 5b |HUnLock(|parm->p[|
|00003410| 30 5d 2e 76 61 6c 2e 65 | 76 5f 68 61 6e 64 6c 65 |0].val.e|v_handle|
|00003420| 29 3b 0d 0a 09 5f 48 55 | 6e 4c 6f 63 6b 28 70 61 |);..._HU|nLock(pa|
|00003430| 72 6d 2d 3e 70 5b 31 5d | 2e 76 61 6c 2e 65 76 5f |rm->p[1]|.val.ev_|
|00003440| 68 61 6e 64 6c 65 29 3b | 0d 0a 7d 0d 0a 0d 0a 46 |handle);|..}....F|
|00003450| 6f 78 49 6e 66 6f 20 6d | 79 46 6f 78 49 6e 66 6f |oxInfo m|yFoxInfo|
|00003460| 5b 5d 20 3d 0d 0a 7b 0d | 0a 09 7b 22 53 54 52 43 |[] =..{.|..{"STRC|
|00003470| 4d 50 22 2c 20 28 46 50 | 46 49 29 20 45 78 61 6d |MP", (FP|FI) Exam|
|00003480| 70 6c 65 2c 20 32 2c 20 | 22 43 2c 43 22 7d 2c 0d |ple, 2, |"C,C"},.|
|00003490| 0a 7d 3b 0d 0a 0d 0a 46 | 6f 78 54 61 62 6c 65 20 |.};....F|oxTable |
|000034a0| 5f 46 6f 78 54 61 62 6c | 65 20 3d 0d 0a 7b 0d 0a |_FoxTabl|e =..{..|
|000034b0| 20 20 20 20 28 46 6f 78 | 54 61 62 6c 65 20 46 41 | (Fox|Table FA|
|000034c0| 52 20 2a 29 20 30 2c 20 | 73 69 7a 65 6f 66 28 6d |R *) 0, |sizeof(m|
|000034d0| 79 46 6f 78 49 6e 66 6f | 29 2f 73 69 7a 65 6f 66 |yFoxInfo|)/sizeof|
|000034e0| 28 46 6f 78 49 6e 66 6f | 29 2c 20 6d 79 46 6f 78 |(FoxInfo|), myFox|
|000034f0| 49 6e 66 6f 0d 0a 7d 3b | 0d 0a 0d 0a 00 00 00 00 |Info..};|........|
|00003500| 00 00 00 01 00 00 00 1a | 53 45 54 20 4c 49 42 52 |........|SET LIBR|
|00003510| 41 52 59 20 54 4f 20 65 | 78 61 6d 70 6c 65 20 20 |ARY TO e|xample |
|00003520| 0d 0a 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003540| 00 00 00 01 00 00 00 cd | 53 65 74 74 69 6e 67 20 |........|Setting |
|00003550| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 66 6f 72 20 |environm|ent for |
|00003560| 75 73 69 6e 67 20 4d 69 | 63 72 6f 73 6f 66 74 20 |using Mi|crosoft |
|00003570| 56 69 73 75 61 6c 20 43 | 2b 2b 20 74 6f 6f 6c 73 |Visual C|++ tools|
|00003580| 2e 0d 0a 09 63 6c 2e 65 | 78 65 20 40 64 3a 5c 74 |....cl.e|xe @d:\t|
|00003590| 65 6d 70 5c 6e 6d 61 30 | 30 32 35 39 2e 0d 0a 65 |emp\nma0|0259...e|
|000035a0| 78 61 6d 70 6c 65 2e 63 | 0d 0a 09 6c 69 6e 6b 2e |xample.c|...link.|
|000035b0| 65 78 65 20 40 64 3a 5c | 74 65 6d 70 5c 6e 6d 62 |exe @d:\|temp\nmb|
|000035c0| 30 30 32 35 39 2e 0d 0a | 20 20 20 43 72 65 61 74 |00259...| Creat|
|000035d0| 69 6e 67 20 6c 69 62 72 | 61 72 79 20 2e 5c 65 78 |ing libr|ary .\ex|
|000035e0| 61 6d 70 6c 65 2e 6c 69 | 62 20 61 6e 64 20 6f 62 |ample.li|b and ob|
|000035f0| 6a 65 63 74 20 2e 5c 65 | 78 61 6d 70 6c 65 2e 65 |ject .\e|xample.e|
|00003600| 78 70 0d 0a 0d 0a 42 55 | 49 4c 44 20 53 55 43 43 |xp....BU|ILD SUCC|
|00003610| 45 45 44 45 44 00 00 00 | 00 00 00 00 00 00 00 00 |EEDED...|........|
|00003620| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003640| 00 00 00 01 00 00 01 46 | 69 6e 74 20 20 5f 43 6f |.......F|int _Co|
|00003650| 75 6e 74 49 74 65 6d 73 | 28 4d 45 4e 55 49 44 20 |untItems|(MENUID |
|00003660| 6d 65 6e 75 69 64 29 20 | 20 20 20 20 20 20 20 20 |menuid) | |
|00003670| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003680| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003690| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000036a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000036b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000036c0| 20 20 20 20 20 20 20 20 | 20 20 0d 0a 0d 0a 54 68 | | ....Th|
|000036d0| 69 73 20 65 78 61 6d 70 | 6c 65 20 63 72 65 61 74 |is examp|le creat|
|000036e0| 65 73 20 61 20 6d 65 6e | 75 20 77 69 74 68 20 74 |es a men|u with t|
|000036f0| 68 72 65 65 20 69 74 65 | 6d 73 20 61 6e 64 20 63 |hree ite|ms and c|
|00003700| 61 6c 6c 73 20 5f 43 6f | 75 6e 74 49 74 65 6d 73 |alls _Co|untItems|
|00003710| 28 29 20 74 6f 20 73 68 | 6f 77 20 74 68 61 74 20 |() to sh|ow that |
|00003720| 69 74 20 63 6f 72 72 65 | 63 74 6c 79 20 73 74 61 |it corre|ctly sta|
|00003730| 74 65 73 20 74 68 65 20 | 6e 75 6d 62 65 72 20 6f |tes the |number o|
|00003740| 66 20 69 74 65 6d 73 20 | 6f 6e 20 74 68 65 20 6d |f items |on the m|
|00003750| 65 6e 75 2e 20 20 49 74 | 20 74 68 65 6e 20 64 69 |enu. It| then di|
|00003760| 73 70 6f 73 65 73 20 6f | 66 20 69 74 65 6d 73 20 |sposes o|f items |
|00003770| 61 6e 64 20 61 67 61 69 | 6e 20 63 61 6c 6c 73 20 |and agai|n calls |
|00003780| 5f 43 6f 75 6e 74 49 74 | 65 6d 73 28 29 2e 00 00 |_CountIt|ems()...|
|00003790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000037c0| 00 00 00 01 00 00 04 af | 23 69 6e 63 6c 75 64 65 |........|#include|
|000037d0| 20 3c 70 72 6f 5f 65 78 | 74 2e 68 3e 0d 0a 0d 0a | <pro_ex|t.h>....|
|000037e0| 76 6f 69 64 20 70 75 74 | 4c 6f 6e 67 28 6c 6f 6e |void put|Long(lon|
|000037f0| 67 20 6e 29 0d 0a 7b 0d | 0a 09 09 56 61 6c 75 65 |g n)..{.|...Value|
|00003800| 20 76 61 6c 3b 0d 0a 0d | 0a 09 76 61 6c 2e 65 76 | val;...|..val.ev|
|00003810| 5f 74 79 70 65 20 3d 20 | 27 49 27 3b 0d 0a 09 76 |_type = |'I';...v|
|00003820| 61 6c 2e 65 76 5f 6c 6f | 6e 67 20 3d 20 6e 3b 0d |al.ev_lo|ng = n;.|
|00003830| 0a 09 76 61 6c 2e 65 76 | 5f 77 69 64 74 68 20 3d |..val.ev|_width =|
|00003840| 20 31 30 3b 0d 0a 0d 0a | 09 5f 50 75 74 56 61 6c | 10;....|._PutVal|
|00003850| 75 65 28 26 76 61 6c 29 | 3b 0d 0a 7d 0d 0a 0d 0a |ue(&val)|;..}....|
|00003860| 76 6f 69 64 20 46 41 52 | 20 43 6f 75 6e 74 49 74 |void FAR| CountIt|
|00003870| 65 6d 73 45 78 28 50 61 | 72 61 6d 42 6c 6b 20 46 |emsEx(Pa|ramBlk F|
|00003880| 41 52 20 2a 70 61 72 6d | 29 0d 0a 7b 0d 0a 09 4d |AR *parm|)..{...M|
|00003890| 45 4e 55 49 44 20 6d 65 | 6e 75 49 64 3b 0d 0a 09 |ENUID me|nuId;...|
|000038a0| 49 54 45 4d 49 44 20 69 | 74 65 6d 49 64 3b 0d 0a |ITEMID i|temId;..|
|000038b0| 09 50 6f 69 6e 74 20 6c | 6f 63 3b 0d 0a 0d 0a 09 |.Point l|oc;.....|
|000038c0| 6d 65 6e 75 49 64 20 3d | 20 5f 47 65 74 4e 65 77 |menuId =| _GetNew|
|000038d0| 4d 65 6e 75 49 64 28 29 | 3b 0d 0a 09 5f 4e 65 77 |MenuId()|;..._New|
|000038e0| 4d 65 6e 75 28 4d 50 4f | 50 55 50 2c 20 6d 65 6e |Menu(MPO|PUP, men|
|000038f0| 75 49 64 29 3b 0d 0a 0d | 0a 09 69 74 65 6d 49 64 |uId);...|..itemId|
|00003900| 20 3d 20 5f 47 65 74 4e | 65 77 49 74 65 6d 49 64 | = _GetN|ewItemId|
|00003910| 28 6d 65 6e 75 49 64 29 | 3b 0d 0a 09 5f 4e 65 77 |(menuId)|;..._New|
|00003920| 49 74 65 6d 28 6d 65 6e | 75 49 64 2c 20 69 74 65 |Item(men|uId, ite|
|00003930| 6d 49 64 2c 20 2d 32 2c | 20 22 5c 5c 3c 31 73 74 |mId, -2,| "\\<1st|
|00003940| 20 69 74 65 6d 22 29 3b | 0d 0a 0d 0a 09 69 74 65 | item");|.....ite|
|00003950| 6d 49 64 20 3d 20 5f 47 | 65 74 4e 65 77 49 74 65 |mId = _G|etNewIte|
|00003960| 6d 49 64 28 6d 65 6e 75 | 49 64 29 3b 0d 0a 09 5f |mId(menu|Id);..._|
|00003970| 4e 65 77 49 74 65 6d 28 | 6d 65 6e 75 49 64 2c 20 |NewItem(|menuId, |
|00003980| 69 74 65 6d 49 64 2c 20 | 2d 32 2c 20 22 5c 5c 3c |itemId, |-2, "\\<|
|00003990| 32 6e 64 20 69 74 65 6d | 22 29 3b 0d 0a 0d 0a 09 |2nd item|");.....|
|000039a0| 69 74 65 6d 49 64 20 3d | 20 5f 47 65 74 4e 65 77 |itemId =| _GetNew|
|000039b0| 49 74 65 6d 49 64 28 6d | 65 6e 75 49 64 29 3b 0d |ItemId(m|enuId);.|
|000039c0| 0a 09 5f 4e 65 77 49 74 | 65 6d 28 6d 65 6e 75 49 |.._NewIt|em(menuI|
|000039d0| 64 2c 20 69 74 65 6d 49 | 64 2c 20 2d 32 2c 20 22 |d, itemI|d, -2, "|
|000039e0| 5c 5c 3c 33 72 64 20 69 | 74 65 6d 22 29 3b 0d 0a |\\<3rd i|tem");..|
|000039f0| 0d 0a 09 6c 6f 63 2e 76 | 20 3d 20 31 30 3b 20 6c |...loc.v| = 10; l|
|00003a00| 6f 63 2e 68 20 3d 20 32 | 30 3b 0d 0a 09 5f 53 65 |oc.h = 2|0;..._Se|
|00003a10| 74 4d 65 6e 75 50 6f 69 | 6e 74 28 6d 65 6e 75 49 |tMenuPoi|nt(menuI|
|00003a20| 64 2c 20 6c 6f 63 29 3b | 0d 0a 0d 0a 20 20 20 20 |d, loc);|.... |
|00003a30| 5f 41 63 74 69 76 61 74 | 65 4d 65 6e 75 28 6d 65 |_Activat|eMenu(me|
|00003a40| 6e 75 49 64 29 3b 0d 0a | 09 5f 50 75 74 53 74 72 |nuId);..|._PutStr|
|00003a50| 28 22 5c 6e 5f 43 6f 75 | 6e 74 49 74 65 6d 73 28 |("\n_Cou|ntItems(|
|00003a60| 29 20 3d 22 29 3b 20 70 | 75 74 4c 6f 6e 67 28 5f |) ="); p|utLong(_|
|00003a70| 43 6f 75 6e 74 49 74 65 | 6d 73 28 6d 65 6e 75 49 |CountIte|ms(menuI|
|00003a80| 64 29 29 3b 0d 0a 09 5f | 45 78 65 63 75 74 65 28 |d));..._|Execute(|
|00003a90| 22 57 41 49 54 22 29 3b | 0d 0a 0d 0a 09 5f 44 69 |"WAIT");|....._Di|
|00003aa0| 73 70 6f 73 65 49 74 65 | 6d 28 6d 65 6e 75 49 64 |sposeIte|m(menuId|
|00003ab0| 2c 20 5f 47 65 74 49 74 | 65 6d 49 64 28 6d 65 6e |, _GetIt|emId(men|
|00003ac0| 75 49 64 2c 20 31 29 29 | 3b 0d 0a 09 5f 50 75 74 |uId, 1))|;..._Put|
|00003ad0| 53 74 72 28 22 5c 6e 5f | 43 6f 75 6e 74 49 74 65 |Str("\n_|CountIte|
|00003ae0| 6d 73 28 29 20 3d 22 29 | 3b 20 70 75 74 4c 6f 6e |ms() =")|; putLon|
|00003af0| 67 28 5f 43 6f 75 6e 74 | 49 74 65 6d 73 28 6d 65 |g(_Count|Items(me|
|00003b00| 6e 75 49 64 29 29 3b 0d | 0a 09 5f 45 78 65 63 75 |nuId));.|.._Execu|
|00003b10| 74 65 28 22 57 41 49 54 | 22 29 3b 0d 0a 0d 0a 09 |te("WAIT|");.....|
|00003b20| 5f 44 69 73 70 6f 73 65 | 49 74 65 6d 28 6d 65 6e |_Dispose|Item(men|
|00003b30| 75 49 64 2c 20 5f 47 65 | 74 49 74 65 6d 49 64 28 |uId, _Ge|tItemId(|
|00003b40| 6d 65 6e 75 49 64 2c 20 | 30 29 29 3b 0d 0a 09 5f |menuId, |0));..._|
|00003b50| 50 75 74 53 74 72 28 22 | 5c 6e 5f 43 6f 75 6e 74 |PutStr("|\n_Count|
|00003b60| 49 74 65 6d 73 28 29 20 | 3d 22 29 3b 20 70 75 74 |Items() |="); put|
|00003b70| 4c 6f 6e 67 28 5f 43 6f | 75 6e 74 49 74 65 6d 73 |Long(_Co|untItems|
|00003b80| 28 6d 65 6e 75 49 64 29 | 29 3b 0d 0a 09 5f 45 78 |(menuId)|);..._Ex|
|00003b90| 65 63 75 74 65 28 22 57 | 41 49 54 22 29 3b 0d 0a |ecute("W|AIT");..|
|00003ba0| 0d 0a 20 20 20 20 5f 44 | 69 73 70 6f 73 65 4d 65 |.. _D|isposeMe|
|00003bb0| 6e 75 28 6d 65 6e 75 49 | 64 29 3b 0d 0a 7d 0d 0a |nu(menuI|d);..}..|
|00003bc0| 0d 0a 46 6f 78 49 6e 66 | 6f 20 6d 79 46 6f 78 49 |..FoxInf|o myFoxI|
|00003bd0| 6e 66 6f 5b 5d 20 3d 0d | 0a 7b 0d 0a 09 7b 22 4f |nfo[] =.|.{...{"O|
|00003be0| 4e 4c 4f 41 44 22 2c 20 | 28 46 50 46 49 29 20 43 |NLOAD", |(FPFI) C|
|00003bf0| 6f 75 6e 74 49 74 65 6d | 73 45 78 2c 20 43 41 4c |ountItem|sEx, CAL|
|00003c00| 4c 4f 4e 4c 4f 41 44 2c | 20 22 22 7d 2c 0d 0a 7d |LONLOAD,| ""},..}|
|00003c10| 3b 0d 0a 0d 0a 46 6f 78 | 54 61 62 6c 65 20 5f 46 |;....Fox|Table _F|
|00003c20| 6f 78 54 61 62 6c 65 20 | 3d 0d 0a 7b 0d 0a 09 28 |oxTable |=..{...(|
|00003c30| 46 6f 78 54 61 62 6c 65 | 20 46 41 52 20 2a 29 20 |FoxTable| FAR *) |
|00003c40| 30 2c 20 73 69 7a 65 6f | 66 28 6d 79 46 6f 78 49 |0, sizeo|f(myFoxI|
|00003c50| 6e 66 6f 29 2f 73 69 7a | 65 6f 66 28 46 6f 78 49 |nfo)/siz|eof(FoxI|
|00003c60| 6e 66 6f 29 2c 20 6d 79 | 46 6f 78 49 6e 66 6f 0d |nfo), my|FoxInfo.|
|00003c70| 0a 7d 3b 0d 0a 0d 0a 00 | 00 00 00 00 00 00 00 00 |.};.....|........|
|00003c80| 00 00 00 01 00 00 00 18 | 53 45 54 20 4c 49 42 52 |........|SET LIBR|
|00003c90| 41 52 59 20 54 4f 20 65 | 78 61 6d 70 6c 65 0d 0a |ARY TO e|xample..|
|00003ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003cc0| 00 00 00 01 00 00 00 cd | 53 65 74 74 69 6e 67 20 |........|Setting |
|00003cd0| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 66 6f 72 20 |environm|ent for |
|00003ce0| 75 73 69 6e 67 20 4d 69 | 63 72 6f 73 6f 66 74 20 |using Mi|crosoft |
|00003cf0| 56 69 73 75 61 6c 20 43 | 2b 2b 20 74 6f 6f 6c 73 |Visual C|++ tools|
|00003d00| 2e 0d 0a 09 63 6c 2e 65 | 78 65 20 40 64 3a 5c 74 |....cl.e|xe @d:\t|
|00003d10| 65 6d 70 5c 6e 6d 61 30 | 30 32 39 38 2e 0d 0a 65 |emp\nma0|0298...e|
|00003d20| 78 61 6d 70 6c 65 2e 63 | 0d 0a 09 6c 69 6e 6b 2e |xample.c|...link.|
|00003d30| 65 78 65 20 40 64 3a 5c | 74 65 6d 70 5c 6e 6d 62 |exe @d:\|temp\nmb|
|00003d40| 30 30 32 39 38 2e 0d 0a | 20 20 20 43 72 65 61 74 |00298...| Creat|
|00003d50| 69 6e 67 20 6c 69 62 72 | 61 72 79 20 2e 5c 65 78 |ing libr|ary .\ex|
|00003d60| 61 6d 70 6c 65 2e 6c 69 | 62 20 61 6e 64 20 6f 62 |ample.li|b and ob|
|00003d70| 6a 65 63 74 20 2e 5c 65 | 78 61 6d 70 6c 65 2e 65 |ject .\e|xample.e|
|00003d80| 78 70 0d 0a 0d 0a 42 55 | 49 4c 44 20 53 55 43 43 |xp....BU|ILD SUCC|
|00003d90| 45 45 44 45 44 00 00 00 | 00 00 00 00 00 00 00 00 |EEDED...|........|
|00003da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003dc0| 00 00 00 01 00 00 01 62 | 69 6e 74 20 20 5f 44 42 |.......b|int _DB|
|00003dd0| 41 70 70 65 6e 64 28 69 | 6e 74 20 77 6f 72 6b 61 |Append(i|nt worka|
|00003de0| 72 65 61 2c 20 69 6e 74 | 20 63 61 72 72 79 66 6c |rea, int| carryfl|
|00003df0| 61 67 29 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ag) | |
|00003e00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003e10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003e20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003e30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003e40| 20 20 20 20 20 20 20 20 | 20 20 0d 0a 0d 0a 54 68 | | ....Th|
|00003e50| 69 73 20 65 78 61 6d 70 | 6c 65 20 63 61 6c 6c 73 |is examp|le calls|
|00003e60| 20 5f 44 42 41 70 70 65 | 6e 64 28 29 20 74 6f 20 | _DBAppe|nd() to |
|00003e70| 61 70 70 65 6e 64 20 61 | 20 72 65 63 6f 72 64 20 |append a| record |
|00003e80| 74 6f 20 74 68 65 20 44 | 42 46 20 69 6e 20 74 68 |to the D|BF in th|
|00003e90| 65 20 63 75 72 72 65 6e | 74 20 77 6f 72 6b 20 61 |e curren|t work a|
|00003ea0| 72 65 61 2e 20 20 54 68 | 65 20 41 50 49 20 6c 69 |rea. Th|e API li|
|00003eb0| 62 72 61 72 79 20 66 75 | 6e 63 74 69 6f 6e 20 74 |brary fu|nction t|
|00003ec0| 61 6b 65 73 20 61 20 63 | 61 72 72 79 20 66 6c 61 |akes a c|arry fla|
|00003ed0| 67 20 61 73 20 61 20 70 | 61 72 61 6d 65 74 65 72 |g as a p|arameter|
|00003ee0| 20 28 70 61 73 73 65 64 | 20 6f 6e 20 74 6f 20 5f | (passed| on to _|
|00003ef0| 44 42 41 70 70 65 6e 64 | 28 29 29 20 61 6e 64 20 |DBAppend|()) and |
|00003f00| 74 68 65 20 46 6f 78 50 | 72 6f 20 65 78 61 6d 70 |the FoxP|ro examp|
|00003f10| 6c 65 20 64 65 6d 6f 6e | 73 74 72 61 74 65 73 20 |le demon|strates |
|00003f20| 69 74 20 75 73 65 73 2e | 0d 0a 00 00 00 00 00 00 |it uses.|........|
|00003f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f40| 00 00 00 01 00 00 01 55 | 23 69 6e 63 6c 75 64 65 |.......U|#include|
|00003f50| 20 3c 70 72 6f 5f 65 78 | 74 2e 68 3e 0d 0a 0d 0a | <pro_ex|t.h>....|
|00003f60| 76 6f 69 64 20 46 41 52 | 20 45 78 61 6d 70 6c 65 |void FAR| Example|
|00003f70| 28 50 61 72 61 6d 42 6c | 6b 20 46 41 52 20 2a 70 |(ParamBl|k FAR *p|
|00003f80| 61 72 6d 29 0d 0a 7b 0d | 0a 09 69 6e 74 20 52 65 |arm)..{.|..int Re|
|00003f90| 74 43 6f 64 65 3b 0d 0a | 09 69 66 20 28 28 52 65 |tCode;..|.if ((Re|
|00003fa0| 74 43 6f 64 65 20 3d 20 | 5f 44 42 41 70 70 65 6e |tCode = |_DBAppen|
|00003fb0| 64 28 2d 31 2c 20 28 69 | 6e 74 29 20 70 61 72 6d |d(-1, (i|nt) parm|
|00003fc0| 2d 3e 70 5b 30 5d 2e 76 | 61 6c 2e 65 76 5f 6c 6f |->p[0].v|al.ev_lo|
|00003fd0| 6e 67 29 29 20 3c 20 30 | 29 20 7b 0d 0a 09 09 5f |ng)) < 0|) {...._|
|00003fe0| 45 72 72 6f 72 28 2d 52 | 65 74 43 6f 64 65 29 3b |Error(-R|etCode);|
|00003ff0| 0d 0a 09 7d 0d 0a 7d 0d | 0a 46 6f 78 49 6e 66 6f |...}..}.|.FoxInfo|
|00004000| 20 6d 79 46 6f 78 49 6e | 66 6f 5b 5d 20 3d 20 7b | myFoxIn|fo[] = {|
|00004010| 0d 0a 09 7b 22 44 42 41 | 50 50 45 4e 44 22 2c 20 |...{"DBA|PPEND", |
|00004020| 28 46 50 46 49 29 20 45 | 78 61 6d 70 6c 65 2c 20 |(FPFI) E|xample, |
|00004030| 31 2c 20 22 49 22 7d 2c | 0d 0a 7d 3b 0d 0a 46 6f |1, "I"},|..};..Fo|
|00004040| 78 54 61 62 6c 65 20 5f | 46 6f 78 54 61 62 6c 65 |xTable _|FoxTable|
|00004050| 20 3d 20 7b 0d 0a 09 28 | 46 6f 78 54 61 62 6c 65 | = {...(|FoxTable|
|00004060| 20 46 41 52 20 2a 29 20 | 30 2c 20 73 69 7a 65 6f | FAR *) |0, sizeo|
|00004070| 66 28 6d 79 46 6f 78 49 | 6e 66 6f 29 2f 73 69 7a |f(myFoxI|nfo)/siz|
|00004080| 65 6f 66 28 46 6f 78 49 | 6e 66 6f 29 2c 20 6d 79 |eof(FoxI|nfo), my|
|00004090| 46 6f 78 49 6e 66 6f 0d | 0a 7d 3b 0d 0a 00 00 00 |FoxInfo.|.};.....|
|000040a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000040c0| 00 00 00 01 00 00 01 db | 53 45 54 20 4c 49 42 52 |........|SET LIBR|
|000040d0| 41 52 59 20 54 4f 20 65 | 78 61 6d 70 6c 65 0d 0a |ARY TO e|xample..|
|000040e0| 44 4f 20 43 72 65 61 74 | 65 54 65 73 74 0d 0a 0d |DO Creat|eTest...|
|000040f0| 0a 53 45 54 20 43 41 52 | 52 59 20 4f 4e 0d 0a 3d |.SET CAR|RY ON..=|
|00004100| 20 44 42 41 50 50 45 4e | 44 28 2d 31 29 09 26 26 | DBAPPEN|D(-1).&&|
|00004110| 20 53 45 54 20 43 41 52 | 52 59 20 69 73 20 4f 4e | SET CAR|RY is ON|
|00004120| 2c 20 73 6f 20 63 61 72 | 72 79 0d 0a 53 45 54 20 |, so car|ry..SET |
|00004130| 43 41 52 52 59 20 4f 46 | 46 0d 0a 3d 20 44 42 41 |CARRY OF|F..= DBA|
|00004140| 50 50 45 4e 44 28 31 29 | 09 26 26 20 63 61 72 72 |PPEND(1)|.&& carr|
|00004150| 79 20 72 65 67 61 72 64 | 6c 65 73 73 20 6f 66 20 |y regard|less of |
|00004160| 53 45 54 20 43 41 52 52 | 59 0d 0a 3d 20 44 42 41 |SET CARR|Y..= DBA|
|00004170| 50 50 45 4e 44 28 2d 31 | 29 09 26 26 20 53 45 54 |PPEND(-1|).&& SET|
|00004180| 20 43 41 52 52 59 20 69 | 73 20 4f 46 46 2c 20 73 | CARRY i|s OFF, s|
|00004190| 6f 20 6e 6f 20 63 61 72 | 72 79 0d 0a 0d 0a 50 52 |o no car|ry....PR|
|000041a0| 4f 43 45 44 55 52 45 20 | 43 72 65 61 74 65 54 65 |OCEDURE |CreateTe|
|000041b0| 73 74 0d 0a 0d 0a 43 52 | 45 41 54 45 20 54 41 42 |st....CR|EATE TAB|
|000041c0| 4c 45 20 74 65 73 74 20 | 28 41 42 43 20 43 28 32 |LE test |(ABC C(2|
|000041d0| 30 29 29 0d 0a 41 50 50 | 45 4e 44 20 42 4c 41 4e |0))..APP|END BLAN|
|000041e0| 4b 0d 0a 52 45 50 4c 41 | 43 45 20 41 42 43 20 57 |K..REPLA|CE ABC W|
|000041f0| 49 54 48 20 22 47 6f 6c | 6c 79 20 6d 6f 6e 74 68 |ITH "Gol|ly month|
|00004200| 20 6f 66 22 0d 0a 41 50 | 50 45 4e 44 20 42 4c 41 | of"..AP|PEND BLA|
|00004210| 4e 4b 0d 0a 52 45 50 4c | 41 43 45 20 41 42 43 20 |NK..REPL|ACE ABC |
|00004220| 57 49 54 48 20 22 41 20 | 74 77 65 6c 76 65 74 68 |WITH "A |twelveth|
|00004230| 20 6f 66 22 0d 0a 41 50 | 50 45 4e 44 20 42 4c 41 | of"..AP|PEND BLA|
|00004240| 4e 4b 0d 0a 52 45 50 4c | 41 43 45 20 41 42 43 20 |NK..REPL|ACE ABC |
|00004250| 57 49 54 48 20 22 48 65 | 6c 6c 6f 2c 20 77 6f 72 |WITH "He|llo, wor|
|00004260| 6c 64 22 0d 0a 41 50 50 | 45 4e 44 20 42 4c 41 4e |ld"..APP|END BLAN|
|00004270| 4b 0d 0a 52 45 50 4c 41 | 43 45 20 41 42 43 20 57 |K..REPLA|CE ABC W|
|00004280| 49 54 48 20 22 57 68 65 | 6e 20 69 6e 20 74 68 65 |ITH "Whe|n in the|
|00004290| 22 0d 0a 47 4f 20 54 4f | 50 0d 0a 0d 0a 52 45 54 |"..GO TO|P....RET|
|000042a0| 55 52 4e 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |URN.....|........|
|000042b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000042c0| 00 00 00 01 00 00 00 cd | 53 65 74 74 69 6e 67 20 |........|Setting |
|000042d0| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 66 6f 72 20 |environm|ent for |
|000042e0| 75 73 69 6e 67 20 4d 69 | 63 72 6f 73 6f 66 74 20 |using Mi|crosoft |
|000042f0| 56 69 73 75 61 6c 20 43 | 2b 2b 20 74 6f 6f 6c 73 |Visual C|++ tools|
|00004300| 2e 0d 0a 09 63 6c 2e 65 | 78 65 20 40 64 3a 5c 74 |....cl.e|xe @d:\t|
|00004310| 65 6d 70 5c 6e 6d 61 30 | 30 31 34 39 2e 0d 0a 65 |emp\nma0|0149...e|
|00004320| 78 61 6d 70 6c 65 2e 63 | 0d 0a 09 6c 69 6e 6b 2e |xample.c|...link.|
|00004330| 65 78 65 20 40 64 3a 5c | 74 65 6d 70 5c 6e 6d 62 |exe @d:\|temp\nmb|
|00004340| 30 30 31 34 39 2e 0d 0a | 20 20 20 43 72 65 61 74 |00149...| Creat|
|00004350| 69 6e 67 20 6c 69 62 72 | 61 72 79 20 2e 5c 65 78 |ing libr|ary .\ex|
|00004360| 61 6d 70 6c 65 2e 6c 69 | 62 20 61 6e 64 20 6f 62 |ample.li|b and ob|
|00004370| 6a 65 63 74 20 2e 5c 65 | 78 61 6d 70 6c 65 2e 65 |ject .\e|xample.e|
|00004380| 78 70 0d 0a 0d 0a 42 55 | 49 4c 44 20 53 55 43 43 |xp....BU|ILD SUCC|
|00004390| 45 45 44 45 44 00 00 00 | 00 00 00 00 00 00 00 00 |EEDED...|........|
|000043a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000043c0| 00 00 00 01 00 00 01 93 | 69 6e 74 20 20 5f 44 42 |........|int _DB|
|000043d0| 4c 6f 63 6b 28 69 6e 74 | 20 77 6f 72 6b 61 72 65 |Lock(int| workare|
|000043e0| 61 2c 20 69 6e 74 20 77 | 68 61 74 29 20 20 20 20 |a, int w|hat) |
|000043f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004400| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004410| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004420| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004430| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004440| 20 20 20 20 20 20 20 20 | 20 20 0d 0a 0d 0a 54 68 | | ....Th|
|00004450| 69 73 20 65 78 61 6d 70 | 6c 65 20 70 72 6f 76 69 |is examp|le provi|
|00004460| 64 65 73 20 74 77 6f 20 | 41 50 49 20 66 75 6e 63 |des two |API func|
|00004470| 74 69 6f 6e 73 20 63 61 | 6c 6c 61 62 6c 65 20 66 |tions ca|llable f|
|00004480| 72 6f 6d 20 46 6f 78 50 | 72 6f 2c 20 58 52 4c 4f |rom FoxP|ro, XRLO|
|00004490| 43 4b 28 29 20 77 68 69 | 63 68 20 6c 6f 63 6b 73 |CK() whi|ch locks|
|000044a0| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 72 65 63 | the cur|rent rec|
|000044b0| 6f 72 64 20 6f 66 20 74 | 68 65 20 63 75 72 72 65 |ord of t|he curre|
|000044c0| 6e 74 20 77 6f 72 6b 20 | 61 72 65 61 20 61 6e 64 |nt work |area and|
|000044d0| 20 58 46 4c 4f 43 4b 28 | 29 20 77 68 69 63 68 20 | XFLOCK(|) which |
|000044e0| 6c 6f 63 6b 73 20 74 68 | 65 20 44 42 46 20 6f 66 |locks th|e DBF of|
|000044f0| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 77 6f 72 | the cur|rent wor|
|00004500| 6b 20 61 72 65 61 2e 20 | 20 58 52 4c 4f 43 4b 28 |k area. | XRLOCK(|
|00004510| 29 20 63 61 6c 6c 73 20 | 5f 44 42 4c 6f 63 6b 28 |) calls |_DBLock(|
|00004520| 2d 31 2c 20 44 42 4c 5f | 52 45 43 4f 52 44 29 20 |-1, DBL_|RECORD) |
|00004530| 61 6e 64 20 58 46 4c 4f | 43 4b 28 29 20 63 61 6c |and XFLO|CK() cal|
|00004540| 6c 73 20 5f 44 42 4c 6f | 63 6b 28 2d 31 2c 20 44 |ls _DBLo|ck(-1, D|
|00004550| 42 4c 5f 46 49 4c 45 29 | 2e 0d 0a 00 00 00 00 00 |BL_FILE)|........|
|00004560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004580| 00 00 00 01 00 00 01 84 | 23 69 6e 63 6c 75 64 65 |........|#include|
|00004590| 20 3c 70 72 6f 5f 65 78 | 74 2e 68 3e 0d 0a 0d 0a | <pro_ex|t.h>....|
|000045a0| 76 6f 69 64 20 46 41 52 | 20 78 4c 6f 63 6b 52 65 |void FAR| xLockRe|
|000045b0| 63 6f 72 64 28 50 61 72 | 61 6d 42 6c 6b 20 46 41 |cord(Par|amBlk FA|
|000045c0| 52 20 2a 70 61 72 6d 29 | 0d 0a 7b 0d 0a 09 5f 44 |R *parm)|..{..._D|
|000045d0| 42 4c 6f 63 6b 28 2d 31 | 2c 20 44 42 4c 5f 52 45 |BLock(-1|, DBL_RE|
|000045e0| 43 4f 52 44 29 3b 0d 0a | 7d 0d 0a 0d 0a 76 6f 69 |CORD);..|}....voi|
|000045f0| 64 20 46 41 52 20 78 4c | 6f 63 6b 46 69 6c 65 28 |d FAR xL|ockFile(|
|00004600| 50 61 72 61 6d 42 6c 6b | 20 46 41 52 20 2a 70 61 |ParamBlk| FAR *pa|
|00004610| 72 6d 29 0d 0a 7b 0d 0a | 09 5f 44 42 4c 6f 63 6b |rm)..{..|._DBLock|
|00004620| 28 2d 31 2c 20 44 42 4c | 5f 46 49 4c 45 29 3b 0d |(-1, DBL|_FILE);.|
|00004630| 0a 7d 0d 0a 0d 0a 46 6f | 78 49 6e 66 6f 20 6d 79 |.}....Fo|xInfo my|
|00004640| 46 6f 78 49 6e 66 6f 5b | 5d 20 3d 0d 0a 7b 0d 0a |FoxInfo[|] =..{..|
|00004650| 09 7b 22 58 52 4c 4f 43 | 4b 22 2c 20 28 46 50 46 |.{"XRLOC|K", (FPF|
|00004660| 49 29 20 78 4c 6f 63 6b | 52 65 63 6f 72 64 2c 20 |I) xLock|Record, |
|00004670| 30 2c 20 22 22 7d 2c 0d | 0a 09 7b 22 58 46 4c 4f |0, ""},.|..{"XFLO|
|00004680| 43 4b 22 2c 20 28 46 50 | 46 49 29 20 78 4c 6f 63 |CK", (FP|FI) xLoc|
|00004690| 6b 46 69 6c 65 2c 20 20 | 20 30 2c 20 22 22 7d 2c |kFile, | 0, ""},|
|000046a0| 0d 0a 7d 3b 0d 0a 0d 0a | 46 6f 78 54 61 62 6c 65 |..};....|FoxTable|
|000046b0| 20 5f 46 6f 78 54 61 62 | 6c 65 20 3d 0d 0a 7b 0d | _FoxTab|le =..{.|
|000046c0| 0a 09 28 46 6f 78 54 61 | 62 6c 65 20 46 41 52 20 |..(FoxTa|ble FAR |
|000046d0| 2a 29 20 30 2c 20 73 69 | 7a 65 6f 66 28 6d 79 46 |*) 0, si|zeof(myF|
|000046e0| 6f 78 49 6e 66 6f 29 2f | 73 69 7a 65 6f 66 28 46 |oxInfo)/|sizeof(F|
|000046f0| 6f 78 49 6e 66 6f 29 2c | 20 6d 79 46 6f 78 49 6e |oxInfo),| myFoxIn|
|00004700| 66 6f 0d 0a 7d 3b 0d 0a | 0d 0a 0d 0a 00 00 00 00 |fo..};..|........|
|00004710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004720| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004740| 00 00 00 01 00 00 01 bb | 53 45 54 20 4c 49 42 52 |........|SET LIBR|
|00004750| 41 52 59 20 54 4f 20 65 | 78 61 6d 70 6c 65 20 20 |ARY TO e|xample |
|00004760| 0d 0a 44 4f 20 43 72 65 | 61 74 65 54 65 73 74 0d |..DO Cre|ateTest.|
|00004770| 0a 55 53 45 20 54 65 73 | 74 20 53 48 41 52 45 44 |.USE Tes|t SHARED|
|00004780| 0d 0a 47 4f 20 32 0d 0a | 3d 20 58 52 4c 4f 43 4b |..GO 2..|= XRLOCK|
|00004790| 28 29 0d 0a 4c 49 53 54 | 20 53 54 41 54 20 20 26 |()..LIST| STAT &|
|000047a0| 26 20 73 68 6f 77 73 20 | 74 68 61 74 20 72 65 63 |& shows |that rec|
|000047b0| 6f 72 64 20 23 32 20 69 | 73 20 6c 6f 63 6b 65 64 |ord #2 i|s locked|
|000047c0| 0d 0a 3d 20 58 46 4c 4f | 43 4b 28 29 0d 0a 4c 49 |..= XFLO|CK()..LI|
|000047d0| 53 54 20 53 54 41 54 20 | 20 26 26 20 73 68 6f 77 |ST STAT | && show|
|000047e0| 73 20 74 68 61 74 20 77 | 68 6f 6c 65 20 44 42 46 |s that w|hole DBF|
|000047f0| 20 69 73 20 6c 6f 63 6b | 65 64 0d 0a 0d 0a 50 52 | is lock|ed....PR|
|00004800| 4f 43 45 44 55 52 45 20 | 43 72 65 61 74 65 54 65 |OCEDURE |CreateTe|
|00004810| 73 74 0d 0a 0d 0a 43 52 | 45 41 54 45 20 54 41 42 |st....CR|EATE TAB|
|00004820| 4c 45 20 74 65 73 74 20 | 28 41 42 43 20 43 28 32 |LE test |(ABC C(2|
|00004830| 30 29 29 0d 0a 41 50 50 | 45 4e 44 20 42 4c 41 4e |0))..APP|END BLAN|
|00004840| 4b 0d 0a 52 45 50 4c 41 | 43 45 20 41 42 43 20 57 |K..REPLA|CE ABC W|
|00004850| 49 54 48 20 22 47 6f 6c | 6c 79 20 6d 6f 6e 74 68 |ITH "Gol|ly month|
|00004860| 20 6f 66 22 0d 0a 41 50 | 50 45 4e 44 20 42 4c 41 | of"..AP|PEND BLA|
|00004870| 4e 4b 0d 0a 52 45 50 4c | 41 43 45 20 41 42 43 20 |NK..REPL|ACE ABC |
|00004880| 57 49 54 48 20 22 41 20 | 74 77 65 6c 76 65 74 68 |WITH "A |twelveth|
|00004890| 20 6f 66 22 0d 0a 41 50 | 50 45 4e 44 20 42 4c 41 | of"..AP|PEND BLA|
|000048a0| 4e 4b 0d 0a 52 45 50 4c | 41 43 45 20 41 42 43 20 |NK..REPL|ACE ABC |
|000048b0| 57 49 54 48 20 22 48 65 | 6c 6c 6f 2c 20 77 6f 72 |WITH "He|llo, wor|
|000048c0| 6c 64 22 0d 0a 41 50 50 | 45 4e 44 20 42 4c 41 4e |ld"..APP|END BLAN|
|000048d0| 4b 0d 0a 52 45 50 4c 41 | 43 45 20 41 42 43 20 57 |K..REPLA|CE ABC W|
|000048e0| 49 54 48 20 22 57 68 65 | 6e 20 69 6e 20 74 68 65 |ITH "Whe|n in the|
|000048f0| 22 0d 0a 47 4f 20 54 4f | 50 0d 0a 0d 0a 52 45 54 |"..GO TO|P....RET|
|00004900| 55 52 4e 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |URN.....|........|
|00004910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004940| 00 00 00 01 00 00 00 cd | 53 65 74 74 69 6e 67 20 |........|Setting |
|00004950| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 66 6f 72 20 |environm|ent for |
|00004960| 75 73 69 6e 67 20 4d 69 | 63 72 6f 73 6f 66 74 20 |using Mi|crosoft |
|00004970| 56 69 73 75 61 6c 20 43 | 2b 2b 20 74 6f 6f 6c 73 |Visual C|++ tools|
|00004980| 2e 0d 0a 09 63 6c 2e 65 | 78 65 20 40 64 3a 5c 74 |....cl.e|xe @d:\t|
|00004990| 65 6d 70 5c 6e 6d 61 30 | 30 31 39 33 2e 0d 0a 65 |emp\nma0|0193...e|
|000049a0| 78 61 6d 70 6c 65 2e 63 | 0d 0a 09 6c 69 6e 6b 2e |xample.c|...link.|
|000049b0| 65 78 65 20 40 64 3a 5c | 74 65 6d 70 5c 6e 6d 62 |exe @d:\|temp\nmb|
|000049c0| 30 30 31 39 33 2e 0d 0a | 20 20 20 43 72 65 61 74 |00193...| Creat|
|000049d0| 69 6e 67 20 6c 69 62 72 | 61 72 79 20 2e 5c 65 78 |ing libr|ary .\ex|
|000049e0| 61 6d 70 6c 65 2e 6c 69 | 62 20 61 6e 64 20 6f 62 |ample.li|b and ob|
|000049f0| 6a 65 63 74 20 2e 5c 65 | 78 61 6d 70 6c 65 2e 65 |ject .\e|xample.e|
|00004a00| 78 70 0d 0a 0d 0a 42 55 | 49 4c 44 20 53 55 43 43 |xp....BU|ILD SUCC|
|00004a10| 45 45 44 45 44 00 00 00 | 00 00 00 00 00 00 00 00 |EEDED...|........|
|00004a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004a40| 00 00 00 01 00 00 01 13 | 69 6e 74 20 20 5f 44 42 |........|int _DB|
|00004a50| 52 65 61 64 28 69 6e 74 | 20 77 6f 72 6b 61 72 65 |Read(int| workare|
|00004a60| 61 2c 20 6c 6f 6e 67 20 | 72 65 63 6f 72 64 29 20 |a, long |record) |
|00004a70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004a80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004a90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004aa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004ab0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004ac0| 20 20 20 20 20 20 20 20 | 20 20 0d 0a 0d 0a 54 68 | | ....Th|
|00004ad0| 69 73 20 65 78 61 6d 70 | 6c 65 20 70 72 6f 76 69 |is examp|le provi|
|00004ae0| 64 65 73 20 73 69 6d 69 | 6c 61 72 20 66 75 6e 63 |des simi|lar func|
|00004af0| 74 69 6f 6e 61 6c 69 74 | 79 20 61 73 20 74 68 65 |tionalit|y as the|
|00004b00| 20 46 6f 78 50 72 6f 20 | 63 6f 6d 6d 61 6e 64 20 | FoxPro |command |
|00004b10| 47 4f 2e 20 20 58 47 4f | 28 6e 29 20 6d 6f 76 65 |GO. XGO|(n) move|
|00004b20| 73 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 72 65 |s the cu|rrent re|
|00004b30| 63 6f 72 64 20 70 6f 69 | 6e 74 65 72 20 74 6f 20 |cord poi|nter to |
|00004b40| 6e 20 69 6e 20 74 68 65 | 20 63 75 72 72 65 6e 74 |n in the| current|
|00004b50| 20 77 6f 72 6b 20 61 72 | 65 61 2e 00 00 00 00 00 | work ar|ea......|
|00004b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004b80| 00 00 00 01 00 00 01 10 | 23 69 6e 63 6c 75 64 65 |........|#include|
|00004b90| 20 3c 70 72 6f 5f 65 78 | 74 2e 68 3e 0d 0a 0d 0a | <pro_ex|t.h>....|
|00004ba0| 76 6f 69 64 20 46 41 52 | 20 45 78 61 6d 70 6c 65 |void FAR| Example|
|00004bb0| 28 50 61 72 61 6d 42 6c | 6b 20 46 41 52 20 2a 70 |(ParamBl|k FAR *p|
|00004bc0| 61 72 6d 29 0d 0a 7b 0d | 0a 09 5f 44 42 52 65 61 |arm)..{.|.._DBRea|
|00004bd0| 64 28 2d 31 2c 20 70 61 | 72 6d 2d 3e 70 5b 30 5d |d(-1, pa|rm->p[0]|
|00004be0| 2e 76 61 6c 2e 65 76 5f | 6c 6f 6e 67 29 3b 0d 0a |.val.ev_|long);..|
|00004bf0| 7d 0d 0a 0d 0a 46 6f 78 | 49 6e 66 6f 20 6d 79 46 |}....Fox|Info myF|
|00004c00| 6f 78 49 6e 66 6f 5b 5d | 20 3d 0d 0a 7b 0d 0a 09 |oxInfo[]| =..{...|
|00004c10| 7b 22 58 47 4f 22 2c 20 | 28 46 50 46 49 29 20 45 |{"XGO", |(FPFI) E|
|00004c20| 78 61 6d 70 6c 65 2c 20 | 31 2c 20 22 49 22 7d 2c |xample, |1, "I"},|
|00004c30| 0d 0a 7d 3b 0d 0a 0d 0a | 46 6f 78 54 61 62 6c 65 |..};....|FoxTable|
|00004c40| 20 5f 46 6f 78 54 61 62 | 6c 65 20 3d 0d 0a 7b 0d | _FoxTab|le =..{.|
|00004c50| 0a 09 28 46 6f 78 54 61 | 62 6c 65 20 46 41 52 20 |..(FoxTa|ble FAR |
|00004c60| 2a 29 20 30 2c 20 73 69 | 7a 65 6f 66 28 6d 79 46 |*) 0, si|zeof(myF|
|00004c70| 6f 78 49 6e 66 6f 29 2f | 73 69 7a 65 6f 66 28 46 |oxInfo)/|sizeof(F|
|00004c80| 6f 78 49 6e 66 6f 29 2c | 20 6d 79 46 6f 78 49 6e |oxInfo),| myFoxIn|
|00004c90| 66 6f 0d 0a 7d 3b 0d 0a | 00 00 00 00 00 00 00 00 |fo..};..|........|
|00004ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004cc0| 00 00 00 01 00 00 01 6c | 53 45 54 20 4c 49 42 52 |.......l|SET LIBR|
|00004cd0| 41 52 59 20 54 4f 20 65 | 78 61 6d 70 6c 65 20 20 |ARY TO e|xample |
|00004ce0| 0d 0a 44 4f 20 43 72 65 | 61 74 65 54 65 73 74 0d |..DO Cre|ateTest.|
|00004cf0| 0a 55 53 45 20 54 65 73 | 74 20 53 48 41 52 45 44 |.USE Tes|t SHARED|
|00004d00| 0d 0a 47 4f 20 42 4f 54 | 54 4f 4d 0d 0a 3f 20 52 |..GO BOT|TOM..? R|
|00004d10| 45 43 4e 4f 28 29 0d 0a | 3d 20 58 47 4f 28 32 29 |ECNO()..|= XGO(2)|
|00004d20| 0d 0a 3f 20 52 45 43 4e | 4f 28 29 0d 0a 0d 0a 50 |..? RECN|O()....P|
|00004d30| 52 4f 43 45 44 55 52 45 | 20 43 72 65 61 74 65 54 |ROCEDURE| CreateT|
|00004d40| 65 73 74 0d 0a 0d 0a 43 | 52 45 41 54 45 20 54 41 |est....C|REATE TA|
|00004d50| 42 4c 45 20 74 65 73 74 | 20 28 41 42 43 20 43 28 |BLE test| (ABC C(|
|00004d60| 32 30 29 29 0d 0a 41 50 | 50 45 4e 44 20 42 4c 41 |20))..AP|PEND BLA|
|00004d70| 4e 4b 0d 0a 52 45 50 4c | 41 43 45 20 41 42 43 20 |NK..REPL|ACE ABC |
|00004d80| 57 49 54 48 20 22 47 6f | 6c 6c 79 20 6d 6f 6e 74 |WITH "Go|lly mont|
|00004d90| 68 20 6f 66 22 0d 0a 41 | 50 50 45 4e 44 20 42 4c |h of"..A|PPEND BL|
|00004da0| 41 4e 4b 0d 0a 52 45 50 | 4c 41 43 45 20 41 42 43 |ANK..REP|LACE ABC|
|00004db0| 20 57 49 54 48 20 22 41 | 20 74 77 65 6c 76 65 74 | WITH "A| twelvet|
|00004dc0| 68 20 6f 66 22 0d 0a 41 | 50 50 45 4e 44 20 42 4c |h of"..A|PPEND BL|
|00004dd0| 41 4e 4b 0d 0a 52 45 50 | 4c 41 43 45 20 41 42 43 |ANK..REP|LACE ABC|
|00004de0| 20 57 49 54 48 20 22 48 | 65 6c 6c 6f 2c 20 77 6f | WITH "H|ello, wo|
|00004df0| 72 6c 64 22 0d 0a 41 50 | 50 45 4e 44 20 42 4c 41 |rld"..AP|PEND BLA|
|00004e00| 4e 4b 0d 0a 52 45 50 4c | 41 43 45 20 41 42 43 20 |NK..REPL|ACE ABC |
|00004e10| 57 49 54 48 20 22 57 68 | 65 6e 20 69 6e 20 74 68 |WITH "Wh|en in th|
|00004e20| 65 22 0d 0a 47 4f 20 54 | 4f 50 0d 0a 0d 0a 52 45 |e"..GO T|OP....RE|
|00004e30| 54 55 52 4e 00 00 00 00 | 00 00 00 00 00 00 00 00 |TURN....|........|
|00004e40| 00 00 00 01 00 00 00 cd | 53 65 74 74 69 6e 67 20 |........|Setting |
|00004e50| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 66 6f 72 20 |environm|ent for |
|00004e60| 75 73 69 6e 67 20 4d 69 | 63 72 6f 73 6f 66 74 20 |using Mi|crosoft |
|00004e70| 56 69 73 75 61 6c 20 43 | 2b 2b 20 74 6f 6f 6c 73 |Visual C|++ tools|
|00004e80| 2e 0d 0a 09 63 6c 2e 65 | 78 65 20 40 64 3a 5c 74 |....cl.e|xe @d:\t|
|00004e90| 65 6d 70 5c 6e 6d 61 30 | 30 31 37 38 2e 0d 0a 65 |emp\nma0|0178...e|
|00004ea0| 78 61 6d 70 6c 65 2e 63 | 0d 0a 09 6c 69 6e 6b 2e |xample.c|...link.|
|00004eb0| 65 78 65 20 40 64 3a 5c | 74 65 6d 70 5c 6e 6d 62 |exe @d:\|temp\nmb|
|00004ec0| 30 30 31 37 38 2e 0d 0a | 20 20 20 43 72 65 61 74 |00178...| Creat|
|00004ed0| 69 6e 67 20 6c 69 62 72 | 61 72 79 20 2e 5c 65 78 |ing libr|ary .\ex|
|00004ee0| 61 6d 70 6c 65 2e 6c 69 | 62 20 61 6e 64 20 6f 62 |ample.li|b and ob|
|00004ef0| 6a 65 63 74 20 2e 5c 65 | 78 61 6d 70 6c 65 2e 65 |ject .\e|xample.e|
|00004f00| 78 70 0d 0a 0d 0a 42 55 | 49 4c 44 20 53 55 43 43 |xp....BU|ILD SUCC|
|00004f10| 45 45 44 45 44 00 00 00 | 00 00 00 00 00 00 00 00 |EEDED...|........|
|00004f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004f40| 00 00 00 01 00 00 00 ce | 6c 6f 6e 67 20 20 5f 44 |........|long _D|
|00004f50| 42 52 65 63 43 6f 75 6e | 74 28 69 6e 74 20 77 6f |BRecCoun|t(int wo|
|00004f60| 72 6b 61 72 65 61 29 20 | 20 20 20 20 20 20 20 20 |rkarea) | |
|00004f70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004f80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004f90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004fa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004fb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004fc0| 20 20 20 20 20 20 20 20 | 20 20 0d 0a 0d 0a 54 68 | | ....Th|
|00004fd0| 69 73 20 65 78 61 6d 70 | 6c 65 20 63 61 6c 6c 73 |is examp|le calls|
|00004fe0| 20 5f 44 42 52 65 63 43 | 6f 75 6e 74 28 29 20 66 | _DBRecC|ount() f|
|00004ff0| 6f 72 20 74 68 65 20 44 | 42 46 20 69 6e 20 74 68 |or the D|BF in th|
|00005000| 65 20 63 75 72 72 65 6e | 74 20 77 6f 72 6b 20 61 |e curren|t work a|
|00005010| 72 65 61 2e 0d 0a 00 00 | 00 00 00 00 00 00 00 00 |rea.....|........|
|00005020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005040| 00 00 00 01 00 00 01 09 | 23 69 6e 63 6c 75 64 65 |........|#include|
|00005050| 20 3c 70 72 6f 5f 65 78 | 74 2e 68 3e 0d 0a 0d 0a | <pro_ex|t.h>....|
|00005060| 76 6f 69 64 20 46 41 52 | 20 45 78 61 6d 70 6c 65 |void FAR| Example|
|00005070| 28 50 61 72 61 6d 42 6c | 6b 20 46 41 52 20 2a 70 |(ParamBl|k FAR *p|
|00005080| 61 72 6d 29 0d 0a 7b 0d | 0a 09 5f 52 65 74 49 6e |arm)..{.|.._RetIn|
|00005090| 74 28 5f 44 42 52 65 63 | 43 6f 75 6e 74 28 2d 31 |t(_DBRec|Count(-1|
|000050a0| 29 2c 20 31 30 29 3b 0d | 0a 7d 0d 0a 46 6f 78 49 |), 10);.|.}..FoxI|
|000050b0| 6e 66 6f 20 6d 79 46 6f | 78 49 6e 66 6f 5b 5d 20 |nfo myFo|xInfo[] |
|000050c0| 3d 20 7b 0d 0a 09 7b 22 | 44 42 52 45 43 43 4f 55 |= {...{"|DBRECCOU|
|000050d0| 4e 54 22 2c 20 28 46 50 | 46 49 29 20 45 78 61 6d |NT", (FP|FI) Exam|
|000050e0| 70 6c 65 2c 20 30 2c 20 | 22 22 7d 2c 0d 0a 7d 3b |ple, 0, |""},..};|
|000050f0| 0d 0a 46 6f 78 54 61 62 | 6c 65 20 5f 46 6f 78 54 |..FoxTab|le _FoxT|
|00005100| 61 62 6c 65 20 3d 20 7b | 0d 0a 09 28 46 6f 78 54 |able = {|...(FoxT|
|00005110| 61 62 6c 65 20 46 41 52 | 20 2a 29 20 30 2c 20 73 |able FAR| *) 0, s|
|00005120| 69 7a 65 6f 66 28 6d 79 | 46 6f 78 49 6e 66 6f 29 |izeof(my|FoxInfo)|
|00005130| 2f 73 69 7a 65 6f 66 28 | 46 6f 78 49 6e 66 6f 29 |/sizeof(|FoxInfo)|
|00005140| 2c 20 6d 79 46 6f 78 49 | 6e 66 6f 0d 0a 7d 3b 0d |, myFoxI|nfo..};.|
|00005150| 0a 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005180| 00 00 00 01 00 00 01 81 | 53 45 54 20 4c 49 42 52 |........|SET LIBR|
|00005190| 41 52 59 20 54 4f 20 65 | 78 61 6d 70 6c 65 0d 0a |ARY TO e|xample..|
|000051a0| 44 4f 20 43 72 65 61 74 | 65 54 65 73 74 0d 0a 3f |DO Creat|eTest..?|
|000051b0| 20 44 42 52 45 43 43 4f | 55 4e 54 28 29 09 26 26 | DBRECCO|UNT().&&|
|000051c0| 20 63 61 6c 6c 20 41 50 | 49 20 72 6f 75 74 69 6e | call AP|I routin|
|000051d0| 65 0d 0a 3f 20 52 45 43 | 43 4f 55 4e 54 28 29 09 |e..? REC|COUNT().|
|000051e0| 26 26 20 63 61 6c 6c 20 | 62 75 69 6c 74 2d 69 6e |&& call |built-in|
|000051f0| 20 46 6f 78 50 72 6f 20 | 66 75 6e 63 74 69 6f 6e | FoxPro |function|
|00005200| 0d 0a 0d 0a 50 52 4f 43 | 45 44 55 52 45 20 43 72 |....PROC|EDURE Cr|
|00005210| 65 61 74 65 54 65 73 74 | 0d 0a 0d 0a 43 52 45 41 |eateTest|....CREA|
|00005220| 54 45 20 54 41 42 4c 45 | 20 74 65 73 74 20 28 41 |TE TABLE| test (A|
|00005230| 42 43 20 43 28 32 30 29 | 29 0d 0a 41 50 50 45 4e |BC C(20)|)..APPEN|
|00005240| 44 20 42 4c 41 4e 4b 0d | 0a 52 45 50 4c 41 43 45 |D BLANK.|.REPLACE|
|00005250| 20 41 42 43 20 57 49 54 | 48 20 22 47 6f 6c 6c 79 | ABC WIT|H "Golly|
|00005260| 20 6d 6f 6e 74 68 20 6f | 66 22 0d 0a 41 50 50 45 | month o|f"..APPE|
|00005270| 4e 44 20 42 4c 41 4e 4b | 0d 0a 52 45 50 4c 41 43 |ND BLANK|..REPLAC|
|00005280| 45 20 41 42 43 20 57 49 | 54 48 20 22 41 20 74 77 |E ABC WI|TH "A tw|
|00005290| 65 6c 76 65 74 68 20 6f | 66 22 0d 0a 41 50 50 45 |elveth o|f"..APPE|
|000052a0| 4e 44 20 42 4c 41 4e 4b | 0d 0a 52 45 50 4c 41 43 |ND BLANK|..REPLAC|
|000052b0| 45 20 41 42 43 20 57 49 | 54 48 20 22 48 65 6c 6c |E ABC WI|TH "Hell|
|000052c0| 6f 2c 20 77 6f 72 6c 64 | 22 0d 0a 41 50 50 45 4e |o, world|"..APPEN|
|000052d0| 44 20 42 4c 41 4e 4b 0d | 0a 52 45 50 4c 41 43 45 |D BLANK.|.REPLACE|
|000052e0| 20 41 42 43 20 57 49 54 | 48 20 22 57 68 65 6e 20 | ABC WIT|H "When |
|000052f0| 69 6e 20 74 68 65 22 0d | 0a 47 4f 20 54 4f 50 0d |in the".|.GO TOP.|
|00005300| 0a 0d 0a 52 45 54 55 52 | 4e 00 00 00 00 00 00 00 |...RETUR|N.......|
|00005310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005340| 00 00 00 01 00 00 00 cd | 53 65 74 74 69 6e 67 20 |........|Setting |
|00005350| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 66 6f 72 20 |environm|ent for |
|00005360| 75 73 69 6e 67 20 4d 69 | 63 72 6f 73 6f 66 74 20 |using Mi|crosoft |
|00005370| 56 69 73 75 61 6c 20 43 | 2b 2b 20 74 6f 6f 6c 73 |Visual C|++ tools|
|00005380| 2e 0d 0a 09 63 6c 2e 65 | 78 65 20 40 64 3a 5c 74 |....cl.e|xe @d:\t|
|00005390| 65 6d 70 5c 6e 6d 61 30 | 30 32 34 37 2e 0d 0a 65 |emp\nma0|0247...e|
|000053a0| 78 61 6d 70 6c 65 2e 63 | 0d 0a 09 6c 69 6e 6b 2e |xample.c|...link.|
|000053b0| 65 78 65 20 40 64 3a 5c | 74 65 6d 70 5c 6e 6d 62 |exe @d:\|temp\nmb|
|000053c0| 30 30 32 34 37 2e 0d 0a | 20 20 20 43 72 65 61 74 |00247...| Creat|
|000053d0| 69 6e 67 20 6c 69 62 72 | 61 72 79 20 2e 5c 65 78 |ing libr|ary .\ex|
|000053e0| 61 6d 70 6c 65 2e 6c 69 | 62 20 61 6e 64 20 6f 62 |ample.li|b and ob|
|000053f0| 6a 65 63 74 20 2e 5c 65 | 78 61 6d 70 6c 65 2e 65 |ject .\e|xample.e|
|00005400| 78 70 0d 0a 0d 0a 42 55 | 49 4c 44 20 53 55 43 43 |xp....BU|ILD SUCC|
|00005410| 45 45 44 45 44 00 00 00 | 00 00 00 00 00 00 00 00 |EEDED...|........|
|00005420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005440| 00 00 00 01 00 00 00 d3 | 6c 6f 6e 67 20 20 5f 44 |........|long _D|
|00005450| 42 52 65 63 4e 6f 28 69 | 6e 74 20 77 6f 72 6b 61 |BRecNo(i|nt worka|
|00005460| 72 65 61 29 20 20 20 20 | 20 20 20 20 20 20 20 20 |rea) | |
|00005470| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005480| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005490| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000054a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000054b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000054c0| 20 20 20 20 20 20 20 20 | 20 20 0d 0a 0d 0a 54 68 | | ....Th|
|000054d0| 69 73 20 65 78 61 6d 70 | 6c 65 20 70 72 6f 76 69 |is examp|le provi|
|000054e0| 64 65 73 20 73 69 6d 69 | 6c 61 72 20 66 75 6e 63 |des simi|lar func|
|000054f0| 74 69 6f 6e 61 6c 69 74 | 79 20 61 73 20 74 68 65 |tionalit|y as the|
|00005500| 20 46 6f 78 50 72 6f 20 | 66 75 6e 63 74 69 6f 6e | FoxPro |function|
|00005510| 20 52 45 43 4e 4f 28 29 | 2e 0d 0a 00 00 00 00 00 | RECNO()|........|
|00005520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005540| 00 00 00 01 00 00 01 04 | 23 69 6e 63 6c 75 64 65 |........|#include|
|00005550| 20 3c 70 72 6f 5f 65 78 | 74 2e 68 3e 0d 0a 0d 0a | <pro_ex|t.h>....|
|00005560| 76 6f 69 64 20 46 41 52 | 20 45 78 61 6d 70 6c 65 |void FAR| Example|
|00005570| 28 50 61 72 61 6d 42 6c | 6b 20 46 41 52 20 2a 70 |(ParamBl|k FAR *p|
|00005580| 61 72 6d 29 0d 0a 7b 0d | 0a 09 5f 52 65 74 49 6e |arm)..{.|.._RetIn|
|00005590| 74 28 5f 44 42 52 65 63 | 4e 6f 28 2d 31 29 2c 20 |t(_DBRec|No(-1), |
|000055a0| 31 30 29 3b 0d 0a 7d 0d | 0a 46 6f 78 49 6e 66 6f |10);..}.|.FoxInfo|
|000055b0| 20 6d 79 46 6f 78 49 6e | 66 6f 5b 5d 20 3d 0d 0a | myFoxIn|fo[] =..|
|000055c0| 7b 0d 0a 09 7b 22 44 42 | 52 45 43 4e 4f 22 2c 20 |{...{"DB|RECNO", |
|000055d0| 28 46 50 46 49 29 20 45 | 78 61 6d 70 6c 65 2c 20 |(FPFI) E|xample, |
|000055e0| 30 2c 20 22 22 7d 2c 0d | 0a 7d 3b 0d 0a 46 6f 78 |0, ""},.|.};..Fox|
|000055f0| 54 61 62 6c 65 20 5f 46 | 6f 78 54 61 62 6c 65 20 |Table _F|oxTable |
|00005600| 3d 20 7b 0d 0a 09 28 46 | 6f 78 54 61 62 6c 65 20 |= {...(F|oxTable |
|00005610| 46 41 52 20 2a 29 20 30 | 2c 20 73 69 7a 65 6f 66 |FAR *) 0|, sizeof|
|00005620| 28 6d 79 46 6f 78 49 6e | 66 6f 29 2f 73 69 7a 65 |(myFoxIn|fo)/size|
|00005630| 6f 66 28 46 6f 78 49 6e | 66 6f 29 2c 20 6d 79 46 |of(FoxIn|fo), myF|
|00005640| 6f 78 49 6e 66 6f 0d 0a | 7d 3b 0d 0a 00 00 00 00 |oxInfo..|};......|
|00005650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005660| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005670| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005680| 00 00 00 01 00 00 01 d6 | 53 45 54 20 4c 49 42 52 |........|SET LIBR|
|00005690| 41 52 59 20 54 4f 20 65 | 78 61 6d 70 6c 65 20 0d |ARY TO e|xample .|
|000056a0| 0a 44 4f 20 43 72 65 61 | 74 65 54 65 73 74 0d 0a |.DO Crea|teTest..|
|000056b0| 47 4f 20 33 0d 0a 3f 20 | 44 42 52 45 43 4e 4f 28 |GO 3..? |DBRECNO(|
|000056c0| 29 0d 0a 47 4f 20 36 0d | 0a 3f 20 44 42 52 45 43 |)..GO 6.|.? DBREC|
|000056d0| 4e 4f 28 29 0d 0a 55 53 | 45 0d 0a 3f 20 44 42 52 |NO()..US|E..? DBR|
|000056e0| 45 43 4e 4f 28 29 20 20 | 26 26 20 72 65 74 75 72 |ECNO() |&& retur|
|000056f0| 6e 73 20 2d 31 31 39 0d | 0a 0d 0a 50 52 4f 43 45 |ns -119.|...PROCE|
|00005700| 44 55 52 45 20 43 72 65 | 61 74 65 54 65 73 74 0d |DURE Cre|ateTest.|
|00005710| 0a 0d 0a 43 52 45 41 54 | 45 20 54 41 42 4c 45 20 |...CREAT|E TABLE |
|00005720| 74 65 73 74 20 28 41 42 | 43 20 43 28 32 30 29 29 |test (AB|C C(20))|
|00005730| 0d 0a 41 50 50 45 4e 44 | 20 42 4c 41 4e 4b 0d 0a |..APPEND| BLANK..|
|00005740| 52 45 50 4c 41 43 45 20 | 41 42 43 20 57 49 54 48 |REPLACE |ABC WITH|
|00005750| 20 22 4a 6f 6c 6c 79 20 | 6d 6f 6e 74 68 20 6f 66 | "Jolly |month of|
|00005760| 22 0d 0a 41 50 50 45 4e | 44 20 42 4c 41 4e 4b 0d |"..APPEN|D BLANK.|
|00005770| 0a 52 45 50 4c 41 43 45 | 20 41 42 43 20 57 49 54 |.REPLACE| ABC WIT|
|00005780| 48 20 22 41 20 74 77 65 | 6c 76 65 74 68 20 6f 66 |H "A twe|lveth of|
|00005790| 22 0d 0a 41 50 50 45 4e | 44 20 42 4c 41 4e 4b 0d |"..APPEN|D BLANK.|
|000057a0| 0a 52 45 50 4c 41 43 45 | 20 41 42 43 20 57 49 54 |.REPLACE| ABC WIT|
|000057b0| 48 20 22 48 65 6c 6c 6f | 2c 20 77 6f 72 6c 64 22 |H "Hello|, world"|
|000057c0| 0d 0a 41 50 50 45 4e 44 | 20 42 4c 41 4e 4b 0d 0a |..APPEND| BLANK..|
|000057d0| 52 45 50 4c 41 43 45 20 | 41 42 43 20 57 49 54 48 |REPLACE |ABC WITH|
|000057e0| 20 22 57 68 65 6e 20 69 | 6e 20 74 68 65 22 0d 0a | "When i|n the"..|
|000057f0| 41 50 50 45 4e 44 20 42 | 4c 41 4e 4b 0d 0a 52 45 |APPEND B|LANK..RE|
|00005800| 50 4c 41 43 45 20 41 42 | 43 20 57 49 54 48 20 22 |PLACE AB|C WITH "|
|00005810| 47 6f 6f 64 20 67 6f 6c | 6c 79 22 0d 0a 41 50 50 |Good gol|ly"..APP|
|00005820| 45 4e 44 20 42 4c 41 4e | 4b 0d 0a 52 45 50 4c 41 |END BLAN|K..REPLA|
|00005830| 43 45 20 41 42 43 20 57 | 49 54 48 20 22 46 6f 75 |CE ABC W|ITH "Fou|
|00005840| 72 20 73 63 6f 72 65 20 | 61 6e 64 22 0d 0a 47 4f |r score |and"..GO|
|00005850| 20 54 4f 50 0d 0a 0d 0a | 52 45 54 55 52 4e 00 00 | TOP....|RETURN..|
|00005860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005870| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005880| 00 00 00 01 00 00 00 cd | 53 65 74 74 69 6e 67 20 |........|Setting |
|00005890| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 66 6f 72 20 |environm|ent for |
|000058a0| 75 73 69 6e 67 20 4d 69 | 63 72 6f 73 6f 66 74 20 |using Mi|crosoft |
|000058b0| 56 69 73 75 61 6c 20 43 | 2b 2b 20 74 6f 6f 6c 73 |Visual C|++ tools|
|000058c0| 2e 0d 0a 09 63 6c 2e 65 | 78 65 20 40 64 3a 5c 74 |....cl.e|xe @d:\t|
|000058d0| 65 6d 70 5c 6e 6d 61 30 | 30 31 37 36 2e 0d 0a 65 |emp\nma0|0176...e|
|000058e0| 78 61 6d 70 6c 65 2e 63 | 0d 0a 09 6c 69 6e 6b 2e |xample.c|...link.|
|000058f0| 65 78 65 20 40 64 3a 5c | 74 65 6d 70 5c 6e 6d 62 |exe @d:\|temp\nmb|
|00005900| 30 30 31 37 36 2e 0d 0a | 20 20 20 43 72 65 61 74 |00176...| Creat|
|00005910| 69 6e 67 20 6c 69 62 72 | 61 72 79 20 2e 5c 65 78 |ing libr|ary .\ex|
|00005920| 61 6d 70 6c 65 2e 6c 69 | 62 20 61 6e 64 20 6f 62 |ample.li|b and ob|
|00005930| 6a 65 63 74 20 2e 5c 65 | 78 61 6d 70 6c 65 2e 65 |ject .\e|xample.e|
|00005940| 78 70 0d 0a 0d 0a 42 55 | 49 4c 44 20 53 55 43 43 |xp....BU|ILD SUCC|
|00005950| 45 45 44 45 44 00 00 00 | 00 00 00 00 00 00 00 00 |EEDED...|........|
|00005960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005980| 00 00 00 01 00 00 01 0a | 69 6e 74 20 20 5f 44 42 |........|int _DB|
|00005990| 52 65 70 6c 61 63 65 28 | 4c 6f 63 61 74 6f 72 20 |Replace(|Locator |
|000059a0| 46 41 52 20 2a 66 6c 64 | 2c 20 56 61 6c 75 65 20 |FAR *fld|, Value |
|000059b0| 46 41 52 20 2a 76 61 6c | 29 20 20 20 20 20 20 20 |FAR *val|) |
|000059c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000059d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000059e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000059f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005a00| 20 20 20 20 20 20 20 20 | 20 20 0d 0a 0d 0a 54 68 | | ....Th|
|00005a10| 69 73 20 65 78 61 6d 70 | 6c 65 20 64 75 70 6c 69 |is examp|le dupli|
|00005a20| 63 61 74 65 73 20 73 6f | 6d 65 20 6f 66 20 74 68 |cates so|me of th|
|00005a30| 65 20 66 75 6e 63 74 69 | 6f 6e 61 6c 69 74 79 20 |e functi|onality |
|00005a40| 6f 66 20 74 68 65 20 46 | 6f 78 50 72 6f 20 63 6f |of the F|oxPro co|
|00005a50| 6d 6d 61 6e 64 20 52 45 | 50 4c 41 43 45 20 28 62 |mmand RE|PLACE (b|
|00005a60| 75 74 20 77 6f 72 6b 73 | 20 73 74 72 69 63 74 6c |ut works| strictl|
|00005a70| 79 20 6f 6e 20 61 20 73 | 69 6e 67 6c 65 20 72 65 |y on a s|ingle re|
|00005a80| 63 6f 72 64 20 61 74 20 | 61 20 74 69 6d 65 29 2e |cord at |a time).|
|00005a90| 0d 0a 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ac0| 00 00 00 01 00 00 01 28 | 23 69 6e 63 6c 75 64 65 |.......(|#include|
|00005ad0| 20 3c 70 72 6f 5f 65 78 | 74 2e 68 3e 0d 0a 0d 0a | <pro_ex|t.h>....|
|00005ae0| 76 6f 69 64 20 46 41 52 | 20 45 78 61 6d 70 6c 65 |void FAR| Example|
|00005af0| 28 50 61 72 61 6d 42 6c | 6b 20 46 41 52 20 2a 70 |(ParamBl|k FAR *p|
|00005b00| 61 72 6d 29 0d 0a 7b 0d | 0a 09 5f 52 65 74 49 6e |arm)..{.|.._RetIn|
|00005b10| 74 28 5f 44 42 52 65 70 | 6c 61 63 65 28 26 70 61 |t(_DBRep|lace(&pa|
|00005b20| 72 6d 2d 3e 70 5b 30 5d | 2e 6c 6f 63 2c 20 26 70 |rm->p[0]|.loc, &p|
|00005b30| 61 72 6d 2d 3e 70 5b 31 | 5d 2e 76 61 6c 29 2c 20 |arm->p[1|].val), |
|00005b40| 31 30 29 3b 0d 0a 7d 0d | 0a 46 6f 78 49 6e 66 6f |10);..}.|.FoxInfo|
|00005b50| 20 6d 79 46 6f 78 49 6e | 66 6f 5b 5d 20 3d 20 7b | myFoxIn|fo[] = {|
|00005b60| 0d 0a 09 7b 22 44 42 52 | 45 50 4c 41 43 45 22 2c |...{"DBR|EPLACE",|
|00005b70| 20 28 46 50 46 49 29 20 | 45 78 61 6d 70 6c 65 2c | (FPFI) |Example,|
|00005b80| 20 32 2c 20 22 52 2c 3f | 22 7d 2c 0d 0a 7d 3b 0d | 2, "R,?|"},..};.|
|00005b90| 0a 46 6f 78 54 61 62 6c | 65 20 5f 46 6f 78 54 61 |.FoxTabl|e _FoxTa|
|00005ba0| 62 6c 65 20 3d 20 7b 0d | 0a 09 28 46 6f 78 54 61 |ble = {.|..(FoxTa|
|00005bb0| 62 6c 65 20 46 41 52 20 | 2a 29 20 30 2c 20 73 69 |ble FAR |*) 0, si|
|00005bc0| 7a 65 6f 66 28 6d 79 46 | 6f 78 49 6e 66 6f 29 2f |zeof(myF|oxInfo)/|
|00005bd0| 73 69 7a 65 6f 66 28 46 | 6f 78 49 6e 66 6f 29 2c |sizeof(F|oxInfo),|
|00005be0| 20 6d 79 46 6f 78 49 6e | 66 6f 0d 0a 7d 3b 0d 0a | myFoxIn|fo..};..|
|00005bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005c00| 00 00 00 01 00 00 01 a0 | 53 45 54 20 4c 49 42 52 |........|SET LIBR|
|00005c10| 41 52 59 20 54 4f 20 65 | 78 61 6d 70 6c 65 0d 0a |ARY TO e|xample..|
|00005c20| 44 4f 20 43 72 65 61 74 | 65 54 65 73 74 0d 0a 3f |DO Creat|eTest..?|
|00005c30| 20 44 42 52 45 50 4c 41 | 43 45 28 40 41 42 43 2c | DBREPLA|CE(@ABC,|
|00005c40| 20 22 48 65 6c 6c 6f 2c | 20 77 6f 72 6c 64 2e 22 | "Hello,| world."|
|00005c50| 29 0d 0a 3f 20 44 42 52 | 45 50 4c 41 43 45 28 40 |)..? DBR|EPLACE(@|
|00005c60| 41 42 43 2c 20 32 29 20 | 20 26 26 20 72 65 74 75 |ABC, 2) | && retu|
|00005c70| 72 6e 73 20 2d 33 30 32 | 20 62 65 63 61 75 73 65 |rns -302| because|
|00005c80| 20 66 69 65 6c 64 20 41 | 42 43 20 69 73 20 61 20 | field A|BC is a |
|00005c90| 63 68 61 72 61 63 74 65 | 72 20 66 69 65 6c 64 0d |characte|r field.|
|00005ca0| 0a 0d 0a 50 52 4f 43 45 | 44 55 52 45 20 43 72 65 |...PROCE|DURE Cre|
|00005cb0| 61 74 65 54 65 73 74 0d | 0a 0d 0a 43 52 45 41 54 |ateTest.|...CREAT|
|00005cc0| 45 20 54 41 42 4c 45 20 | 74 65 73 74 20 28 41 42 |E TABLE |test (AB|
|00005cd0| 43 20 43 28 32 30 29 29 | 0d 0a 41 50 50 45 4e 44 |C C(20))|..APPEND|
|00005ce0| 20 42 4c 41 4e 4b 0d 0a | 52 45 50 4c 41 43 45 20 | BLANK..|REPLACE |
|00005cf0| 41 42 43 20 57 49 54 48 | 20 22 47 6f 6c 6c 79 20 |ABC WITH| "Golly |
|00005d00| 6d 6f 6e 74 68 20 6f 66 | 22 0d 0a 41 50 50 45 4e |month of|"..APPEN|
|00005d10| 44 20 42 4c 41 4e 4b 0d | 0a 52 45 50 4c 41 43 45 |D BLANK.|.REPLACE|
|00005d20| 20 41 42 43 20 57 49 54 | 48 20 22 41 20 74 77 65 | ABC WIT|H "A twe|
|00005d30| 6c 76 65 74 68 20 6f 66 | 22 0d 0a 41 50 50 45 4e |lveth of|"..APPEN|
|00005d40| 44 20 42 4c 41 4e 4b 0d | 0a 52 45 50 4c 41 43 45 |D BLANK.|.REPLACE|
|00005d50| 20 41 42 43 20 57 49 54 | 48 20 22 48 65 6c 6c 6f | ABC WIT|H "Hello|
|00005d60| 2c 20 77 6f 72 6c 64 22 | 0d 0a 41 50 50 45 4e 44 |, world"|..APPEND|
|00005d70| 20 42 4c 41 4e 4b 0d 0a | 52 45 50 4c 41 43 45 20 | BLANK..|REPLACE |
|00005d80| 41 42 43 20 57 49 54 48 | 20 22 57 68 65 6e 20 69 |ABC WITH| "When i|
|00005d90| 6e 20 74 68 65 22 0d 0a | 47 4f 20 54 4f 50 0d 0a |n the"..|GO TOP..|
|00005da0| 0d 0a 52 45 54 55 52 4e | 00 00 00 00 00 00 00 00 |..RETURN|........|
|00005db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005dc0| 00 00 00 01 00 00 00 cd | 53 65 74 74 69 6e 67 20 |........|Setting |
|00005dd0| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 66 6f 72 20 |environm|ent for |
|00005de0| 75 73 69 6e 67 20 4d 69 | 63 72 6f 73 6f 66 74 20 |using Mi|crosoft |
|00005df0| 56 69 73 75 61 6c 20 43 | 2b 2b 20 74 6f 6f 6c 73 |Visual C|++ tools|
|00005e00| 2e 0d 0a 09 63 6c 2e 65 | 78 65 20 40 64 3a 5c 74 |....cl.e|xe @d:\t|
|00005e10| 65 6d 70 5c 6e 6d 61 30 | 30 32 37 36 2e 0d 0a 65 |emp\nma0|0276...e|
|00005e20| 78 61 6d 70 6c 65 2e 63 | 0d 0a 09 6c 69 6e 6b 2e |xample.c|...link.|
|00005e30| 65 78 65 20 40 64 3a 5c | 74 65 6d 70 5c 6e 6d 62 |exe @d:\|temp\nmb|
|00005e40| 30 30 32 37 36 2e 0d 0a | 20 20 20 43 72 65 61 74 |00276...| Creat|
|00005e50| 69 6e 67 20 6c 69 62 72 | 61 72 79 20 2e 5c 65 78 |ing libr|ary .\ex|
|00005e60| 61 6d 70 6c 65 2e 6c 69 | 62 20 61 6e 64 20 6f 62 |ample.li|b and ob|
|00005e70| 6a 65 63 74 20 2e 5c 65 | 78 61 6d 70 6c 65 2e 65 |ject .\e|xample.e|
|00005e80| 78 70 0d 0a 0d 0a 42 55 | 49 4c 44 20 53 55 43 43 |xp....BU|ILD SUCC|
|00005e90| 45 45 44 45 44 00 00 00 | 00 00 00 00 00 00 00 00 |EEDED...|........|
|00005ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ec0| 00 00 00 01 00 00 01 04 | 6c 6f 6e 67 20 20 5f 44 |........|long _D|
|00005ed0| 42 52 65 77 69 6e 64 28 | 69 6e 74 20 77 6f 72 6b |BRewind(|int work|
|00005ee0| 61 72 65 61 29 20 20 20 | 20 20 20 20 20 20 20 20 |area) | |
|00005ef0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005f00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005f10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005f20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005f30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005f40| 20 20 20 20 20 20 20 20 | 20 20 0d 0a 0d 0a 54 68 | | ....Th|
|00005f50| 69 73 20 65 78 61 6d 70 | 6c 65 20 63 61 6c 6c 73 |is examp|le calls|
|00005f60| 20 5f 44 42 52 65 77 69 | 6e 64 28 29 20 66 6f 72 | _DBRewi|nd() for|
|00005f70| 20 74 68 65 20 44 42 46 | 20 69 6e 20 74 68 65 20 | the DBF| in the |
|00005f80| 63 75 72 72 65 6e 74 20 | 77 6f 72 6b 20 61 72 65 |current |work are|
|00005f90| 61 2e 20 20 54 68 69 73 | 20 68 61 73 20 74 68 65 |a. This| has the|
|00005fa0| 20 73 61 6d 65 20 65 66 | 66 65 63 74 20 61 73 20 | same ef|fect as |
|00005fb0| 74 68 65 20 46 6f 78 50 | 72 6f 20 63 6f 6d 6d 61 |the FoxP|ro comma|
|00005fc0| 6e 64 20 47 4f 20 54 4f | 50 2e 0d 0a 00 00 00 00 |nd GO TO|P.......|
|00005fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006000| 00 00 00 01 00 00 01 05 | 23 69 6e 63 6c 75 64 65 |........|#include|
|00006010| 20 3c 70 72 6f 5f 65 78 | 74 2e 68 3e 0d 0a 0d 0a | <pro_ex|t.h>....|
|00006020| 76 6f 69 64 20 46 41 52 | 20 45 78 61 6d 70 6c 65 |void FAR| Example|
|00006030| 28 50 61 72 61 6d 42 6c | 6b 20 46 41 52 20 2a 70 |(ParamBl|k FAR *p|
|00006040| 61 72 6d 29 0d 0a 7b 0d | 0a 09 5f 52 65 74 49 6e |arm)..{.|.._RetIn|
|00006050| 74 28 5f 44 42 52 65 77 | 69 6e 64 28 2d 31 29 2c |t(_DBRew|ind(-1),|
|00006060| 20 31 30 29 3b 0d 0a 7d | 0d 0a 46 6f 78 49 6e 66 | 10);..}|..FoxInf|
|00006070| 6f 20 6d 79 46 6f 78 49 | 6e 66 6f 5b 5d 20 3d 20 |o myFoxI|nfo[] = |
|00006080| 7b 0d 0a 09 7b 22 44 42 | 52 45 57 49 4e 44 22 2c |{...{"DB|REWIND",|
|00006090| 20 28 46 50 46 49 29 20 | 45 78 61 6d 70 6c 65 2c | (FPFI) |Example,|
|000060a0| 20 30 2c 20 22 22 7d 2c | 0d 0a 7d 3b 0d 0a 46 6f | 0, ""},|..};..Fo|
|000060b0| 78 54 61 62 6c 65 20 5f | 46 6f 78 54 61 62 6c 65 |xTable _|FoxTable|
|000060c0| 20 3d 20 7b 0d 0a 09 28 | 46 6f 78 54 61 62 6c 65 | = {...(|FoxTable|
|000060d0| 20 46 41 52 20 2a 29 20 | 30 2c 20 73 69 7a 65 6f | FAR *) |0, sizeo|
|000060e0| 66 28 6d 79 46 6f 78 49 | 6e 66 6f 29 2f 73 69 7a |f(myFoxI|nfo)/siz|
|000060f0| 65 6f 66 28 46 6f 78 49 | 6e 66 6f 29 2c 20 6d 79 |eof(FoxI|nfo), my|
|00006100| 46 6f 78 49 6e 66 6f 0d | 0a 7d 3b 0d 0a 00 00 00 |FoxInfo.|.};.....|
|00006110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006140| 00 00 00 01 00 00 01 85 | 53 45 54 20 4c 49 42 52 |........|SET LIBR|
|00006150| 41 52 59 20 54 4f 20 65 | 78 61 6d 70 6c 65 0d 0a |ARY TO e|xample..|
|00006160| 44 4f 20 43 72 65 61 74 | 65 54 65 73 74 0d 0a 47 |DO Creat|eTest..G|
|00006170| 4f 20 42 4f 54 54 4f 4d | 0d 0a 3f 20 52 45 43 4e |O BOTTOM|..? RECN|
|00006180| 4f 28 29 0d 0a 3f 20 44 | 42 52 45 57 49 4e 44 28 |O()..? D|BREWIND(|
|00006190| 29 09 26 26 20 72 65 74 | 75 72 6e 73 20 31 0d 0a |).&& ret|urns 1..|
|000061a0| 3f 20 52 45 43 4e 4f 28 | 29 09 09 26 26 20 79 65 |? RECNO(|)..&& ye|
|000061b0| 73 2c 20 77 65 27 72 65 | 20 61 74 20 72 65 63 6f |s, we're| at reco|
|000061c0| 72 64 20 31 0d 0a 0d 0a | 50 52 4f 43 45 44 55 52 |rd 1....|PROCEDUR|
|000061d0| 45 20 43 72 65 61 74 65 | 54 65 73 74 0d 0a 0d 0a |E Create|Test....|
|000061e0| 43 52 45 41 54 45 20 54 | 41 42 4c 45 20 74 65 73 |CREATE T|ABLE tes|
|000061f0| 74 20 28 41 42 43 20 43 | 28 32 30 29 29 0d 0a 41 |t (ABC C|(20))..A|
|00006200| 50 50 45 4e 44 20 42 4c | 41 4e 4b 0d 0a 52 45 50 |PPEND BL|ANK..REP|
|00006210| 4c 41 43 45 20 41 42 43 | 20 57 49 54 48 20 22 47 |LACE ABC| WITH "G|
|00006220| 6f 6c 6c 79 20 6d 6f 6e | 74 68 20 6f 66 22 0d 0a |olly mon|th of"..|
|00006230| 41 50 50 45 4e 44 20 42 | 4c 41 4e 4b 0d 0a 52 45 |APPEND B|LANK..RE|
|00006240| 50 4c 41 43 45 20 41 42 | 43 20 57 49 54 48 20 22 |PLACE AB|C WITH "|
|00006250| 41 20 74 77 65 6c 76 65 | 74 68 20 6f 66 22 0d 0a |A twelve|th of"..|
|00006260| 41 50 50 45 4e 44 20 42 | 4c 41 4e 4b 0d 0a 52 45 |APPEND B|LANK..RE|
|00006270| 50 4c 41 43 45 20 41 42 | 43 20 57 49 54 48 20 22 |PLACE AB|C WITH "|
|00006280| 48 65 6c 6c 6f 2c 20 77 | 6f 72 6c 64 22 0d 0a 41 |Hello, w|orld"..A|
|00006290| 50 50 45 4e 44 20 42 4c | 41 4e 4b 0d 0a 52 45 50 |PPEND BL|ANK..REP|
|000062a0| 4c 41 43 45 20 41 42 43 | 20 57 49 54 48 20 22 57 |LACE ABC| WITH "W|
|000062b0| 68 65 6e 20 69 6e 20 74 | 68 65 22 0d 0a 47 4f 20 |hen in t|he"..GO |
|000062c0| 54 4f 50 0d 0a 0d 0a 52 | 45 54 55 52 4e 00 00 00 |TOP....R|ETURN...|
|000062d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000062e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000062f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00006300| 00 00 00 01 00 00 00 cd | 53 65 74 74 69 6e 67 20 |........|Setting |
|00006310| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 20 66 6f 72 20 |environm|ent for |
|00006320| 75 73 69 6e 67 20 4d 69 | 63 72 6f 73 6f 66 74 20 |using Mi|crosoft |
|00006330| 56 69 73 75 61 6c 20 43 | 2b 2b 20 74 6f 6f 6c 73 |Visual C|++ tools|
|00006340| 2e 0d 0a 09 63 6c 2e 65 | 78 65 20 40 64 3a 5c 74 |....cl.e|xe @d:\t|
|00006350| 65 6d 70 5c 6e 6d 61 30 | 30 32 32 31 2e 0d 0a 65 |emp\nma0|0221...e|
|00006360| 78 61 6d 70 6c 65 2e 63 | 0d 0a 09 6c 69 6e 6b 2e |xample.c|...link.|
|00006370| 65 78 65 20 40 64 3a 5c | 74 65 6d 70 5c 6e 6d 62 |exe @d:\|temp\nmb|
|00006380| 30 30 32 32 31 2e 0d 0a | 20 20 20 43 72 65 61 74 |00221...| Creat|
|00006390| 69 6e 67 20 6c 69 62 72 | 61 72 79 20 2e 5c 65 78 |ing libr|ary .\ex|
|000063a0| 61 6d 70 6c 65 2e 6c 69 | 62 20 61 6e 64 20 6f 62 |ample.li|b and ob|
|000063b0| 6a 65 63 74 20 2e 5c 65 | 78 61 6d 70 6c 65 2e 65 |ject .\e|xample.e|
|000063c0| 78 70 0d 0a 0d 0a 42 55 | 49 4c 44 20 53 55 43 43 |xp....BU|ILD SUCC|
|000063d0| 45 45 44 45 44 00 00 00 | 00 00 00 00 00 00 00 00 |EEDED...|........|
|000063e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.