home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-2.iso / Files II / Prog / B-C / Control Panel 0.9.5.sit / Control Panel Project 0.9.5 / MyExtension.c < prev    next >
MacBinary  |  1994-10-06  |  14.8 KB  |  [TEXT/KAHL]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: MyExtension.c

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Thu Oct 6 02:14:31 1994, modified Thu Oct 6 02:14:31 1994, creator Think C, type ASCII, 14564 bytes "MyExtension.c" , at 0x3964 382 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[KAHL]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 4d 79 45 78 74 65 | 6e 73 69 6f 6e 2e 63 00 |..MyExte|nsion.c.|
|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 54 45 58 54 4b 41 48 | 4c 00 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 38 e4 00 | 00 01 7e aa b9 46 47 aa |.....8..|..~..FG.|
|00000060| b9 46 47 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.FG.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 ee 4a 00 00 |........|.....J..|
|00000080| 2f 2a 0d 09 4d 79 45 78 | 74 65 6e 73 69 6f 6e 2e |/*..MyEx|tension.|
|00000090| 63 0d 09 0d 09 57 72 69 | 74 74 65 6e 20 62 79 20 |c....Wri|tten by |
|000000a0| 4b 65 6e 20 57 6f 72 6c | 65 79 2c 20 31 30 2f 30 |Ken Worl|ey, 10/0|
|000000b0| 34 2f 39 34 2c 20 75 73 | 69 6e 67 20 53 79 6d 61 |4/94, us|ing Syma|
|000000c0| 6e 74 65 63 20 54 68 69 | 6e 6b 20 43 20 37 2e 30 |ntec Thi|nk C 7.0|
|000000d0| 2e 0d 09 43 6f 70 79 72 | 69 67 68 74 20 31 39 39 |...Copyr|ight 199|
|000000e0| 34 2e 20 41 6c 6c 20 52 | 69 67 68 74 73 20 52 65 |4. All R|ights Re|
|000000f0| 73 65 72 76 65 64 2e 0d | 09 41 4f 4c 20 4b 4e 45 |served..|.AOL KNE|
|00000100| 77 6f 72 6c 65 79 0d 09 | 0d 09 46 65 65 6c 20 66 |worley..|..Feel f|
|00000110| 72 65 65 20 74 6f 20 75 | 73 65 20 74 68 69 73 20 |ree to u|se this |
|00000120| 63 6f 64 65 20 69 6e 20 | 61 6e 20 65 78 74 65 6e |code in |an exten|
|00000130| 73 69 6f 6e 20 6f 66 20 | 79 6f 75 72 20 6f 77 6e |sion of |your own|
|00000140| 2e 20 20 50 6c 65 61 73 | 65 20 64 6f 6e 27 74 0d |. Pleas|e don't.|
|00000150| 09 70 75 62 6c 69 73 68 | 20 6f 72 20 64 69 73 74 |.publish| or dist|
|00000160| 72 69 62 75 74 65 20 74 | 68 69 73 20 63 6f 64 65 |ribute t|his code|
|00000170| 20 77 69 74 68 6f 75 74 | 20 67 69 76 69 6e 67 20 | without| giving |
|00000180| 6d 65 20 70 72 6f 70 65 | 72 20 63 72 65 64 69 74 |me prope|r credit|
|00000190| 2e 0d 09 0d 09 54 68 69 | 73 20 63 6f 64 65 20 69 |.....Thi|s code i|
|000001a0| 73 20 73 65 74 20 75 70 | 20 74 6f 20 75 73 65 20 |s set up| to use |
|000001b0| 41 70 70 6c 65 27 73 20 | 22 55 6e 69 76 65 72 73 |Apple's |"Univers|
|000001c0| 61 6c 20 48 65 61 64 65 | 72 73 2e 22 20 20 49 66 |al Heade|rs." If|
|000001d0| 20 79 6f 75 27 72 65 20 | 6e 6f 74 0d 09 75 73 69 | you're |not..usi|
|000001e0| 6e 67 20 74 68 6f 73 65 | 2c 20 73 6f 6d 65 20 73 |ng those|, some s|
|000001f0| 6c 69 67 68 74 20 6d 6f | 64 69 66 69 63 61 74 69 |light mo|dificati|
|00000200| 6f 6e 73 20 6d 61 79 20 | 62 65 20 6e 65 63 65 73 |ons may |be neces|
|00000210| 73 61 72 79 20 28 63 68 | 61 6e 67 69 6e 67 0d 09 |sary (ch|anging..|
|00000220| 70 6f 69 6e 74 65 72 20 | 74 79 70 65 73 29 2e 0d |pointer |types)..|
|00000230| 09 0d 09 54 68 69 73 20 | 65 78 74 65 6e 73 69 6f |...This |extensio|
|00000240| 6e 20 69 73 20 61 6e 20 | 65 78 61 6d 70 6c 65 2e |n is an |example.|
|00000250| 20 20 49 74 20 73 68 6f | 77 73 20 68 6f 77 20 74 | It sho|ws how t|
|00000260| 6f 20 75 73 65 20 61 6e | 20 65 78 74 65 6e 73 69 |o use an| extensi|
|00000270| 6f 6e 20 74 6f 20 69 6e | 73 74 61 6c 6c 0d 09 61 |on to in|stall..a|
|00000280| 20 74 72 61 70 20 70 61 | 74 63 68 20 61 6e 64 20 | trap pa|tch and |
|00000290| 73 68 6f 77 73 20 68 6f | 77 20 74 6f 20 73 68 61 |shows ho|w to sha|
|000002a0| 72 65 20 64 61 74 61 20 | 62 65 74 77 65 65 6e 20 |re data |between |
|000002b0| 61 6e 20 65 78 74 65 6e | 73 69 6f 6e 2c 20 61 20 |an exten|sion, a |
|000002c0| 63 6f 6e 74 72 6f 6c 0d | 09 70 61 6e 65 6c 2c 20 |control.|.panel, |
|000002d0| 61 6e 64 20 61 20 74 72 | 61 70 20 70 61 74 63 68 |and a tr|ap patch|
|000002e0| 2e 20 20 59 6f 75 20 63 | 61 6e 20 75 73 65 20 74 |. You c|an use t|
|000002f0| 68 69 73 20 61 73 20 61 | 20 62 61 73 69 73 20 66 |his as a| basis f|
|00000300| 6f 72 20 77 72 69 74 69 | 6e 67 20 79 6f 75 72 20 |or writi|ng your |
|00000310| 6f 77 6e 0d 09 65 78 74 | 65 6e 73 69 6f 6e 2f 63 |own..ext|ension/c|
|00000320| 6f 6e 74 72 6f 6c 20 70 | 61 6e 65 6c 20 63 6f 6d |ontrol p|anel com|
|00000330| 62 69 6e 61 74 69 6f 6e | 20 28 6f 72 20 6a 75 73 |bination| (or jus|
|00000340| 74 20 61 20 70 6c 61 69 | 6e 20 65 78 74 65 6e 73 |t a plai|n extens|
|00000350| 69 6f 6e 29 2e 0d 09 09 | 0d 09 54 68 65 20 6d 65 |ion)....|..The me|
|00000360| 74 68 6f 64 20 66 6f 72 | 20 73 68 61 72 69 6e 67 |thod for| sharing|
|00000370| 20 64 61 74 61 20 62 65 | 74 77 65 65 6e 20 74 68 | data be|tween th|
|00000380| 65 20 65 78 74 65 6e 73 | 69 6f 6e 20 61 6e 64 20 |e extens|ion and |
|00000390| 70 61 74 63 68 20 77 61 | 73 20 61 64 61 70 74 65 |patch wa|s adapte|
|000003a0| 64 0d 09 66 72 6f 6d 20 | 61 6e 20 65 78 74 65 6e |d..from |an exten|
|000003b0| 73 69 6f 6e 20 63 61 6c | 6c 65 64 20 27 46 6c 61 |sion cal|led 'Fla|
|000003c0| 73 68 49 6e 69 74 2e 27 | 20 20 54 68 69 73 20 77 |shInit.'| This w|
|000003d0| 61 73 20 61 6e 20 65 78 | 61 6d 70 6c 65 20 65 78 |as an ex|ample ex|
|000003e0| 74 65 6e 73 69 6f 6e 20 | 77 72 69 74 74 65 6e 0d |tension |written.|
|000003f0| 09 62 79 20 52 69 63 68 | 61 72 64 20 48 61 72 76 |.by Rich|ard Harv|
|00000400| 65 79 20 69 6e 20 41 70 | 72 69 6c 20 31 39 39 30 |ey in Ap|ril 1990|
|00000410| 2e 20 20 54 68 61 6e 6b | 73 20 52 69 63 68 61 72 |. Thank|s Richar|
|00000420| 64 21 21 20 20 54 68 65 | 20 6d 65 74 68 6f 64 20 |d!! The| method |
|00000430| 69 6e 76 6f 6c 76 65 73 | 0d 09 61 6c 6c 6f 63 61 |involves|..alloca|
|00000440| 74 69 6e 67 20 61 20 63 | 68 75 6e 6b 20 6f 66 20 |ting a c|hunk of |
|00000450| 6d 65 6d 6f 72 79 2c 20 | 74 68 65 6e 20 72 65 70 |memory, |then rep|
|00000460| 6c 61 63 69 6e 67 20 61 | 20 64 75 6d 6d 79 20 72 |lacing a| dummy r|
|00000470| 65 66 65 72 65 6e 63 65 | 20 69 6e 20 74 68 65 20 |eference| in the |
|00000480| 70 61 74 63 68 0d 09 63 | 6f 64 65 20 77 69 74 68 |patch..c|ode with|
|00000490| 20 74 68 65 20 61 63 74 | 75 61 6c 20 61 64 64 72 | the act|ual addr|
|000004a0| 65 73 73 20 6f 66 20 74 | 68 65 20 6d 65 6d 6f 72 |ess of t|he memor|
|000004b0| 79 20 28 6f 75 72 20 73 | 68 61 72 65 64 20 6d 65 |y (our s|hared me|
|000004c0| 6d 6f 72 79 20 73 74 72 | 75 63 74 75 72 65 29 2e |mory str|ucture).|
|000004d0| 0d 09 0d 09 57 65 20 63 | 61 6e 27 74 20 75 73 65 |....We c|an't use|
|000004e0| 20 74 68 61 74 20 6d 65 | 74 68 6f 64 20 77 69 74 | that me|thod wit|
|000004f0| 68 20 74 68 65 20 63 6f | 6e 74 72 6f 6c 20 70 61 |h the co|ntrol pa|
|00000500| 6e 65 6c 20 63 6f 64 65 | 20 62 65 63 61 75 73 65 |nel code| because|
|00000510| 20 69 74 20 67 65 74 73 | 20 77 72 69 74 74 65 6e | it gets| written|
|00000520| 0d 09 62 61 63 6b 20 74 | 6f 20 64 69 73 6b 2c 20 |..back t|o disk, |
|00000530| 73 6f 20 77 65 20 61 6c | 73 6f 20 73 74 6f 72 65 |so we al|so store|
|00000540| 20 74 68 65 20 61 64 64 | 72 65 73 73 20 6f 66 20 | the add|ress of |
|00000550| 74 68 65 20 73 68 61 72 | 65 64 20 64 61 74 61 20 |the shar|ed data |
|00000560| 69 6e 20 61 20 72 65 73 | 6f 75 72 63 65 0d 09 74 |in a res|ource..t|
|00000570| 68 61 74 20 74 68 65 20 | 63 6f 6e 74 72 6f 6c 20 |hat the |control |
|00000580| 70 61 6e 65 6c 20 63 61 | 6e 20 61 63 63 65 73 73 |panel ca|n access|
|00000590| 20 77 68 65 6e 20 69 74 | 20 69 73 20 6f 70 65 6e | when it| is open|
|000005a0| 65 64 2e 0d 09 0d 09 54 | 68 69 73 20 65 78 74 65 |ed.....T|his exte|
|000005b0| 6e 73 69 6f 6e 20 61 6c | 73 6f 20 69 6e 63 6f 72 |nsion al|so incor|
|000005c0| 70 6f 72 61 74 65 73 20 | 27 53 68 6f 77 49 63 6f |porates |'ShowIco|
|000005d0| 6e 46 61 6d 69 6c 79 27 | 20 62 79 20 50 61 74 72 |nFamily'| by Patr|
|000005e0| 69 63 6b 20 43 2e 20 42 | 65 61 72 64 20 61 6e 64 |ick C. B|eard and|
|000005f0| 0d 09 6d 6f 64 69 66 69 | 65 64 20 62 79 20 4a 61 |..modifi|ed by Ja|
|00000600| 6d 65 73 20 57 2e 20 57 | 61 6c 6b 65 72 2e 20 20 |mes W. W|alker. |
|00000610| 54 68 69 73 20 70 69 65 | 63 65 20 6f 66 20 63 6f |This pie|ce of co|
|00000620| 64 65 0d 09 69 73 20 63 | 61 6c 6c 65 64 20 74 6f |de..is c|alled to|
|00000630| 20 64 69 73 70 6c 61 79 | 20 74 68 65 20 65 78 74 | display| the ext|
|00000640| 65 6e 73 69 6f 6e 27 73 | 20 69 63 6f 6e 20 61 74 |ension's| icon at|
|00000650| 20 73 74 61 72 74 75 70 | 2e 20 20 54 68 69 73 0d | startup|. This.|
|00000660| 09 63 6f 64 65 20 77 61 | 73 20 62 61 73 65 64 20 |.code wa|s based |
|00000670| 6f 6e 20 74 68 65 20 6f | 72 69 67 69 6e 61 6c 20 |on the o|riginal |
|00000680| 53 68 6f 77 49 6e 69 74 | 20 62 79 20 50 61 75 6c |ShowInit| by Paul|
|00000690| 20 4d 65 72 63 65 72 2c | 20 44 61 72 69 6e 20 41 | Mercer,| Darin A|
|000006a0| 64 6c 65 72 2c 20 50 61 | 75 6c 0d 09 53 6e 69 76 |dler, Pa|ul..Sniv|
|000006b0| 65 6c 79 20 61 6e 64 20 | 53 74 65 76 65 20 43 61 |ely and |Steve Ca|
|000006c0| 70 70 73 2e 20 20 54 68 | 65 73 65 20 61 72 65 20 |pps. Th|ese are |
|000006d0| 74 68 65 20 67 75 79 73 | 20 74 6f 20 62 6c 61 6d |the guys| to blam|
|000006e0| 65 20 66 6f 72 20 6f 75 | 72 20 73 74 61 72 74 75 |e for ou|r startu|
|000006f0| 70 20 69 63 6f 6e 0d 09 | 70 61 72 61 64 65 73 2e |p icon..|parades.|
|00000700| 20 20 54 68 61 74 20 70 | 69 65 63 65 20 6f 66 20 | That p|iece of |
|00000710| 63 6f 64 65 20 28 53 68 | 6f 77 49 63 6f 6e 46 61 |code (Sh|owIconFa|
|00000720| 6d 69 6c 79 2e 63 29 20 | 69 73 20 70 75 62 6c 69 |mily.c) |is publi|
|00000730| 63 20 64 6f 6d 61 69 6e | 2e 20 20 49 20 6d 61 64 |c domain|. I mad|
|00000740| 65 0d 09 73 6f 6d 65 20 | 6d 6f 64 69 66 69 63 61 |e..some |modifica|
|00000750| 74 69 6f 6e 73 20 74 6f | 20 69 74 20 69 6e 20 6f |tions to| it in o|
|00000760| 72 64 65 72 20 74 6f 20 | 75 73 65 20 69 74 20 77 |rder to |use it w|
|00000770| 69 74 68 6f 75 74 20 61 | 6e 79 20 67 6c 6f 62 61 |ithout a|ny globa|
|00000780| 6c 20 76 61 72 69 61 62 | 6c 65 73 2e 0d 09 0d 09 |l variab|les.....|
|00000790| 54 68 69 73 20 65 78 74 | 65 6e 73 69 6f 6e 20 75 |This ext|ension u|
|000007a0| 73 65 73 20 6e 6f 20 67 | 6c 6f 62 61 6c 20 6f 72 |ses no g|lobal or|
|000007b0| 20 73 74 61 74 69 63 20 | 76 61 72 69 61 62 6c 65 | static |variable|
|000007c0| 73 2c 20 73 6f 20 69 74 | 27 73 20 6e 6f 74 20 6e |s, so it|'s not n|
|000007d0| 65 63 65 73 73 61 72 79 | 0d 09 74 6f 20 73 65 74 |ecessary|..to set|
|000007e0| 20 75 70 20 61 6e 64 20 | 72 65 73 74 6f 72 65 20 | up and |restore |
|000007f0| 41 34 2e 20 20 41 6c 6c | 20 6f 66 20 6f 75 72 20 |A4. All| of our |
|00000800| 27 67 6c 6f 62 61 6c 27 | 20 64 61 74 61 20 69 73 |'global'| data is|
|00000810| 20 69 6e 20 74 68 65 20 | 73 68 61 72 65 64 20 64 | in the |shared d|
|00000820| 61 74 61 0d 09 73 74 72 | 75 63 74 75 72 65 20 28 |ata..str|ucture (|
|00000830| 69 6e 20 61 20 6c 6f 63 | 6b 65 64 20 62 6c 6f 63 |in a loc|ked bloc|
|00000840| 6b 20 69 6e 20 74 68 65 | 20 73 79 73 74 65 6d 20 |k in the| system |
|00000850| 68 65 61 70 29 2e 0d 09 | 0d 09 49 27 76 65 20 61 |heap)...|..I've a|
|00000860| 6c 73 6f 20 69 6e 63 6c | 75 64 65 64 20 61 20 27 |lso incl|uded a '|
|00000870| 73 79 73 7a 27 20 72 65 | 73 6f 75 72 63 65 20 69 |sysz' re|source i|
|00000880| 6e 20 74 68 65 20 72 65 | 73 6f 75 72 63 65 20 66 |n the re|source f|
|00000890| 69 6c 65 2e 20 20 50 72 | 65 2d 53 79 73 74 65 6d |ile. Pr|e-System|
|000008a0| 20 37 0d 09 4d 61 63 73 | 20 77 69 6c 6c 20 6c 6f | 7..Macs| will lo|
|000008b0| 6f 6b 20 61 74 20 74 68 | 69 73 20 72 65 73 6f 75 |ok at th|is resou|
|000008c0| 72 63 65 20 77 68 65 6e | 20 6c 6f 61 64 69 6e 67 |rce when| loading|
|000008d0| 20 74 68 65 20 65 78 74 | 65 6e 73 69 6f 6e 20 61 | the ext|ension a|
|000008e0| 6e 64 20 69 6e 74 65 72 | 70 72 65 74 20 74 68 65 |nd inter|pret the|
|000008f0| 0d 09 6e 75 6d 62 65 72 | 20 74 68 65 72 65 20 61 |..number| there a|
|00000900| 73 20 61 20 72 65 71 75 | 65 73 74 20 74 6f 20 65 |s a requ|est to e|
|00000910| 78 70 61 6e 64 20 74 68 | 65 20 73 79 73 74 65 6d |xpand th|e system|
|00000920| 20 68 65 61 70 20 62 79 | 20 74 68 65 20 73 70 65 | heap by| the spe|
|00000930| 63 69 66 69 65 64 20 6e | 75 6d 62 65 72 0d 09 6f |cified n|umber..o|
|00000940| 66 20 62 79 74 65 73 2e | 20 20 54 68 65 20 65 78 |f bytes.| The ex|
|00000950| 70 61 6e 64 65 64 20 73 | 70 61 63 65 20 69 73 20 |panded s|pace is |
|00000960| 6e 6f 74 20 72 65 73 65 | 72 76 65 64 20 66 6f 72 |not rese|rved for|
|00000970| 20 74 68 65 20 65 78 74 | 65 6e 73 69 6f 6e 2c 20 | the ext|ension, |
|00000980| 69 74 20 69 73 20 6a 75 | 73 74 0d 09 61 64 64 65 |it is ju|st..adde|
|00000990| 64 20 74 6f 20 74 68 65 | 20 73 79 73 74 65 6d 20 |d to the| system |
|000009a0| 68 65 61 70 20 73 70 61 | 63 65 2e 20 20 53 79 73 |heap spa|ce. Sys|
|000009b0| 74 65 6d 20 37 20 65 78 | 70 61 6e 64 73 20 61 6e |tem 7 ex|pands an|
|000009c0| 64 20 63 6f 6e 74 72 61 | 63 74 73 20 74 68 65 20 |d contra|cts the |
|000009d0| 73 79 73 74 65 6d 0d 09 | 68 65 61 70 20 64 79 6e |system..|heap dyn|
|000009e0| 61 6d 69 63 61 6c 6c 79 | 20 61 6e 64 20 73 6f 20 |amically| and so |
|000009f0| 69 67 6e 6f 72 65 73 20 | 74 68 65 20 27 73 79 73 |ignores |the 'sys|
|00000a00| 7a 27 20 72 65 73 6f 75 | 72 63 65 2e 20 20 41 20 |z' resou|rce. A |
|00000a10| 74 65 6d 70 6c 61 74 65 | 20 69 73 20 61 6c 73 6f |template| is also|
|00000a20| 20 69 6e 63 6c 75 64 65 | 64 0d 09 66 6f 72 20 65 | include|d..for e|
|00000a30| 61 73 69 6c 79 20 6d 6f | 64 69 66 79 69 6e 67 20 |asily mo|difying |
|00000a40| 74 68 65 20 73 79 73 7a | 20 72 65 73 6f 75 72 63 |the sysz| resourc|
|00000a50| 65 20 77 69 74 68 20 52 | 65 73 45 64 69 74 2e 0d |e with R|esEdit..|
|00000a60| 09 0d 09 57 65 20 75 73 | 65 20 77 68 61 74 20 49 |...We us|e what I|
|00000a70| 20 63 61 6c 6c 20 61 20 | 27 70 72 65 66 65 72 65 | call a |'prefere|
|00000a80| 6e 63 65 73 27 20 72 65 | 73 6f 75 72 63 65 20 74 |nces' re|source t|
|00000a90| 6f 20 73 61 76 65 20 73 | 6f 6d 65 20 73 65 74 74 |o save s|ome sett|
|00000aa0| 69 6e 67 73 20 62 65 74 | 77 65 65 6e 0d 09 72 65 |ings bet|ween..re|
|00000ab0| 73 74 61 72 74 73 2e 20 | 20 46 6f 72 20 74 68 65 |starts. | For the|
|00000ac0| 20 6d 6f 73 74 20 70 61 | 72 74 2c 20 74 68 69 73 | most pa|rt, this|
|00000ad0| 20 73 61 6d 65 20 69 6e | 66 6f 72 6d 61 74 69 6f | same in|formatio|
|00000ae0| 6e 20 69 73 20 61 6c 73 | 6f 20 68 65 6c 64 20 69 |n is als|o held i|
|00000af0| 6e 20 6d 65 6d 6f 72 79 | 0d 09 28 69 6e 20 74 68 |n memory|..(in th|
|00000b00| 65 20 73 68 61 72 65 64 | 20 64 61 74 61 20 73 74 |e shared| data st|
|00000b10| 72 75 63 74 75 72 65 29 | 20 77 68 69 6c 65 20 74 |ructure)| while t|
|00000b20| 68 65 20 63 6f 6d 70 75 | 74 65 72 20 69 73 20 72 |he compu|ter is r|
|00000b30| 75 6e 6e 69 6e 67 20 73 | 6f 20 74 68 61 74 20 74 |unning s|o that t|
|00000b40| 68 65 0d 09 70 61 74 63 | 68 20 63 6f 64 65 20 63 |he..patc|h code c|
|00000b50| 61 6e 20 61 63 63 65 73 | 73 20 74 68 65 20 73 65 |an acces|s the se|
|00000b60| 74 74 69 6e 67 73 2e 20 | 20 54 68 65 20 72 65 73 |ttings. | The res|
|00000b70| 6f 75 72 63 65 20 69 73 | 20 6e 6f 72 6d 61 6c 6c |ource is| normall|
|00000b80| 79 20 61 63 63 65 73 73 | 65 64 20 6f 6e 63 65 0d |y access|ed once.|
|00000b90| 09 62 79 20 74 68 65 20 | 65 78 74 65 6e 73 69 6f |.by the |extensio|
|00000ba0| 6e 20 63 6f 64 65 2c 20 | 74 68 65 6e 20 61 63 63 |n code, |then acc|
|00000bb0| 65 73 73 65 64 20 61 6e | 64 20 70 6f 73 73 69 62 |essed an|d possib|
|00000bc0| 6c 79 20 63 68 61 6e 67 | 65 64 20 6c 61 74 65 72 |ly chang|ed later|
|00000bd0| 20 62 79 20 74 68 65 20 | 63 6f 6e 74 72 6f 6c 0d | by the |control.|
|00000be0| 09 70 61 6e 65 6c 20 63 | 6f 64 65 2e 0d 09 0d 09 |.panel c|ode.....|
|00000bf0| 54 68 69 73 20 63 6f 64 | 65 20 73 65 74 73 20 61 |This cod|e sets a|
|00000c00| 20 63 6f 75 70 6c 65 20 | 6f 66 20 74 68 65 20 66 | couple |of the f|
|00000c10| 69 65 6c 64 73 20 69 6e | 20 74 68 65 20 73 68 61 |ields in| the sha|
|00000c20| 72 65 64 20 64 61 74 61 | 20 73 74 72 75 63 74 75 |red data| structu|
|00000c30| 72 65 20 77 68 69 63 68 | 20 61 72 65 0d 09 61 63 |re which| are..ac|
|00000c40| 63 65 73 73 65 64 20 61 | 6e 64 2f 6f 72 20 6d 6f |cessed a|nd/or mo|
|00000c50| 64 69 66 69 65 64 20 62 | 79 20 6f 74 68 65 72 20 |dified b|y other |
|00000c60| 63 6f 64 65 20 6c 61 74 | 65 72 20 6f 6e 2e 20 20 |code lat|er on. |
|00000c70| 54 68 65 20 27 43 50 6f | 6e 27 20 66 69 65 6c 64 |The 'CPo|n' field|
|00000c80| 20 69 73 20 73 65 74 20 | 74 6f 0d 09 74 72 75 65 | is set |to..true|
|00000c90| 20 6f 72 20 66 61 6c 73 | 65 20 64 65 70 65 6e 64 | or fals|e depend|
|00000ca0| 69 6e 67 20 6f 6e 20 77 | 68 65 74 68 65 72 20 6f |ing on w|hether o|
|00000cb0| 72 20 6e 6f 74 20 74 68 | 65 20 70 72 65 66 65 72 |r not th|e prefer|
|00000cc0| 65 6e 63 65 73 20 72 65 | 73 6f 75 72 63 65 20 69 |ences re|source i|
|00000cd0| 6e 64 69 63 61 74 65 73 | 0d 09 74 68 65 20 63 6f |ndicates|..the co|
|00000ce0| 6e 74 72 6f 6c 20 70 61 | 6e 65 6c 20 77 61 73 20 |ntrol pa|nel was |
|00000cf0| 73 65 74 20 74 6f 20 27 | 6f 6e 27 20 6f 72 20 27 |set to '|on' or '|
|00000d00| 6f 66 66 27 20 77 68 65 | 6e 20 6c 61 73 74 20 63 |off' whe|n last c|
|00000d10| 6c 6f 73 65 64 2e 20 20 | 54 68 65 20 27 70 61 74 |losed. |The 'pat|
|00000d20| 63 68 65 64 27 0d 09 66 | 69 65 6c 64 20 69 73 20 |ched'..f|ield is |
|00000d30| 73 65 74 20 74 6f 20 74 | 72 75 65 20 69 66 20 74 |set to t|rue if t|
|00000d40| 68 65 20 74 72 61 70 20 | 70 61 74 63 68 20 77 61 |he trap |patch wa|
|00000d50| 73 20 69 6e 73 74 61 6c | 6c 65 64 20 61 6e 64 20 |s instal|led and |
|00000d60| 66 61 6c 73 65 20 69 66 | 20 69 74 20 77 61 73 20 |false if| it was |
|00000d70| 6e 6f 74 2e 0d 09 0d 09 | 41 62 6f 75 74 20 74 68 |not.....|About th|
|00000d80| 65 20 6f 6e 6c 79 20 74 | 68 69 6e 67 20 79 6f 75 |e only t|hing you|
|00000d90| 27 6c 6c 20 65 76 65 72 | 20 6e 65 65 64 20 74 6f |'ll ever| need to|
|00000da0| 20 6d 6f 64 69 66 79 20 | 69 6e 20 74 68 69 73 20 | modify |in this |
|00000db0| 66 69 6c 65 20 77 68 65 | 6e 20 77 72 69 74 69 6e |file whe|n writin|
|00000dc0| 67 0d 09 79 6f 75 72 20 | 6f 77 6e 20 65 78 74 65 |g..your |own exte|
|00000dd0| 6e 73 69 6f 6e 20 28 75 | 6e 6c 65 73 73 20 79 6f |nsion (u|nless yo|
|00000de0| 75 27 72 65 20 6d 61 6b | 69 6e 67 20 6d 61 6a 6f |u're mak|ing majo|
|00000df0| 72 20 63 68 61 6e 67 65 | 73 29 20 61 72 65 20 73 |r change|s) are s|
|00000e00| 6f 6d 65 20 6f 66 20 74 | 68 65 20 23 64 65 66 69 |ome of t|he #defi|
|00000e10| 6e 65 73 2e 0d 09 0d 09 | 09 6b 54 72 61 70 54 6f |nes.....|.kTrapTo|
|00000e20| 50 61 74 63 68 20 64 65 | 74 65 72 6d 69 6e 65 73 |Patch de|termines|
|00000e30| 20 77 68 69 63 68 20 74 | 72 61 70 20 74 68 65 20 | which t|rap the |
|00000e40| 70 61 74 63 68 20 69 73 | 20 69 6e 73 74 61 6c 6c |patch is| install|
|00000e50| 65 64 20 66 6f 72 2e 0d | 09 09 6b 50 61 72 61 6d |ed for..|..kParam|
|00000e60| 42 79 74 65 73 20 69 73 | 20 74 68 65 20 6e 75 6d |Bytes is| the num|
|00000e70| 62 65 72 20 6f 66 20 62 | 79 74 65 73 20 70 61 73 |ber of b|ytes pas|
|00000e80| 73 65 64 20 6f 6e 20 74 | 68 65 20 73 74 61 63 6b |sed on t|he stack|
|00000e90| 20 61 73 20 70 61 72 61 | 6d 65 74 65 72 73 20 66 | as para|meters f|
|00000ea0| 6f 72 0d 09 09 09 74 68 | 65 20 74 72 61 70 20 72 |or....th|e trap r|
|00000eb0| 6f 75 74 69 6e 65 2e 20 | 20 28 54 68 69 73 20 77 |outine. | (This w|
|00000ec0| 6f 75 6c 64 20 62 65 20 | 7a 65 72 6f 20 66 6f 72 |ould be |zero for|
|00000ed0| 20 61 20 72 65 67 69 73 | 74 65 72 20 62 61 73 65 | a regis|ter base|
|00000ee0| 64 20 74 72 61 70 2e 29 | 0d 09 09 6b 52 65 74 75 |d trap.)|...kRetu|
|00000ef0| 72 6e 42 79 74 65 73 20 | 69 73 20 74 68 65 20 6e |rnBytes |is the n|
|00000f00| 75 6d 62 65 72 20 6f 66 | 20 62 79 74 65 73 20 72 |umber of| bytes r|
|00000f10| 65 73 65 72 76 65 64 20 | 6f 6e 20 74 68 65 20 73 |eserved |on the s|
|00000f20| 74 61 63 6b 20 66 6f 72 | 20 74 68 65 20 72 65 74 |tack for| the ret|
|00000f30| 75 72 6e 0d 09 09 09 76 | 61 6c 75 65 2e 20 20 28 |urn....v|alue. (|
|00000f40| 54 68 69 73 20 77 6f 75 | 6c 64 20 61 6c 73 6f 20 |This wou|ld also |
|00000f50| 62 65 20 7a 65 72 6f 20 | 66 6f 72 20 61 20 72 65 |be zero |for a re|
|00000f60| 67 69 73 74 65 72 20 62 | 61 73 65 64 20 74 72 61 |gister b|ased tra|
|00000f70| 70 2e 29 0d 09 09 09 0d | 09 09 6b 54 61 73 6b 52 |p.).....|..kTaskR|
|00000f80| 73 72 63 4e 6f 20 69 73 | 20 74 68 65 20 72 65 73 |srcNo is| the res|
|00000f90| 6f 75 72 63 65 20 6e 75 | 6d 62 65 72 20 6f 66 20 |ource nu|mber of |
|00000fa0| 74 68 65 20 70 61 74 63 | 68 20 63 6f 64 65 2e 0d |the patc|h code..|
|00000fb0| 09 09 6b 54 61 73 6b 52 | 73 72 63 54 79 70 65 20 |..kTaskR|srcType |
|00000fc0| 69 73 20 74 68 65 20 72 | 65 73 6f 75 72 63 65 20 |is the r|esource |
|00000fd0| 74 79 70 65 20 6f 66 20 | 74 68 65 20 70 61 74 63 |type of |the patc|
|00000fe0| 68 20 63 6f 64 65 20 28 | 27 74 61 73 6b 27 29 2e |h code (|'task').|
|00000ff0| 0d 09 09 0d 09 09 6b 43 | 44 45 56 52 73 72 63 4e |......kC|DEVRsrcN|
|00001000| 6f 20 69 73 20 74 68 65 | 20 72 65 73 6f 75 72 63 |o is the| resourc|
|00001010| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 74 68 65 20 |e number| of the |
|00001020| 63 6f 6e 74 72 6f 6c 20 | 70 61 6e 65 6c 20 63 6f |control |panel co|
|00001030| 64 65 2e 20 20 59 6f 75 | 20 73 68 6f 75 6c 64 6e |de. You| shouldn|
|00001040| 27 74 0d 09 09 09 6e 65 | 65 64 20 74 6f 20 63 68 |'t....ne|ed to ch|
|00001050| 61 6e 67 65 20 74 68 69 | 73 2e 0d 09 09 09 0d 09 |ange thi|s.......|
|00001060| 09 6b 49 63 6f 6e 46 61 | 6d 69 6c 79 49 44 20 69 |.kIconFa|milyID i|
|00001070| 73 20 74 68 65 20 72 65 | 73 6f 75 72 63 65 20 6e |s the re|source n|
|00001080| 75 6d 62 65 72 20 6f 66 | 20 74 68 65 20 69 63 6f |umber of| the ico|
|00001090| 6e 20 66 61 6d 69 6c 79 | 20 6f 75 72 20 66 69 6e |n family| our fin|
|000010a0| 61 6c 20 66 69 6c 65 20 | 77 69 6c 6c 0d 09 09 09 |al file |will....|
|000010b0| 62 65 20 75 73 69 6e 67 | 2e 20 20 54 68 65 20 6e |be using|. The n|
|000010c0| 75 6d 62 65 72 20 69 73 | 20 75 73 65 64 20 74 6f |umber is| used to|
|000010d0| 20 73 65 6e 64 20 74 6f | 20 53 68 6f 77 49 6e 69 | send to| ShowIni|
|000010e0| 74 20 73 6f 20 6f 75 72 | 20 69 63 6f 6e 20 63 61 |t so our| icon ca|
|000010f0| 6e 20 62 65 0d 09 09 09 | 73 68 6f 77 6e 20 69 6e |n be....|shown in|
|00001100| 20 74 68 65 20 73 74 61 | 72 74 75 70 20 69 63 6f | the sta|rtup ico|
|00001110| 6e 20 70 61 72 61 64 65 | 2e 0d 09 09 0d 09 09 6b |n parade|.......k|
|00001120| 58 49 63 6f 6e 49 44 20 | 69 73 20 74 68 65 20 72 |XIconID |is the r|
|00001130| 65 73 6f 75 72 63 65 20 | 6e 75 6d 62 65 72 20 6f |esource |number o|
|00001140| 66 20 74 68 65 20 69 63 | 6f 6e 20 66 61 6d 69 6c |f the ic|on famil|
|00001150| 79 20 74 6f 20 62 65 20 | 75 73 65 64 20 77 68 65 |y to be |used whe|
|00001160| 6e 20 74 68 65 72 65 20 | 77 61 73 0d 09 09 09 61 |n there |was....a|
|00001170| 20 70 72 6f 62 6c 65 6d | 20 77 68 65 6e 20 6c 6f | problem| when lo|
|00001180| 61 64 69 6e 67 20 74 68 | 65 20 65 78 74 65 6e 73 |ading th|e extens|
|00001190| 69 6f 6e 2e 20 20 54 68 | 69 73 20 69 63 6f 6e 20 |ion. Th|is icon |
|000011a0| 6c 6f 6f 6b 73 20 58 65 | 64 20 6f 75 74 2e 0d 09 |looks Xe|d out...|
|000011b0| 09 0d 09 09 6b 4e 6f 50 | 61 74 63 68 49 63 6f 6e |....kNoP|atchIcon|
|000011c0| 49 44 20 69 73 20 74 68 | 65 20 72 65 73 6f 75 72 |ID is th|e resour|
|000011d0| 63 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 74 68 65 |ce numbe|r of the|
|000011e0| 20 69 63 6f 6e 20 66 61 | 6d 69 6c 79 20 74 6f 20 | icon fa|mily to |
|000011f0| 62 65 20 75 73 65 64 20 | 77 68 65 6e 0d 09 09 09 |be used |when....|
|00001200| 74 68 65 20 70 61 74 63 | 68 20 69 73 20 6e 6f 74 |the patc|h is not|
|00001210| 20 6c 6f 61 64 65 64 20 | 28 77 68 65 6e 20 74 68 | loaded |(when th|
|00001220| 65 20 63 6f 6e 74 72 6f | 6c 20 70 61 6e 65 6c 20 |e contro|l panel |
|00001230| 69 73 20 73 65 74 20 74 | 6f 20 22 6f 66 66 22 29 |is set t|o "off")|
|00001240| 2e 0d 09 09 0d 09 09 6b | 4d 65 6d 41 64 64 72 54 |.......k|MemAddrT|
|00001250| 79 70 65 20 69 73 20 74 | 68 65 20 72 65 73 6f 75 |ype is t|he resou|
|00001260| 72 63 65 20 74 79 70 65 | 20 6f 66 20 74 68 65 20 |rce type| of the |
|00001270| 72 65 73 6f 75 72 63 65 | 20 75 73 65 64 20 74 6f |resource| used to|
|00001280| 20 68 6f 6c 64 20 74 68 | 65 20 61 64 64 72 65 73 | hold th|e addres|
|00001290| 73 20 6f 66 0d 09 09 09 | 74 68 65 20 73 68 61 72 |s of....|the shar|
|000012a0| 65 64 20 64 61 74 61 20 | 73 74 72 75 63 74 75 72 |ed data |structur|
|000012b0| 65 2e 0d 09 09 6b 4d 65 | 6d 41 64 64 72 49 44 20 |e....kMe|mAddrID |
|000012c0| 69 73 20 74 68 65 20 72 | 65 73 6f 75 72 63 65 20 |is the r|esource |
|000012d0| 6e 75 6d 62 65 72 20 6f | 66 20 74 68 65 20 61 62 |number o|f the ab|
|000012e0| 6f 76 65 20 72 65 73 6f | 75 72 63 65 2e 0d 09 0d |ove reso|urce....|
|000012f0| 09 42 55 49 4c 44 49 4e | 47 20 54 48 45 20 43 4f |.BUILDIN|G THE CO|
|00001300| 44 45 20 52 45 53 4f 55 | 52 43 45 0d 09 0d 09 09 |DE RESOU|RCE.....|
|00001310| 54 68 69 73 20 66 69 6c | 65 20 73 68 6f 75 6c 64 |This fil|e should|
|00001320| 20 62 65 20 69 6e 63 6c | 75 64 65 64 20 69 6e 20 | be incl|uded in |
|00001330| 61 20 70 72 6f 6a 65 63 | 74 20 6f 66 20 74 79 70 |a projec|t of typ|
|00001340| 65 20 27 63 6f 64 65 20 | 72 65 73 6f 75 72 63 65 |e 'code |resource|
|00001350| 27 20 61 6c 6f 6e 67 0d | 09 09 77 69 74 68 20 4d |' along.|..with M|
|00001360| 61 63 54 72 61 70 73 2e | 20 54 68 65 20 74 79 70 |acTraps.| The typ|
|00001370| 65 20 73 68 6f 75 6c 64 | 20 62 65 20 27 49 4e 49 |e should| be 'INI|
|00001380| 54 27 20 66 6f 72 20 74 | 68 65 20 72 65 73 6f 75 |T' for t|he resou|
|00001390| 72 63 65 20 61 6e 64 20 | 69 74 20 73 68 6f 75 6c |rce and |it shoul|
|000013a0| 64 0d 09 09 68 61 76 65 | 20 74 68 65 20 73 79 73 |d...have| the sys|
|000013b0| 74 65 6d 20 68 65 61 70 | 20 61 74 74 72 69 62 75 |tem heap| attribu|
|000013c0| 74 65 20 73 65 74 2e 20 | 28 49 74 20 73 68 6f 75 |te set. |(It shou|
|000013d0| 6c 64 20 4e 4f 54 20 62 | 65 20 6c 6f 63 6b 65 64 |ld NOT b|e locked|
|000013e0| 29 2e 20 20 54 68 65 20 | 72 65 73 75 6c 74 69 6e |). The |resultin|
|000013f0| 67 0d 09 09 63 6f 64 65 | 20 72 65 73 6f 75 72 63 |g...code| resourc|
|00001400| 65 20 73 68 6f 75 6c 64 | 20 62 65 20 69 6e 63 6c |e should| be incl|
|00001410| 75 64 65 64 20 69 6e 20 | 74 68 65 20 73 61 6d 65 |uded in |the same|
|00001420| 20 66 69 6c 65 20 77 69 | 74 68 20 74 68 65 20 70 | file wi|th the p|
|00001430| 61 74 63 68 20 63 6f 64 | 65 0d 09 09 72 65 73 6f |atch cod|e...reso|
|00001440| 75 72 63 65 20 61 6e 64 | 20 74 68 65 20 63 6f 6e |urce and| the con|
|00001450| 74 72 6f 6c 20 70 61 6e | 65 6c 20 72 65 73 6f 75 |trol pan|el resou|
|00001460| 72 63 65 20 77 69 74 68 | 20 74 68 65 20 6f 76 65 |rce with| the ove|
|00001470| 72 61 6c 6c 20 66 69 6c | 65 20 74 79 70 65 20 62 |rall fil|e type b|
|00001480| 65 69 6e 67 0d 09 09 27 | 63 64 65 76 27 2e 20 54 |eing...'|cdev'. T|
|00001490| 68 65 20 72 65 73 6f 75 | 72 63 65 20 49 44 20 63 |he resou|rce ID c|
|000014a0| 61 6e 20 62 65 20 7a 65 | 72 6f 2e 0d 2a 2f 0d 0d |an be ze|ro..*/..|
|000014b0| 2f 2a 20 74 72 61 70 20 | 70 61 74 63 68 69 6e 67 |/* trap |patching|
|000014c0| 20 64 65 66 69 6e 65 73 | 20 2a 2f 0d 0d 23 64 65 | defines| */..#de|
|000014d0| 66 69 6e 65 09 09 6b 54 | 72 61 70 54 6f 50 61 74 |fine..kT|rapToPat|
|000014e0| 63 68 09 09 5f 4d 65 6e | 75 53 65 6c 65 63 74 0d |ch.._Men|uSelect.|
|000014f0| 23 64 65 66 69 6e 65 09 | 09 6b 50 61 72 61 6d 42 |#define.|.kParamB|
|00001500| 79 74 65 73 09 09 09 34 | 09 09 2f 2a 20 61 20 50 |ytes...4|../* a P|
|00001510| 6f 69 6e 74 2d 69 6e 20 | 67 6c 6f 62 61 6c 20 63 |oint-in |global c|
|00001520| 6f 6f 72 64 69 6e 61 74 | 65 73 20 2a 2f 0d 23 64 |oordinat|es */.#d|
|00001530| 65 66 69 6e 65 09 09 6b | 52 65 74 75 72 6e 42 79 |efine..k|ReturnBy|
|00001540| 74 65 73 09 09 34 09 09 | 2f 2a 20 6c 6f 6e 67 20 |tes..4..|/* long |
|00001550| 69 6e 74 2d 68 69 77 6f | 72 64 20 69 73 20 6d 65 |int-hiwo|rd is me|
|00001560| 6e 75 20 69 64 2d 6c 6f | 77 6f 72 64 20 69 73 20 |nu id-lo|word is |
|00001570| 69 74 65 6d 23 20 2a 2f | 0d 0d 2f 2a 20 70 61 74 |item# */|../* pat|
|00001580| 63 68 20 63 6f 64 65 20 | 64 65 66 69 6e 65 73 20 |ch code |defines |
|00001590| 2a 2f 0d 0d 23 64 65 66 | 69 6e 65 09 09 6b 54 61 |*/..#def|ine..kTa|
|000015a0| 73 6b 52 73 72 63 4e 6f | 09 09 09 31 32 38 09 09 |skRsrcNo|...128..|
|000015b0| 2f 2a 20 74 68 65 20 70 | 61 74 63 68 20 63 6f 64 |/* the p|atch cod|
|000015c0| 65 27 73 20 72 65 73 6f | 75 72 63 65 20 6e 75 6d |e's reso|urce num|
|000015d0| 62 65 72 20 2a 2f 0d 23 | 64 65 66 69 6e 65 09 09 |ber */.#|define..|
|000015e0| 6b 54 61 73 6b 52 73 72 | 63 54 79 70 65 09 09 27 |kTaskRsr|cType..'|
|000015f0| 74 61 73 6b 27 09 2f 2a | 20 74 68 65 20 70 61 74 |task'./*| the pat|
|00001600| 63 68 20 63 6f 64 65 27 | 73 20 72 65 73 6f 75 72 |ch code'|s resour|
|00001610| 63 65 20 74 79 70 65 20 | 2a 2f 0d 0d 2f 2a 20 6f |ce type |*/../* o|
|00001620| 74 68 65 72 20 64 65 66 | 69 6e 65 73 20 2a 2f 0d |ther def|ines */.|
|00001630| 0d 23 64 65 66 69 6e 65 | 09 09 6b 43 44 45 56 52 |.#define|..kCDEVR|
|00001640| 73 72 63 4e 6f 09 09 09 | 2d 34 30 36 34 09 2f 2a |srcNo...|-4064./*|
|00001650| 20 72 73 72 63 20 6e 6f | 20 6f 66 20 63 64 65 76 | rsrc no| of cdev|
|00001660| 20 63 6f 64 65 20 28 72 | 73 72 63 20 74 79 70 65 | code (r|src type|
|00001670| 20 27 63 64 65 76 27 29 | 20 2a 2f 0d 0d 2f 2a 20 | 'cdev')| */../* |
|00001680| 54 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 74 68 |The foll|owing th|
|00001690| 72 65 65 20 69 63 6f 6e | 73 20 61 72 65 20 74 68 |ree icon|s are th|
|000016a0| 65 20 6f 6e 65 73 20 49 | 20 64 65 66 69 6e 65 64 |e ones I| defined|
|000016b0| 20 66 6f 72 20 74 68 69 | 73 20 65 78 61 6d 70 6c | for thi|s exampl|
|000016c0| 65 2e 20 20 4d 6f 64 69 | 66 79 20 74 68 65 6d 20 |e. Modi|fy them |
|000016d0| 2a 2f 0d 2f 2a 20 66 6f | 72 20 79 6f 75 72 20 70 |*/./* fo|r your p|
|000016e0| 75 72 70 6f 73 65 73 20 | 6f 72 20 63 6f 6d 65 20 |urposes |or come |
|000016f0| 75 70 20 77 69 74 68 20 | 73 6f 6d 65 20 6f 6e 20 |up with |some on |
|00001700| 79 6f 75 72 20 6f 77 6e | 2e 20 20 2a 2f 0d 0d 23 |your own|. */..#|
|00001710| 64 65 66 69 6e 65 09 09 | 6b 49 63 6f 6e 46 61 6d |define..|kIconFam|
|00001720| 69 6c 79 49 44 09 09 2d | 34 30 36 34 09 2f 2a 20 |ilyID..-|4064./* |
|00001730| 72 73 72 63 20 6e 6f 20 | 6f 66 20 49 43 4e 23 20 |rsrc no |of ICN# |
|00001740| 72 73 72 63 20 77 69 74 | 68 20 6f 75 72 20 69 63 |rsrc wit|h our ic|
|00001750| 6f 6e 73 20 2a 2f 0d 23 | 64 65 66 69 6e 65 09 09 |ons */.#|define..|
|00001760| 6b 58 49 63 6f 6e 49 44 | 09 09 09 2d 34 30 33 33 |kXIconID|...-4033|
|00001770| 09 2f 2a 20 72 73 72 63 | 20 6e 6f 20 6f 66 20 58 |./* rsrc| no of X|
|00001780| 65 64 20 6f 75 74 20 69 | 63 6f 6e 20 66 61 6d 69 |ed out i|con fami|
|00001790| 6c 79 20 2a 2f 0d 23 64 | 65 66 69 6e 65 09 09 6b |ly */.#d|efine..k|
|000017a0| 4e 6f 50 61 74 63 68 49 | 63 6f 6e 49 44 09 09 2d |NoPatchI|conID..-|
|000017b0| 34 30 33 34 09 2f 2a 20 | 72 73 72 63 20 6e 6f 20 |4034./* |rsrc no |
|000017c0| 6f 66 20 69 63 6f 6e 20 | 66 61 6d 69 6c 79 20 77 |of icon |family w|
|000017d0| 68 65 6e 20 70 61 74 63 | 68 20 6e 6f 74 20 69 6e |hen patc|h not in|
|000017e0| 73 74 2e 20 2a 2f 0d 0d | 2f 2a 20 63 6f 6e 74 72 |st. */..|/* contr|
|000017f0| 6f 6c 20 70 61 6e 65 6c | 20 70 72 65 66 65 72 65 |ol panel| prefere|
|00001800| 6e 63 65 73 20 72 65 73 | 6f 75 72 63 65 20 64 65 |nces res|ource de|
|00001810| 66 69 6e 65 73 20 2a 2f | 0d 0d 23 64 65 66 69 6e |fines */|..#defin|
|00001820| 65 20 6b 43 50 70 72 65 | 66 73 52 73 72 63 54 79 |e kCPpre|fsRsrcTy|
|00001830| 70 65 09 27 70 72 65 66 | 27 0d 23 64 65 66 69 6e |pe.'pref|'.#defin|
|00001840| 65 09 6b 43 50 70 72 65 | 66 73 52 73 72 63 49 44 |e.kCPpre|fsRsrcID|
|00001850| 09 09 2d 34 30 34 38 09 | 2f 2a 20 63 61 72 65 66 |..-4048.|/* caref|
|00001860| 75 6c 20 2d 20 74 68 69 | 73 20 6e 75 6d 62 65 72 |ul - thi|s number|
|00001870| 20 69 73 20 61 6c 73 6f | 20 75 73 65 64 20 69 6e | is also| used in|
|00001880| 20 74 68 65 20 63 64 65 | 76 20 2a 2f 0d 0d 2f 2a | the cde|v */../*|
|00001890| 20 73 68 61 72 65 64 20 | 6d 65 6d 6f 72 79 20 61 | shared |memory a|
|000018a0| 64 64 72 65 73 73 20 72 | 65 73 6f 75 72 63 65 20 |ddress r|esource |
|000018b0| 64 65 66 69 6e 65 73 20 | 2a 2f 0d 0d 23 64 65 66 |defines |*/..#def|
|000018c0| 69 6e 65 20 6b 4d 65 6d | 41 64 64 72 54 79 70 65 |ine kMem|AddrType|
|000018d0| 09 09 27 6d 65 6d 41 27 | 0d 23 64 65 66 69 6e 65 |..'memA'|.#define|
|000018e0| 20 6b 4d 65 6d 41 64 64 | 72 49 44 09 09 09 2d 34 | kMemAdd|rID...-4|
|000018f0| 30 34 38 09 2f 2a 20 63 | 61 72 65 66 75 6c 20 2d |048./* c|areful -|
|00001900| 20 74 68 69 73 20 6e 75 | 6d 62 65 72 20 69 73 20 | this nu|mber is |
|00001910| 61 6c 73 6f 20 75 73 65 | 64 20 69 6e 20 74 68 65 |also use|d in the|
|00001920| 20 63 64 65 76 20 2a 2f | 0d 0d 74 79 70 65 64 65 | cdev */|..typede|
|00001930| 66 20 73 74 72 75 63 74 | 20 7b 0d 09 6c 6f 6e 67 |f struct| {..long|
|00001940| 09 74 68 65 41 64 64 72 | 3b 0d 7d 20 2a 2a 6d 65 |.theAddr|;.} **me|
|00001950| 6d 41 64 64 72 48 64 6c | 3b 0d 0d 23 69 6e 63 6c |mAddrHdl|;..#incl|
|00001960| 75 64 65 09 3c 54 72 61 | 70 73 2e 68 3e 0d 0d 23 |ude.<Tra|ps.h>..#|
|00001970| 69 6e 63 6c 75 64 65 20 | 22 53 68 61 72 65 64 44 |include |"SharedD|
|00001980| 61 74 61 2e 68 22 09 09 | 09 2f 2a 20 54 68 65 20 |ata.h"..|./* The |
|00001990| 64 65 66 69 6e 69 74 69 | 6f 6e 20 6f 66 20 6f 75 |definiti|on of ou|
|000019a0| 72 20 73 68 61 72 65 64 | 20 64 61 74 61 20 73 74 |r shared| data st|
|000019b0| 72 75 63 74 75 72 65 2e | 20 2a 2f 0d 09 09 09 09 |ructure.| */.....|
|000019c0| 09 09 09 09 2f 2a 20 49 | 6e 63 6c 75 64 65 73 20 |..../* I|ncludes |
|000019d0| 64 65 66 69 6e 69 74 69 | 6f 6e 73 20 6f 66 20 6d |definiti|ons of m|
|000019e0| 79 44 61 74 61 53 74 72 | 75 63 74 2c 20 6d 79 44 |yDataStr|uct, myD|
|000019f0| 61 74 61 50 74 72 2c 20 | 2a 2f 0d 09 09 09 09 09 |ataPtr, |*/......|
|00001a00| 09 09 09 2f 2a 20 61 6e | 64 20 6d 79 44 61 74 61 |.../* an|d myData|
|00001a10| 48 61 6e 64 6c 65 20 74 | 6f 20 72 65 66 65 72 20 |Handle t|o refer |
|00001a20| 74 6f 20 74 68 69 73 20 | 64 61 74 61 20 2a 2f 0d |to this |data */.|
|00001a30| 0d 2f 2a 20 50 72 6f 74 | 6f 74 79 70 65 73 20 2a |./* Prot|otypes *|
|00001a40| 2f 0d 0d 76 6f 69 64 09 | 6d 61 69 6e 28 20 76 6f |/..void.|main( vo|
|00001a50| 69 64 20 29 3b 0d 76 6f | 69 64 09 53 68 6f 77 49 |id );.vo|id.ShowI|
|00001a60| 63 6f 6e 46 61 6d 69 6c | 79 28 73 68 6f 72 74 20 |conFamil|y(short |
|00001a70| 69 63 6f 6e 49 64 29 3b | 0d 0d 2f 2a 20 46 75 6e |iconId);|../* Fun|
|00001a80| 63 74 69 6f 6e 73 20 2a | 2f 0d 0d 76 6f 69 64 09 |ctions *|/..void.|
|00001a90| 6d 61 69 6e 28 20 76 6f | 69 64 20 29 0d 7b 0d 09 |main( vo|id ).{..|
|00001aa0| 6d 79 44 61 74 61 50 74 | 72 09 09 09 6d 79 44 61 |myDataPt|r...myDa|
|00001ab0| 74 61 3b 09 09 2f 2a 20 | 70 6f 69 6e 74 65 72 20 |ta;../* |pointer |
|00001ac0| 74 6f 20 73 68 61 72 65 | 64 20 64 61 74 61 20 73 |to share|d data s|
|00001ad0| 74 72 75 63 74 75 72 65 | 20 2a 2f 0d 09 48 61 6e |tructure| */..Han|
|00001ae0| 64 6c 65 09 09 09 09 6d | 79 54 61 73 6b 3b 09 09 |dle....m|yTask;..|
|00001af0| 2f 2a 20 68 61 6e 64 6c | 65 20 74 6f 20 6d 79 20 |/* handl|e to my |
|00001b00| 74 72 61 70 20 70 61 74 | 63 68 20 63 6f 64 65 20 |trap pat|ch code |
|00001b10| 2a 2f 0d 09 6d 65 6d 41 | 64 64 72 48 64 6c 09 09 |*/..memA|ddrHdl..|
|00001b20| 09 61 64 64 72 48 61 6e | 64 6c 65 3b 09 2f 2a 20 |.addrHan|dle;./* |
|00001b30| 68 61 6e 64 6c 65 20 74 | 6f 20 6d 65 6d 6f 72 79 |handle t|o memory|
|00001b40| 20 61 64 64 72 65 73 73 | 20 72 65 73 6f 75 72 63 | address| resourc|
|00001b50| 65 20 2a 2f 0d 09 55 6e | 69 76 65 72 73 61 6c 50 |e */..Un|iversalP|
|00001b60| 72 6f 63 50 74 72 09 6d | 79 54 61 73 6b 41 64 64 |rocPtr.m|yTaskAdd|
|00001b70| 72 3b 09 2f 2a 20 75 73 | 65 64 20 74 6f 20 67 65 |r;./* us|ed to ge|
|00001b80| 74 20 61 64 64 72 20 6f | 66 20 74 68 65 20 74 61 |t addr o|f the ta|
|00001b90| 73 6b 20 63 6f 64 65 20 | 2a 2f 0d 09 54 48 7a 09 |sk code |*/..THz.|
|00001ba0| 09 09 09 09 73 61 76 65 | 5a 6f 6e 65 3b 09 2f 2a |....save|Zone;./*|
|00001bb0| 20 75 73 65 64 20 74 6f | 20 73 61 76 65 20 6d 65 | used to| save me|
|00001bc0| 6d 6f 72 79 20 7a 6f 6e | 65 20 2a 2f 0d 09 6c 6f |mory zon|e */..lo|
|00001bd0| 6e 67 09 09 09 09 74 6f | 52 65 70 6c 61 63 65 2c |ng....to|Replace,|
|00001be0| 09 2f 2a 20 74 68 65 73 | 65 20 74 77 6f 20 69 74 |./* thes|e two it|
|00001bf0| 65 6d 73 20 61 72 65 20 | 75 73 65 64 20 74 6f 20 |ems are |used to |
|00001c00| 72 65 70 6c 61 63 65 20 | 74 68 65 20 62 6f 67 75 |replace |the bogu|
|00001c10| 73 20 2a 2f 0d 09 09 09 | 09 09 09 72 65 70 6c 61 |s */....|...repla|
|00001c20| 63 65 57 69 74 68 3b 09 | 2f 2a 20 61 64 64 72 20 |ceWith;.|/* addr |
|00001c30| 69 6e 20 74 68 65 20 74 | 61 73 6b 20 63 6f 64 65 |in the t|ask code|
|00001c40| 20 77 69 74 68 20 74 68 | 65 20 2a 2f 0d 09 09 09 | with th|e */....|
|00001c50| 09 09 09 09 09 09 09 2f | 2a 20 61 64 64 72 20 6f |......./|* addr o|
|00001c60| 66 20 74 68 65 20 73 68 | 61 72 65 64 20 64 61 74 |f the sh|ared dat|
|00001c70| 61 20 73 74 72 75 63 74 | 75 72 65 20 2a 2f 0d 09 |a struct|ure */..|
|00001c80| 09 09 09 09 09 09 09 09 | 09 0d 09 43 50 70 72 65 |........|...CPpre|
|00001c90| 66 73 48 61 6e 64 6c 65 | 09 09 70 72 65 66 73 48 |fsHandle|..prefsH|
|00001ca0| 61 6e 64 6c 65 3b 09 2f | 2a 20 48 61 6e 64 6c 65 |andle;./|* Handle|
|00001cb0| 20 74 6f 20 74 68 65 20 | 43 6f 6e 74 72 6f 6c 20 | to the |Control |
|00001cc0| 50 61 6e 65 6c 73 20 70 | 72 65 66 73 20 72 73 72 |Panels p|refs rsr|
|00001cd0| 63 20 2a 2f 0d 09 42 6f | 6f 6c 65 61 6e 09 09 09 |c */..Bo|olean...|
|00001ce0| 09 73 68 6f 77 53 74 61 | 72 74 75 70 49 63 6f 6e |.showSta|rtupIcon|
|00001cf0| 3b 09 2f 2a 20 73 68 6f | 77 20 69 63 6f 6e 20 61 |;./* sho|w icon a|
|00001d00| 74 20 73 74 61 72 74 75 | 70 3f 20 2a 2f 0d 09 42 |t startu|p? */..B|
|00001d10| 6f 6f 6c 65 61 6e 09 09 | 09 09 69 6e 73 74 61 6c |oolean..|..instal|
|00001d20| 6c 50 61 74 63 68 3b 09 | 09 2f 2a 20 69 6e 73 74 |lPatch;.|./* inst|
|00001d30| 61 6c 6c 20 74 72 61 70 | 20 70 61 74 63 68 3f 20 |all trap| patch? |
|00001d40| 2a 2f 0d 09 0d 09 42 6f | 6f 6c 65 61 6e 09 09 09 |*/....Bo|olean...|
|00001d50| 09 73 74 69 6c 6c 4f 4b | 3b 09 09 2f 2a 20 73 74 |.stillOK|;../* st|
|00001d60| 69 6c 6c 20 4f 4b 20 74 | 6f 20 70 72 6f 63 65 65 |ill OK t|o procee|
|00001d70| 64 3f 20 2a 2f 0d 09 42 | 6f 6f 6c 65 61 6e 09 09 |d? */..B|oolean..|
|00001d80| 09 09 73 68 61 72 65 64 | 44 61 74 61 4f 4b 3b 09 |..shared|DataOK;.|
|00001d90| 2f 2a 20 77 61 73 20 73 | 68 61 72 65 64 20 64 61 |/* was s|hared da|
|00001da0| 74 61 20 73 74 72 75 63 | 74 20 61 6c 6c 6f 63 61 |ta struc|t alloca|
|00001db0| 74 65 64 20 4f 4b 3f 20 | 2a 2f 0d 09 0d 09 73 74 |ted OK? |*/....st|
|00001dc0| 69 6c 6c 4f 4b 20 3d 20 | 74 72 75 65 3b 0d 09 73 |illOK = |true;..s|
|00001dd0| 68 6f 77 53 74 61 72 74 | 75 70 49 63 6f 6e 20 3d |howStart|upIcon =|
|00001de0| 20 74 72 75 65 3b 0d 09 | 69 6e 73 74 61 6c 6c 50 | true;..|installP|
|00001df0| 61 74 63 68 20 3d 20 74 | 72 75 65 3b 0d 09 0d 09 |atch = t|rue;....|
|00001e00| 6d 79 44 61 74 61 20 3d | 20 4e 55 4c 4c 3b 0d 09 |myData =| NULL;..|
|00001e10| 6d 79 54 61 73 6b 20 3d | 20 4e 55 4c 4c 3b 0d 09 |myTask =| NULL;..|
|00001e20| 61 64 64 72 48 61 6e 64 | 6c 65 20 3d 20 4e 55 4c |addrHand|le = NUL|
|00001e30| 4c 3b 0d 09 09 09 09 09 | 09 09 09 09 09 0d 09 2f |L;......|......./|
|00001e40| 2a 09 46 69 72 73 74 20 | 73 61 76 65 20 74 68 65 |*.First |save the|
|00001e50| 20 63 75 72 72 65 6e 74 | 20 6d 65 6d 6f 72 79 20 | current| memory |
|00001e60| 7a 6f 6e 65 2c 20 74 68 | 65 6e 20 73 77 69 74 63 |zone, th|en switc|
|00001e70| 68 20 74 6f 20 74 68 65 | 20 53 79 73 74 65 6d 20 |h to the| System |
|00001e80| 7a 6f 6e 65 20 73 6f 0d | 09 20 2a 09 77 65 27 72 |zone so.|. *.we'r|
|00001e90| 65 20 70 6f 73 69 74 69 | 76 65 20 74 68 61 74 20 |e positi|ve that |
|00001ea0| 61 6c 6c 20 6d 65 6d 6f | 72 79 20 61 6c 6c 6f 63 |all memo|ry alloc|
|00001eb0| 61 74 69 6f 6e 20 6f 63 | 63 75 72 73 20 69 6e 20 |ation oc|curs in |
|00001ec0| 74 68 65 20 53 79 73 74 | 65 6d 20 48 65 61 70 2e |the Syst|em Heap.|
|00001ed0| 0d 09 20 2a 2f 0d 09 0d | 09 09 73 61 76 65 5a 6f |.. */...|..saveZo|
|00001ee0| 6e 65 20 3d 20 47 65 74 | 5a 6f 6e 65 28 29 3b 0d |ne = Get|Zone();.|
|00001ef0| 09 09 53 65 74 5a 6f 6e | 65 28 20 53 79 73 74 65 |..SetZon|e( Syste|
|00001f00| 6d 5a 6f 6e 65 28 29 20 | 29 3b 0d 09 09 0d 09 2f |mZone() |);...../|
|00001f10| 2a 09 41 6c 6c 6f 63 61 | 74 65 20 6d 65 6d 6f 72 |*.Alloca|te memor|
|00001f20| 79 20 28 61 20 70 6f 69 | 6e 74 65 72 29 20 66 6f |y (a poi|nter) fo|
|00001f30| 72 20 6f 75 72 20 64 61 | 74 61 20 73 74 72 75 63 |r our da|ta struc|
|00001f40| 74 75 72 65 20 73 6f 20 | 74 68 61 74 20 62 6f 74 |ture so |that bot|
|00001f50| 68 20 74 68 69 73 20 63 | 6f 64 65 0d 09 20 2a 09 |h this c|ode.. *.|
|00001f60| 61 6e 64 20 74 68 65 20 | 70 61 74 63 68 20 63 6f |and the |patch co|
|00001f70| 64 65 20 77 69 6c 6c 20 | 68 61 76 65 20 61 63 63 |de will |have acc|
|00001f80| 65 73 73 20 74 6f 20 74 | 68 65 20 64 61 74 61 2e |ess to t|he data.|
|00001f90| 20 20 28 57 65 27 6c 6c | 20 73 65 65 20 61 62 6f | (We'll| see abo|
|00001fa0| 75 74 0d 09 20 2a 09 67 | 69 76 69 6e 67 20 61 63 |ut.. *.g|iving ac|
|00001fb0| 63 65 73 73 20 74 6f 20 | 74 68 69 73 20 64 61 74 |cess to |this dat|
|00001fc0| 61 20 74 6f 20 74 68 65 | 20 70 61 74 63 68 20 63 |a to the| patch c|
|00001fd0| 6f 64 65 20 6c 61 74 65 | 72 2e 29 20 20 57 65 20 |ode late|r.) We |
|00001fe0| 75 73 65 20 61 20 70 6f | 69 6e 74 65 72 0d 09 20 |use a po|inter.. |
|00001ff0| 2a 09 72 61 74 68 65 72 | 20 74 68 61 6e 20 61 20 |*.rather| than a |
|00002000| 68 61 6e 64 6c 65 20 62 | 65 63 61 75 73 65 20 74 |handle b|ecause t|
|00002010| 68 65 20 64 61 74 61 20 | 68 61 73 20 74 6f 20 62 |he data |has to b|
|00002020| 65 20 6c 6f 63 6b 65 64 | 20 64 6f 77 6e 20 61 6e |e locked| down an|
|00002030| 79 77 61 79 2e 0d 09 20 | 2a 2f 0d 09 09 0d 09 09 |yway... |*/......|
|00002040| 6d 79 44 61 74 61 20 3d | 20 28 6d 79 44 61 74 61 |myData =| (myData|
|00002050| 50 74 72 29 4e 65 77 50 | 74 72 53 79 73 43 6c 65 |Ptr)NewP|trSysCle|
|00002060| 61 72 28 73 69 7a 65 6f | 66 28 6d 79 44 61 74 61 |ar(sizeo|f(myData|
|00002070| 53 74 72 75 63 74 29 29 | 3b 0d 09 09 0d 09 09 73 |Struct))|;......s|
|00002080| 68 61 72 65 64 44 61 74 | 61 4f 4b 20 3d 20 74 72 |haredDat|aOK = tr|
|00002090| 75 65 3b 0d 09 09 0d 09 | 09 69 66 20 28 20 21 6d |ue;.....|.if ( !m|
|000020a0| 79 44 61 74 61 20 29 0d | 09 09 7b 0d 09 09 09 73 |yData ).|..{....s|
|000020b0| 74 69 6c 6c 4f 4b 20 3d | 20 66 61 6c 73 65 3b 0d |tillOK =| false;.|
|000020c0| 09 09 09 73 68 61 72 65 | 64 44 61 74 61 4f 4b 20 |...share|dDataOK |
|000020d0| 3d 20 66 61 6c 73 65 3b | 0d 09 09 7d 0d 09 0d 09 |= false;|...}....|
|000020e0| 2f 2a 09 4d 61 72 6b 20 | 74 68 65 20 64 61 74 61 |/*.Mark |the data|
|000020f0| 20 61 73 20 69 6e 20 75 | 73 65 20 75 6e 74 69 6c | as in u|se until|
|00002100| 20 77 65 27 72 65 20 74 | 68 72 6f 75 67 68 20 77 | we're t|hrough w|
|00002110| 69 74 68 20 69 74 2e 20 | 20 53 69 6e 63 65 20 77 |ith it. | Since w|
|00002120| 65 20 6a 75 73 74 0d 09 | 20 2a 09 63 72 65 61 74 |e just..| *.creat|
|00002130| 65 64 20 69 74 2c 20 77 | 65 20 6b 6e 6f 77 20 6e |ed it, w|e know n|
|00002140| 6f 20 6f 6e 65 20 69 73 | 20 75 73 69 6e 67 20 69 |o one is| using i|
|00002150| 74 20 6e 6f 77 2e 20 20 | 41 6c 73 6f 20 69 6e 69 |t now. |Also ini|
|00002160| 74 69 61 6c 69 7a 65 20 | 73 6f 6d 65 0d 09 20 2a |tialize |some.. *|
|00002170| 09 76 61 6c 75 65 73 20 | 69 6e 20 74 68 65 20 73 |.values |in the s|
|00002180| 68 61 72 65 64 20 64 61 | 74 61 20 73 74 72 75 63 |hared da|ta struc|
|00002190| 74 75 72 65 20 61 6e 64 | 20 73 65 74 20 74 68 65 |ture and| set the|
|000021a0| 20 63 68 65 63 6b 20 76 | 61 6c 75 65 20 73 6f 20 | check v|alue so |
|000021b0| 74 68 65 0d 09 20 2a 09 | 63 6f 6e 74 72 6f 6c 20 |the.. *.|control |
|000021c0| 70 61 6e 65 6c 20 63 61 | 6e 20 74 65 6c 6c 20 74 |panel ca|n tell t|
|000021d0| 68 65 20 65 78 74 65 6e | 73 69 6f 6e 20 61 63 74 |he exten|sion act|
|000021e0| 75 61 6c 6c 79 20 72 61 | 6e 2e 0d 09 20 2a 2f 0d |ually ra|n... */.|
|000021f0| 09 09 69 66 20 28 20 73 | 68 61 72 65 64 44 61 74 |..if ( s|haredDat|
|00002200| 61 4f 4b 20 29 0d 09 09 | 7b 0d 09 09 09 6d 79 44 |aOK )...|{....myD|
|00002210| 61 74 61 2d 3e 69 6e 55 | 73 65 20 3d 20 74 72 75 |ata->inU|se = tru|
|00002220| 65 3b 0d 09 09 09 6d 79 | 44 61 74 61 2d 3e 6f 6c |e;....my|Data->ol|
|00002230| 64 54 72 61 70 20 3d 20 | 30 4c 3b 0d 09 09 09 6d |dTrap = |0L;....m|
|00002240| 79 44 61 74 61 2d 3e 43 | 50 70 72 65 66 73 52 73 |yData->C|PprefsRs|
|00002250| 72 63 20 3d 20 4e 55 4c | 4c 3b 0d 09 09 09 6d 79 |rc = NUL|L;....my|
|00002260| 44 61 74 61 2d 3e 63 68 | 65 63 6b 56 61 6c 75 65 |Data->ch|eckValue|
|00002270| 20 3d 20 6b 43 68 65 63 | 6b 56 61 6c 75 65 3b 0d | = kChec|kValue;.|
|00002280| 09 09 7d 0d 0d 09 2f 2a | 09 4c 6f 61 64 20 74 68 |..}.../*|.Load th|
|00002290| 65 20 63 6f 6e 74 72 6f | 6c 20 70 61 6e 65 6c 27 |e contro|l panel'|
|000022a0| 73 20 70 72 65 66 65 72 | 65 6e 63 65 73 20 72 65 |s prefer|ences re|
|000022b0| 73 6f 75 72 63 65 20 74 | 6f 20 73 65 65 20 69 66 |source t|o see if|
|000022c0| 20 77 65 20 73 68 6f 75 | 6c 64 20 73 68 6f 77 0d | we shou|ld show.|
|000022d0| 09 20 2a 09 74 68 65 20 | 69 63 6f 6e 20 61 74 20 |. *.the |icon at |
|000022e0| 73 74 61 72 74 75 70 20 | 61 6e 64 20 69 66 20 77 |startup |and if w|
|000022f0| 65 20 73 68 6f 75 6c 64 | 20 70 61 74 63 68 20 74 |e should| patch t|
|00002300| 68 65 20 74 72 61 70 2e | 20 20 41 66 74 65 72 20 |he trap.| After |
|00002310| 77 65 27 76 65 20 72 65 | 61 64 20 69 74 2c 0d 09 |we've re|ad it,..|
|00002320| 20 2a 09 72 65 6c 65 61 | 73 65 20 69 74 2e 20 20 | *.relea|se it. |
|00002330| 54 68 65 20 63 6f 6e 74 | 72 6f 6c 20 70 61 6e 65 |The cont|rol pane|
|00002340| 6c 20 77 69 6c 6c 20 72 | 65 6c 6f 61 64 20 69 74 |l will r|eload it|
|00002350| 2e 20 20 49 66 20 77 65 | 20 63 61 6e 6e 6f 74 20 |. If we| cannot |
|00002360| 72 65 61 64 20 74 68 65 | 0d 09 20 2a 09 72 65 73 |read the|.. *.res|
|00002370| 6f 75 72 63 65 20 66 72 | 6f 6d 20 74 68 65 20 66 |ource fr|om the f|
|00002380| 69 6c 65 20 28 70 72 6f | 62 61 62 6c 79 20 62 65 |ile (pro|bably be|
|00002390| 63 61 75 73 65 20 69 74 | 20 64 6f 65 73 6e 27 74 |cause it| doesn't|
|000023a0| 20 79 65 74 20 65 78 69 | 73 74 29 2c 20 6a 75 73 | yet exi|st), jus|
|000023b0| 74 20 61 73 73 75 6d 65 | 0d 09 20 2a 09 74 72 75 |t assume|.. *.tru|
|000023c0| 65 2f 79 65 73 20 66 6f | 72 20 62 6f 74 68 20 71 |e/yes fo|r both q|
|000023d0| 75 65 73 74 69 6f 6e 73 | 2e 0d 09 20 2a 2f 0d 09 |uestions|... */..|
|000023e0| 20 0d 09 20 09 6d 79 44 | 61 74 61 2d 3e 43 50 6f | .. .myD|ata->CPo|
|000023f0| 6e 20 3d 20 74 72 75 65 | 3b 09 09 2f 2a 20 70 72 |n = true|;../* pr|
|00002400| 65 73 65 74 20 74 6f 20 | 27 6f 6e 27 20 75 6e 6c |eset to |'on' unl|
|00002410| 65 73 73 20 77 65 20 66 | 69 6e 64 20 6f 74 68 65 |ess we f|ind othe|
|00002420| 72 77 69 73 65 20 2a 2f | 0d 09 20 09 09 09 09 09 |rwise */|.. .....|
|00002430| 09 09 09 2f 2a 20 69 6e | 73 74 61 6c 6c 50 61 74 |.../* in|stallPat|
|00002440| 63 68 20 77 61 73 20 61 | 6c 73 6f 20 70 72 65 73 |ch was a|lso pres|
|00002450| 65 74 20 74 6f 20 74 72 | 75 65 20 61 62 6f 76 65 |et to tr|ue above|
|00002460| 20 2a 2f 0d 09 20 09 0d | 09 20 09 70 72 65 66 73 | */.. ..|. .prefs|
|00002470| 48 61 6e 64 6c 65 20 3d | 20 28 43 50 70 72 65 66 |Handle =| (CPpref|
|00002480| 73 48 61 6e 64 6c 65 29 | 47 65 74 31 52 65 73 6f |sHandle)|Get1Reso|
|00002490| 75 72 63 65 28 20 6b 43 | 50 70 72 65 66 73 52 73 |urce( kC|PprefsRs|
|000024a0| 72 63 54 79 70 65 2c 20 | 6b 43 50 70 72 65 66 73 |rcType, |kCPprefs|
|000024b0| 52 73 72 63 49 44 20 29 | 3b 0d 09 20 09 69 66 20 |RsrcID )|;.. .if |
|000024c0| 28 20 70 72 65 66 73 48 | 61 6e 64 6c 65 20 29 0d |( prefsH|andle ).|
|000024d0| 09 20 09 7b 0d 09 20 09 | 09 69 66 20 28 20 21 28 |. .{.. .|.if ( !(|
|000024e0| 2a 70 72 65 66 73 48 61 | 6e 64 6c 65 29 2d 3e 4f |*prefsHa|ndle)->O|
|000024f0| 6e 20 29 0d 09 20 09 09 | 7b 0d 09 20 09 09 09 69 |n ).. ..|{.. ...i|
|00002500| 6e 73 74 61 6c 6c 50 61 | 74 63 68 20 3d 20 66 61 |nstallPa|tch = fa|
|00002510| 6c 73 65 3b 0d 09 20 09 | 09 09 6d 79 44 61 74 61 |lse;.. .|..myData|
|00002520| 2d 3e 43 50 6f 6e 20 3d | 20 66 61 6c 73 65 3b 0d |->CPon =| false;.|
|00002530| 09 20 09 09 7d 0d 09 20 | 09 09 0d 09 20 09 09 69 |. ..}.. |.... ..i|
|00002540| 66 20 28 20 21 28 2a 70 | 72 65 66 73 48 61 6e 64 |f ( !(*p|refsHand|
|00002550| 6c 65 29 2d 3e 53 68 6f | 77 49 63 6f 6e 20 29 0d |le)->Sho|wIcon ).|
|00002560| 09 20 09 09 09 73 68 6f | 77 53 74 61 72 74 75 70 |. ...sho|wStartup|
|00002570| 49 63 6f 6e 20 3d 20 66 | 61 6c 73 65 3b 0d 09 20 |Icon = f|alse;.. |
|00002580| 09 09 09 0d 09 20 09 09 | 52 65 6c 65 61 73 65 52 |..... ..|ReleaseR|
|00002590| 65 73 6f 75 72 63 65 28 | 20 28 48 61 6e 64 6c 65 |esource(| (Handle|
|000025a0| 29 70 72 65 66 73 48 61 | 6e 64 6c 65 20 29 3b 0d |)prefsHa|ndle );.|
|000025b0| 09 20 09 7d 0d 09 0d 09 | 2f 2a 09 47 65 74 20 74 |. .}....|/*.Get t|
|000025c0| 68 65 20 61 64 64 72 65 | 73 73 20 6f 66 20 74 68 |he addre|ss of th|
|000025d0| 65 20 74 72 61 70 20 77 | 65 27 72 65 20 67 6f 69 |e trap w|e're goi|
|000025e0| 6e 67 20 74 6f 20 70 61 | 74 63 68 2e 20 2a 2f 0d |ng to pa|tch. */.|
|000025f0| 09 09 69 66 20 28 20 73 | 68 61 72 65 64 44 61 74 |..if ( s|haredDat|
|00002600| 61 4f 4b 20 29 0d 09 09 | 09 6d 79 44 61 74 61 2d |aOK )...|.myData-|
|00002610| 3e 6f 6c 64 54 72 61 70 | 20 3d 20 4e 47 65 74 54 |>oldTrap| = NGetT|
|00002620| 72 61 70 41 64 64 72 65 | 73 73 28 20 6b 54 72 61 |rapAddre|ss( kTra|
|00002630| 70 54 6f 50 61 74 63 68 | 2c 20 54 6f 6f 6c 54 72 |pToPatch|, ToolTr|
|00002640| 61 70 20 29 3b 0d 09 0d | 09 2f 2a 09 50 75 74 20 |ap );...|./*.Put |
|00002650| 74 68 65 20 73 69 7a 65 | 20 6f 66 20 74 68 65 20 |the size| of the |
|00002660| 74 72 61 70 27 73 20 70 | 61 72 61 6d 65 74 65 72 |trap's p|arameter|
|00002670| 73 20 61 6e 64 20 74 68 | 65 20 73 69 7a 65 20 6f |s and th|e size o|
|00002680| 66 20 74 68 65 20 72 65 | 74 75 72 6e 20 76 61 6c |f the re|turn val|
|00002690| 75 65 0d 09 20 2a 09 28 | 63 61 6e 20 62 65 20 7a |ue.. *.(|can be z|
|000026a0| 65 72 6f 29 20 69 6e 20 | 74 68 65 20 73 68 61 72 |ero) in |the shar|
|000026b0| 65 64 20 64 61 74 61 20 | 73 74 72 75 63 74 75 72 |ed data |structur|
|000026c0| 65 20 73 6f 20 74 68 61 | 74 20 74 68 65 20 70 61 |e so tha|t the pa|
|000026d0| 74 63 68 20 63 6f 64 65 | 20 68 61 73 0d 09 20 2a |tch code| has.. *|
|000026e0| 09 61 63 63 65 73 73 20 | 74 6f 20 69 74 2e 20 20 |.access |to it. |
|000026f0| 54 68 69 73 20 69 73 20 | 75 73 65 64 20 62 79 20 |This is |used by |
|00002700| 74 68 65 20 70 61 74 63 | 68 20 63 6f 64 65 20 74 |the patc|h code t|
|00002710| 6f 20 68 61 6e 64 6c 65 | 20 70 61 72 61 6d 65 74 |o handle| paramet|
|00002720| 65 72 73 20 74 68 61 74 | 0d 09 20 2a 09 61 72 65 |ers that|.. *.are|
|00002730| 20 70 61 73 73 65 64 20 | 6f 6e 20 74 68 65 20 73 | passed |on the s|
|00002740| 74 61 63 6b 20 28 73 61 | 6d 65 20 66 6f 72 20 74 |tack (sa|me for t|
|00002750| 68 65 20 72 65 74 75 72 | 6e 20 76 61 6c 75 65 29 |he retur|n value)|
|00002760| 2e 20 20 4e 6f 74 65 20 | 74 68 61 74 20 77 69 74 |. Note |that wit|
|00002770| 68 0d 09 20 2a 09 72 65 | 67 69 73 74 65 72 20 62 |h.. *.re|gister b|
|00002780| 61 73 65 64 20 72 6f 75 | 74 69 6e 65 73 20 28 6c |ased rou|tines (l|
|00002790| 69 6b 65 20 61 20 6c 6f | 74 20 6f 66 20 74 68 65 |ike a lo|t of the|
|000027a0| 20 6d 65 6d 6f 72 79 20 | 72 6f 75 74 69 6e 65 73 | memory |routines|
|000027b0| 29 2c 20 74 68 65 20 70 | 61 74 63 68 0d 09 20 2a |), the p|atch.. *|
|000027c0| 09 68 61 73 20 74 6f 20 | 6b 6e 6f 77 20 77 68 69 |.has to |know whi|
|000027d0| 63 68 20 72 65 67 69 73 | 74 65 72 73 20 61 72 65 |ch regis|ters are|
|000027e0| 20 75 73 65 64 20 61 6e | 64 20 77 68 61 74 20 74 | used an|d what t|
|000027f0| 68 65 69 72 20 73 69 7a | 65 73 20 61 72 65 20 69 |heir siz|es are i|
|00002800| 74 73 65 6c 66 2e 0d 09 | 20 2a 09 57 69 74 68 20 |tself...| *.With |
|00002810| 73 74 61 63 6b 20 62 61 | 73 65 64 20 72 6f 75 74 |stack ba|sed rout|
|00002820| 69 6e 65 73 2c 20 74 68 | 65 20 70 61 74 63 68 20 |ines, th|e patch |
|00002830| 64 6f 65 73 20 6e 6f 74 | 20 6e 65 63 65 73 73 61 |does not| necessa|
|00002840| 72 69 6c 79 20 6e 65 65 | 64 20 74 6f 20 6b 6e 6f |rily nee|d to kno|
|00002850| 77 0d 09 20 2a 09 61 6e | 79 74 68 69 6e 67 20 65 |w.. *.an|ything e|
|00002860| 6c 73 65 20 61 62 6f 75 | 74 20 74 68 65 20 70 61 |lse abou|t the pa|
|00002870| 72 61 6d 65 74 65 72 73 | 20 75 6e 6c 65 73 73 20 |rameters| unless |
|00002880| 69 74 20 77 61 6e 74 73 | 20 74 6f 20 64 6f 20 73 |it wants| to do s|
|00002890| 6f 6d 65 74 68 69 6e 67 | 20 77 69 74 68 0d 09 20 |omething| with.. |
|000028a0| 2a 09 74 68 65 6d 2e 0d | 09 20 2a 2f 0d 09 20 09 |*.them..|. */.. .|
|000028b0| 69 66 20 28 20 73 68 61 | 72 65 64 44 61 74 61 4f |if ( sha|redDataO|
|000028c0| 4b 20 29 0d 09 20 09 7b | 0d 09 20 09 09 6d 79 44 |K ).. .{|.. ..myD|
|000028d0| 61 74 61 2d 3e 70 61 72 | 61 6d 42 79 74 65 73 20 |ata->par|amBytes |
|000028e0| 3d 20 6b 50 61 72 61 6d | 42 79 74 65 73 3b 0d 09 |= kParam|Bytes;..|
|000028f0| 20 09 09 6d 79 44 61 74 | 61 2d 3e 72 65 74 75 72 | ..myDat|a->retur|
|00002900| 6e 42 79 74 65 73 20 3d | 20 6b 52 65 74 75 72 6e |nBytes =| kReturn|
|00002910| 42 79 74 65 73 3b 0d 09 | 20 09 7d 0d 09 09 0d 09 |Bytes;..| .}.....|
|00002920| 2f 2a 09 4e 6f 77 20 6c | 6f 61 64 20 74 68 65 20 |/*.Now l|oad the |
|00002930| 63 6f 64 65 20 72 65 73 | 6f 75 72 63 65 20 74 68 |code res|ource th|
|00002940| 61 74 20 63 6f 6d 70 72 | 69 73 65 73 20 74 68 65 |at compr|ises the|
|00002950| 20 61 63 74 75 61 6c 20 | 27 70 61 74 63 68 2e 27 | actual |'patch.'|
|00002960| 20 20 54 68 69 73 20 63 | 6f 64 65 0d 09 20 2a 09 | This c|ode.. *.|
|00002970| 77 69 6c 6c 20 65 78 65 | 63 75 74 65 20 28 69 6e |will exe|cute (in|
|00002980| 73 74 65 61 64 20 6f 66 | 20 74 68 65 20 6f 72 69 |stead of| the ori|
|00002990| 67 69 6e 61 6c 20 63 6f | 64 65 29 20 77 68 65 6e |ginal co|de) when|
|000029a0| 20 74 68 65 20 74 72 61 | 70 20 69 73 20 65 78 65 | the tra|p is exe|
|000029b0| 63 75 74 65 64 2e 0d 09 | 20 2a 09 54 68 65 20 70 |cuted...| *.The p|
|000029c0| 61 74 63 68 20 69 74 73 | 65 6c 66 20 64 65 74 65 |atch its|elf dete|
|000029d0| 72 6d 69 6e 65 73 20 77 | 68 65 74 68 65 72 20 6f |rmines w|hether o|
|000029e0| 72 20 6e 6f 74 20 74 6f | 20 65 78 65 63 75 74 65 |r not to| execute|
|000029f0| 20 28 6a 75 6d 70 20 74 | 6f 29 20 74 68 65 20 6f | (jump t|o) the o|
|00002a00| 72 69 67 69 6e 61 6c 0d | 09 20 2a 09 74 72 61 70 |riginal.|. *.trap|
|00002a10| 20 63 6f 64 65 20 6f 6e | 63 65 20 69 74 27 73 20 | code on|ce it's |
|00002a20| 64 6f 6e 65 20 69 74 73 | 20 74 68 69 6e 67 2e 20 |done its| thing. |
|00002a30| 20 54 68 65 20 61 63 74 | 75 61 6c 20 70 61 74 63 | The act|ual patc|
|00002a40| 68 20 63 6f 64 65 20 69 | 73 20 69 6e 20 69 74 73 |h code i|s in its|
|00002a50| 20 6f 77 6e 0d 09 20 2a | 09 72 65 73 6f 75 72 63 | own.. *|.resourc|
|00002a60| 65 20 6f 66 20 74 79 70 | 65 20 27 74 61 73 6b 27 |e of typ|e 'task'|
|00002a70| 2e 0d 09 20 2a 2f 0d 09 | 20 09 69 66 20 28 20 69 |... */..| .if ( i|
|00002a80| 6e 73 74 61 6c 6c 50 61 | 74 63 68 20 26 26 20 73 |nstallPa|tch && s|
|00002a90| 74 69 6c 6c 4f 4b 20 29 | 0d 09 20 09 7b 0d 09 09 |tillOK )|.. .{...|
|00002aa0| 09 6d 79 54 61 73 6b 20 | 3d 20 47 65 74 31 52 65 |.myTask |= Get1Re|
|00002ab0| 73 6f 75 72 63 65 28 20 | 6b 54 61 73 6b 52 73 72 |source( |kTaskRsr|
|00002ac0| 63 54 79 70 65 2c 20 6b | 54 61 73 6b 52 73 72 63 |cType, k|TaskRsrc|
|00002ad0| 4e 6f 20 29 3b 0d 09 09 | 0d 09 09 09 69 66 20 28 |No );...|....if (|
|00002ae0| 20 21 6d 79 54 61 73 6b | 20 29 0d 09 09 09 09 73 | !myTask| ).....s|
|00002af0| 74 69 6c 6c 4f 4b 20 3d | 20 66 61 6c 73 65 3b 0d |tillOK =| false;.|
|00002b00| 09 09 7d 0d 09 09 0d 09 | 2f 2a 09 48 65 72 65 27 |..}.....|/*.Here'|
|00002b10| 73 20 61 6e 20 65 78 61 | 6d 70 6c 65 20 6f 66 20 |s an exa|mple of |
|00002b20| 61 20 63 6c 65 76 65 72 | 20 74 65 63 68 6e 69 71 |a clever| techniq|
|00002b30| 75 65 20 75 73 65 64 20 | 69 6e 20 48 61 72 76 65 |ue used |in Harve|
|00002b40| 79 27 73 20 63 6f 64 65 | 2e 20 20 57 65 20 75 73 |y's code|. We us|
|00002b50| 65 20 74 68 65 0d 09 20 | 2a 09 4d 75 6e 67 65 72 |e the.. |*.Munger|
|00002b60| 20 72 6f 75 74 69 6e 65 | 20 74 6f 20 72 65 70 6c | routine| to repl|
|00002b70| 61 63 65 20 61 20 70 72 | 65 64 65 74 65 72 6d 69 |ace a pr|edetermi|
|00002b80| 6e 65 64 20 70 61 74 74 | 65 72 6e 20 69 6e 20 74 |ned patt|ern in t|
|00002b90| 68 65 20 74 61 73 6b 20 | 63 6f 64 65 20 77 69 74 |he task |code wit|
|00002ba0| 68 0d 09 20 2a 09 74 68 | 65 20 68 61 6e 64 6c 65 |h.. *.th|e handle|
|00002bb0| 20 6f 66 20 6f 75 72 20 | 64 61 74 61 20 73 74 72 | of our |data str|
|00002bc0| 75 63 74 75 72 65 20 73 | 6f 20 74 68 61 74 20 74 |ucture s|o that t|
|00002bd0| 68 65 20 70 61 74 63 68 | 20 63 6f 64 65 20 68 61 |he patch| code ha|
|00002be0| 73 20 61 63 63 65 73 73 | 20 74 6f 0d 09 20 2a 09 |s access| to.. *.|
|00002bf0| 74 68 65 20 64 61 74 61 | 2e 20 20 54 68 65 20 70 |the data|. The p|
|00002c00| 61 74 63 68 20 63 6f 64 | 65 20 61 73 73 69 67 6e |atch cod|e assign|
|00002c10| 73 20 69 74 73 20 64 61 | 74 61 20 73 74 72 75 63 |s its da|ta struc|
|00002c20| 74 75 72 65 20 68 61 6e | 64 6c 65 20 74 6f 20 30 |ture han|dle to 0|
|00002c30| 78 31 32 33 34 35 36 37 | 38 0d 09 20 2a 09 28 77 |x1234567|8.. *.(w|
|00002c40| 68 69 63 68 20 69 73 20 | 61 20 62 6f 67 75 73 20 |hich is |a bogus |
|00002c50| 61 64 64 72 65 73 73 29 | 2e 20 20 57 65 20 75 73 |address)|. We us|
|00002c60| 65 20 4d 75 6e 67 65 72 | 20 74 6f 20 66 69 6e 64 |e Munger| to find|
|00002c70| 20 74 68 69 73 20 70 61 | 74 74 65 72 6e 0d 09 20 | this pa|ttern.. |
|00002c80| 2a 09 61 6e 64 20 72 65 | 70 6c 61 63 65 20 69 74 |*.and re|place it|
|00002c90| 20 77 69 74 68 20 74 68 | 65 20 72 65 61 6c 20 61 | with th|e real a|
|00002ca0| 64 64 72 65 73 73 20 6f | 66 20 6f 75 72 20 64 61 |ddress o|f our da|
|00002cb0| 74 61 20 73 74 72 75 63 | 74 75 72 65 20 68 61 6e |ta struc|ture han|
|00002cc0| 64 6c 65 2e 0d 09 20 2a | 2f 0d 0d 09 09 72 65 70 |dle... *|/....rep|
|00002cd0| 6c 61 63 65 57 69 74 68 | 20 3d 20 28 6c 6f 6e 67 |laceWith| = (long|
|00002ce0| 29 28 20 6d 79 44 61 74 | 61 20 29 3b 0d 09 09 74 |)( myDat|a );...t|
|00002cf0| 6f 52 65 70 6c 61 63 65 | 20 3d 20 30 78 31 32 33 |oReplace| = 0x123|
|00002d00| 34 35 36 37 38 3b 0d 09 | 09 0d 09 09 69 66 20 28 |45678;..|....if (|
|00002d10| 20 73 74 69 6c 6c 4f 4b | 20 26 26 20 69 6e 73 74 | stillOK| && inst|
|00002d20| 61 6c 6c 50 61 74 63 68 | 20 29 0d 09 09 09 4d 75 |allPatch| )....Mu|
|00002d30| 6e 67 65 72 28 20 6d 79 | 54 61 73 6b 2c 20 30 4c |nger( my|Task, 0L|
|00002d40| 2c 20 26 74 6f 52 65 70 | 6c 61 63 65 2c 20 34 2c |, &toRep|lace, 4,|
|00002d50| 20 26 72 65 70 6c 61 63 | 65 57 69 74 68 2c 20 34 | &replac|eWith, 4|
|00002d60| 20 29 3b 0d 0d 09 2f 2a | 09 54 68 65 20 6f 72 69 | );.../*|.The ori|
|00002d70| 67 69 6e 61 6c 20 28 48 | 61 72 76 65 79 29 20 63 |ginal (H|arvey) c|
|00002d80| 6f 64 65 20 61 6c 73 6f | 20 75 73 65 64 20 4d 75 |ode also| used Mu|
|00002d90| 6e 67 65 72 20 74 6f 20 | 66 6f 72 63 65 20 74 68 |nger to |force th|
|00002da0| 65 20 70 61 74 63 68 20 | 74 6f 20 6a 75 6d 70 20 |e patch |to jump |
|00002db0| 74 6f 0d 09 20 2a 09 74 | 68 65 20 6f 72 69 67 69 |to.. *.t|he origi|
|00002dc0| 6e 61 6c 20 74 72 61 70 | 20 61 64 64 72 65 73 73 |nal trap| address|
|00002dd0| 20 61 66 74 65 72 20 69 | 74 20 65 78 65 63 75 74 | after i|t execut|
|00002de0| 65 64 2e 20 20 49 27 6d | 20 6c 65 61 76 69 6e 67 |ed. I'm| leaving|
|00002df0| 20 74 68 61 74 20 75 70 | 20 74 6f 20 74 68 65 0d | that up| to the.|
|00002e00| 09 20 2a 09 70 61 74 63 | 68 20 63 6f 64 65 20 74 |. *.patc|h code t|
|00002e10| 6f 20 64 6f 20 62 79 20 | 69 74 73 65 6c 66 20 28 |o do by |itself (|
|00002e20| 69 66 20 69 74 20 77 61 | 6e 74 73 20 74 6f 29 2e |if it wa|nts to).|
|00002e30| 20 20 54 68 65 20 6f 72 | 69 67 69 6e 61 6c 20 28 | The or|iginal (|
|00002e40| 6f 6c 64 29 20 74 72 61 | 70 0d 09 20 2a 09 61 64 |old) tra|p.. *.ad|
|00002e50| 64 72 65 73 73 20 69 73 | 20 73 74 6f 72 65 64 20 |dress is| stored |
|00002e60| 69 6e 20 74 68 65 20 6f | 6c 64 54 72 61 70 20 66 |in the o|ldTrap f|
|00002e70| 69 65 6c 64 20 69 6e 20 | 74 68 65 20 73 68 61 72 |ield in |the shar|
|00002e80| 65 64 20 64 61 74 61 20 | 73 74 72 75 63 74 75 72 |ed data |structur|
|00002e90| 65 2e 0d 09 20 2a 09 0d | 09 20 2a 09 4e 6f 77 20 |e... *..|. *.Now |
|00002ea0| 77 65 20 61 63 74 75 61 | 6c 6c 79 20 70 61 74 63 |we actua|lly patc|
|00002eb0| 68 20 74 68 65 20 74 72 | 61 70 2e 20 20 57 65 27 |h the tr|ap. We'|
|00002ec0| 76 65 20 77 61 69 74 65 | 64 20 75 6e 74 69 6c 20 |ve waite|d until |
|00002ed0| 6e 6f 77 20 74 6f 20 64 | 65 74 61 63 68 20 61 6e |now to d|etach an|
|00002ee0| 64 0d 09 20 2a 09 6c 6f | 63 6b 20 74 68 65 20 74 |d.. *.lo|ck the t|
|00002ef0| 61 73 6b 20 28 70 61 74 | 63 68 29 20 63 6f 64 65 |ask (pat|ch) code|
|00002f00| 20 62 65 63 61 75 73 65 | 20 4d 75 6e 67 65 72 20 | because| Munger |
|00002f10| 65 78 70 65 63 74 73 20 | 61 20 6d 6f 76 61 62 6c |expects |a movabl|
|00002f20| 65 2f 72 65 73 69 7a 65 | 61 62 6c 65 0d 09 20 2a |e/resize|able.. *|
|00002f30| 09 48 61 6e 64 6c 65 2e | 20 28 41 63 74 75 61 6c |.Handle.| (Actual|
|00002f40| 6c 79 2c 20 74 68 69 73 | 20 69 73 20 6a 75 73 74 |ly, this| is just|
|00002f50| 20 66 6f 72 20 66 6f 72 | 6d 2e 20 53 69 6e 63 65 | for for|m. Since|
|00002f60| 20 77 65 20 72 65 70 6c | 61 63 65 64 20 61 20 70 | we repl|aced a p|
|00002f70| 61 74 74 65 72 6e 0d 09 | 20 2a 09 77 69 74 68 20 |attern..| *.with |
|00002f80| 73 6f 6d 65 74 68 69 6e | 67 20 74 68 65 20 73 61 |somethin|g the sa|
|00002f90| 6d 65 20 73 69 7a 65 2c | 20 74 68 65 72 65 20 77 |me size,| there w|
|00002fa0| 61 73 20 6e 6f 20 6e 65 | 65 64 20 74 6f 20 72 65 |as no ne|ed to re|
|00002fb0| 73 69 7a 65 20 6f 72 20 | 6d 6f 76 65 20 74 68 65 |size or |move the|
|00002fc0| 0d 09 20 2a 09 6d 65 6d | 6f 72 79 20 62 6c 6f 63 |.. *.mem|ory bloc|
|00002fd0| 6b 2c 20 73 6f 20 74 68 | 65 20 6c 6f 63 6b 65 64 |k, so th|e locked|
|00002fe0| 2f 75 6e 6c 6f 63 6b 65 | 64 20 73 74 61 74 75 73 |/unlocke|d status|
|00002ff0| 20 77 61 73 6e 27 74 20 | 74 68 61 74 20 69 6d 70 | wasn't |that imp|
|00003000| 6f 72 74 61 6e 74 2e 29 | 0d 09 20 2a 2f 0d 09 09 |ortant.)|.. */...|
|00003010| 69 66 20 28 20 73 74 69 | 6c 6c 4f 4b 20 26 26 20 |if ( sti|llOK && |
|00003020| 69 6e 73 74 61 6c 6c 50 | 61 74 63 68 20 29 0d 09 |installP|atch )..|
|00003030| 09 7b 0d 09 09 09 44 65 | 74 61 63 68 52 65 73 6f |.{....De|tachReso|
|00003040| 75 72 63 65 28 20 6d 79 | 54 61 73 6b 20 29 3b 0d |urce( my|Task );.|
|00003050| 09 09 09 48 4c 6f 63 6b | 28 20 6d 79 54 61 73 6b |...HLock|( myTask|
|00003060| 20 29 3b 0d 09 09 0d 09 | 09 09 6d 79 54 61 73 6b | );.....|..myTask|
|00003070| 41 64 64 72 20 3d 20 28 | 55 6e 69 76 65 72 73 61 |Addr = (|Universa|
|00003080| 6c 50 72 6f 63 50 74 72 | 29 28 53 74 72 69 70 41 |lProcPtr|)(StripA|
|00003090| 64 64 72 65 73 73 28 20 | 28 50 74 72 29 28 2a 6d |ddress( |(Ptr)(*m|
|000030a0| 79 54 61 73 6b 29 20 29 | 20 29 3b 0d 09 09 09 4e |yTask) )| );....N|
|000030b0| 53 65 74 54 72 61 70 41 | 64 64 72 65 73 73 28 20 |SetTrapA|ddress( |
|000030c0| 6d 79 54 61 73 6b 41 64 | 64 72 2c 20 6b 54 72 61 |myTaskAd|dr, kTra|
|000030d0| 70 54 6f 50 61 74 63 68 | 2c 20 54 6f 6f 6c 54 72 |pToPatch|, ToolTr|
|000030e0| 61 70 20 29 3b 0d 09 09 | 09 0d 09 09 09 6d 79 44 |ap );...|.....myD|
|000030f0| 61 74 61 2d 3e 70 61 74 | 63 68 65 64 20 3d 20 74 |ata->pat|ched = t|
|00003100| 72 75 65 3b 0d 09 09 7d | 0d 09 09 65 6c 73 65 0d |rue;...}|...else.|
|00003110| 09 09 7b 0d 09 09 09 6d | 79 44 61 74 61 2d 3e 70 |..{....m|yData->p|
|00003120| 61 74 63 68 65 64 20 3d | 20 66 61 6c 73 65 3b 0d |atched =| false;.|
|00003130| 09 09 7d 0d 09 0d 09 2f | 2a 09 53 74 6f 72 65 20 |..}..../|*.Store |
|00003140| 74 68 65 20 61 64 64 72 | 65 73 73 20 6f 66 20 6f |the addr|ess of o|
|00003150| 75 72 20 73 68 61 72 65 | 64 20 64 61 74 61 20 73 |ur share|d data s|
|00003160| 74 72 75 63 74 75 72 65 | 20 69 6e 20 61 20 72 65 |tructure| in a re|
|00003170| 73 6f 75 72 63 65 20 74 | 68 61 74 0d 09 20 2a 09 |source t|hat.. *.|
|00003180| 63 61 6e 20 62 65 20 61 | 63 63 65 73 73 65 64 20 |can be a|ccessed |
|00003190| 62 79 20 6f 75 72 20 63 | 6f 6e 74 72 6f 6c 20 70 |by our c|ontrol p|
|000031a0| 61 6e 65 6c 2e 20 20 54 | 68 61 74 20 77 61 79 2c |anel. T|hat way,|
|000031b0| 20 74 68 65 20 63 6f 6e | 74 72 6f 6c 20 70 61 6e | the con|trol pan|
|000031c0| 65 6c 20 0d 09 20 2a 09 | 63 61 6e 20 75 73 65 20 |el .. *.|can use |
|000031d0| 61 6e 64 20 63 68 61 6e | 67 65 20 6f 75 72 20 73 |and chan|ge our s|
|000031e0| 68 61 72 65 64 20 64 61 | 74 61 2e 0d 09 20 2a 2f |hared da|ta... */|
|000031f0| 0d 09 09 69 66 20 28 20 | 73 74 69 6c 6c 4f 4b 20 |...if ( |stillOK |
|00003200| 29 0d 09 09 7b 0d 09 09 | 09 61 64 64 72 48 61 6e |)...{...|.addrHan|
|00003210| 64 6c 65 20 3d 20 28 6d | 65 6d 41 64 64 72 48 64 |dle = (m|emAddrHd|
|00003220| 6c 29 47 65 74 31 52 65 | 73 6f 75 72 63 65 28 20 |l)Get1Re|source( |
|00003230| 6b 4d 65 6d 41 64 64 72 | 54 79 70 65 2c 20 6b 4d |kMemAddr|Type, kM|
|00003240| 65 6d 41 64 64 72 49 44 | 20 29 3b 0d 09 09 09 69 |emAddrID| );....i|
|00003250| 66 20 28 20 61 64 64 72 | 48 61 6e 64 6c 65 20 29 |f ( addr|Handle )|
|00003260| 09 2f 2a 20 67 6f 74 20 | 74 68 65 20 72 65 73 6f |./* got |the reso|
|00003270| 75 72 63 65 20 2a 2f 0d | 09 09 09 7b 0d 09 09 09 |urce */.|...{....|
|00003280| 09 28 2a 61 64 64 72 48 | 61 6e 64 6c 65 29 2d 3e |.(*addrH|andle)->|
|00003290| 74 68 65 41 64 64 72 20 | 3d 20 72 65 70 6c 61 63 |theAddr |= replac|
|000032a0| 65 57 69 74 68 3b 09 2f | 2a 20 73 74 6f 72 65 20 |eWith;./|* store |
|000032b0| 76 61 6c 75 65 20 6f 66 | 20 6d 79 44 61 74 61 20 |value of| myData |
|000032c0| 2a 2f 0d 09 09 09 09 43 | 68 61 6e 67 65 64 52 65 |*/.....C|hangedRe|
|000032d0| 73 6f 75 72 63 65 28 20 | 28 48 61 6e 64 6c 65 29 |source( |(Handle)|
|000032e0| 61 64 64 72 48 61 6e 64 | 6c 65 20 29 3b 0d 09 09 |addrHand|le );...|
|000032f0| 09 09 57 72 69 74 65 52 | 65 73 6f 75 72 63 65 28 |..WriteR|esource(|
|00003300| 20 28 48 61 6e 64 6c 65 | 29 61 64 64 72 48 61 6e | (Handle|)addrHan|
|00003310| 64 6c 65 20 29 3b 09 2f | 2a 20 77 72 69 74 65 20 |dle );./|* write |
|00003320| 72 73 72 63 20 62 61 63 | 6b 20 74 6f 20 66 69 6c |rsrc bac|k to fil|
|00003330| 65 20 2a 2f 0d 09 09 09 | 7d 0d 09 09 09 65 6c 73 |e */....|}....els|
|00003340| 65 09 2f 2a 20 63 72 65 | 61 74 65 20 61 20 6e 65 |e./* cre|ate a ne|
|00003350| 77 20 72 65 73 6f 75 72 | 63 65 20 2a 2f 0d 09 09 |w resour|ce */...|
|00003360| 09 7b 0d 09 09 09 09 61 | 64 64 72 48 61 6e 64 6c |.{.....a|ddrHandl|
|00003370| 65 20 3d 20 28 6d 65 6d | 41 64 64 72 48 64 6c 29 |e = (mem|AddrHdl)|
|00003380| 4e 65 77 48 61 6e 64 6c | 65 43 6c 65 61 72 28 20 |NewHandl|eClear( |
|00003390| 73 69 7a 65 6f 66 28 20 | 6c 6f 6e 67 20 29 20 29 |sizeof( |long ) )|
|000033a0| 3b 0d 09 09 09 09 69 66 | 20 28 20 61 64 64 72 48 |;.....if| ( addrH|
|000033b0| 61 6e 64 6c 65 20 29 0d | 09 09 09 09 7b 0d 09 09 |andle ).|....{...|
|000033c0| 09 09 09 28 2a 61 64 64 | 72 48 61 6e 64 6c 65 29 |...(*add|rHandle)|
|000033d0| 2d 3e 74 68 65 41 64 64 | 72 20 3d 20 72 65 70 6c |->theAdd|r = repl|
|000033e0| 61 63 65 57 69 74 68 3b | 09 2f 2a 20 73 74 6f 72 |aceWith;|./* stor|
|000033f0| 65 20 76 61 6c 75 65 20 | 6f 66 20 6d 79 44 61 74 |e value |of myDat|
|00003400| 61 20 2a 2f 0d 09 09 09 | 09 09 41 64 64 52 65 73 |a */....|..AddRes|
|00003410| 6f 75 72 63 65 28 20 28 | 48 61 6e 64 6c 65 29 61 |ource( (|Handle)a|
|00003420| 64 64 72 48 61 6e 64 6c | 65 2c 20 6b 4d 65 6d 41 |ddrHandl|e, kMemA|
|00003430| 64 64 72 54 79 70 65 2c | 20 6b 4d 65 6d 41 64 64 |ddrType,| kMemAdd|
|00003440| 72 49 44 2c 0d 09 09 09 | 09 09 09 22 5c 70 53 68 |rID,....|..."\pSh|
|00003450| 61 72 65 64 20 4d 65 6d | 6f 72 79 20 41 64 64 72 |ared Mem|ory Addr|
|00003460| 22 20 29 3b 09 09 2f 2a | 20 61 64 64 20 61 20 72 |" );../*| add a r|
|00003470| 73 72 63 20 74 6f 20 66 | 69 6c 65 20 2a 2f 0d 09 |src to f|ile */..|
|00003480| 09 09 09 09 57 72 69 74 | 65 52 65 73 6f 75 72 63 |....Writ|eResourc|
|00003490| 65 28 20 28 48 61 6e 64 | 6c 65 29 61 64 64 72 48 |e( (Hand|le)addrH|
|000034a0| 61 6e 64 6c 65 20 29 3b | 20 2f 2a 20 77 72 69 74 |andle );| /* writ|
|000034b0| 65 20 69 74 20 6f 75 74 | 20 74 6f 20 74 68 65 20 |e it out| to the |
|000034c0| 66 69 6c 65 20 2a 2f 0d | 09 09 09 09 7d 0d 09 09 |file */.|....}...|
|000034d0| 09 09 65 6c 73 65 0d 09 | 09 09 09 7b 0d 09 09 09 |..else..|...{....|
|000034e0| 09 09 73 74 69 6c 6c 4f | 4b 20 3d 20 66 61 6c 73 |..stillO|K = fals|
|000034f0| 65 3b 09 2f 2a 20 75 6e | 61 62 6c 65 20 74 6f 20 |e;./* un|able to |
|00003500| 61 6c 6c 6f 63 61 74 65 | 20 6d 65 6d 6f 72 79 20 |allocate| memory |
|00003510| 66 6f 72 20 6e 65 77 20 | 72 73 72 63 20 2a 2f 0d |for new |rsrc */.|
|00003520| 09 09 09 09 7d 0d 09 09 | 09 7d 0d 09 09 7d 0d 09 |....}...|.}...}..|
|00003530| 09 0d 09 2f 2a 09 49 66 | 20 74 68 65 72 65 20 77 |.../*.If| there w|
|00003540| 61 73 20 61 20 70 72 6f | 62 6c 65 6d 20 61 6e 64 |as a pro|blem and|
|00003550| 20 69 74 20 6c 6f 6f 6b | 73 20 6c 69 6b 65 20 74 | it look|s like t|
|00003560| 68 65 20 74 72 61 70 20 | 77 61 73 20 73 74 69 6c |he trap |was stil|
|00003570| 6c 20 70 61 74 63 68 65 | 64 2c 0d 09 20 2a 09 67 |l patche|d,.. *.g|
|00003580| 6f 20 61 68 65 61 64 20 | 61 6e 64 20 72 65 6d 6f |o ahead |and remo|
|00003590| 76 65 20 74 68 65 20 70 | 61 74 63 68 20 28 72 65 |ve the p|atch (re|
|000035a0| 73 74 6f 72 69 6e 67 20 | 74 68 65 20 6f 72 69 67 |storing |the orig|
|000035b0| 69 6e 61 6c 20 74 72 61 | 70 20 61 64 64 72 65 73 |inal tra|p addres|
|000035c0| 73 29 2e 0d 09 20 2a 2f | 0d 09 20 0d 09 20 09 69 |s)... */|.. .. .i|
|000035d0| 66 20 28 20 28 20 21 73 | 74 69 6c 6c 4f 4b 20 29 |f ( ( !s|tillOK )|
|000035e0| 20 26 26 20 73 68 61 72 | 65 64 44 61 74 61 4f 4b | && shar|edDataOK|
|000035f0| 20 29 0d 09 20 09 7b 0d | 09 20 09 09 69 66 20 28 | ).. .{.|. ..if (|
|00003600| 20 6d 79 54 61 73 6b 20 | 29 09 2f 2a 20 69 66 20 | myTask |)./* if |
|00003610| 74 68 65 20 74 61 73 6b | 20 63 6f 64 65 20 77 61 |the task| code wa|
|00003620| 73 20 6c 6f 61 64 65 64 | 2c 20 69 74 20 77 61 73 |s loaded|, it was|
|00003630| 20 70 72 6f 62 61 62 6c | 79 20 69 6e 73 74 61 6c | probabl|y instal|
|00003640| 6c 65 64 20 2a 2f 0d 09 | 20 09 09 7b 0d 09 20 09 |led */..| ..{.. .|
|00003650| 09 09 4e 53 65 74 54 72 | 61 70 41 64 64 72 65 73 |..NSetTr|apAddres|
|00003660| 73 28 20 6d 79 44 61 74 | 61 2d 3e 6f 6c 64 54 72 |s( myDat|a->oldTr|
|00003670| 61 70 2c 20 6b 54 72 61 | 70 54 6f 50 61 74 63 68 |ap, kTra|pToPatch|
|00003680| 2c 20 54 6f 6f 6c 54 72 | 61 70 20 29 3b 0d 09 20 |, ToolTr|ap );.. |
|00003690| 09 09 09 44 69 73 70 6f | 73 65 48 61 6e 64 6c 65 |...Dispo|seHandle|
|000036a0| 28 20 6d 79 54 61 73 6b | 20 29 3b 0d 09 20 09 09 |( myTask| );.. ..|
|000036b0| 09 6d 79 54 61 73 6b 20 | 3d 20 4e 55 4c 4c 3b 0d |.myTask |= NULL;.|
|000036c0| 09 20 09 09 09 0d 09 20 | 09 09 09 6d 79 44 61 74 |. ..... |...myDat|
|000036d0| 61 2d 3e 70 61 74 63 68 | 65 64 20 3d 20 66 61 6c |a->patch|ed = fal|
|000036e0| 73 65 3b 0d 09 20 09 09 | 7d 0d 09 20 09 7d 0d 09 |se;.. ..|}.. .}..|
|000036f0| 0d 09 2f 2a 09 53 68 6f | 77 20 6f 75 72 20 69 63 |../*.Sho|w our ic|
|00003700| 6f 6e 20 69 6e 20 74 68 | 65 20 73 74 61 72 74 75 |on in th|e startu|
|00003710| 70 20 69 63 6f 6e 20 70 | 61 72 61 64 65 2e 20 20 |p icon p|arade. |
|00003720| 49 66 20 74 68 65 72 65 | 20 77 61 73 20 61 20 70 |If there| was a p|
|00003730| 72 6f 62 6c 65 6d 20 73 | 6f 6d 65 77 68 65 72 65 |roblem s|omewhere|
|00003740| 0d 09 20 2a 09 61 6c 6f | 6e 67 20 74 68 65 20 77 |.. *.alo|ng the w|
|00003750| 61 79 2c 20 77 65 27 6c | 6c 20 73 68 6f 77 20 74 |ay, we'l|l show t|
|00003760| 68 65 20 69 63 6f 6e 20 | 65 76 65 6e 20 69 66 20 |he icon |even if |
|00003770| 74 68 65 20 63 6f 6e 74 | 72 6f 6c 20 70 61 6e 65 |the cont|rol pane|
|00003780| 6c 20 73 61 79 73 20 6e | 6f 74 20 74 6f 2e 0d 09 |l says n|ot to...|
|00003790| 20 2a 2f 0d 0d 09 09 69 | 66 20 28 20 73 68 6f 77 | */....i|f ( show|
|000037a0| 53 74 61 72 74 75 70 49 | 63 6f 6e 20 7c 7c 20 28 |StartupI|con || (|
|000037b0| 20 21 73 74 69 6c 6c 4f | 4b 20 29 20 29 0d 09 09 | !stillO|K ) )...|
|000037c0| 7b 0d 09 09 09 69 66 20 | 28 20 73 74 69 6c 6c 4f |{....if |( stillO|
|000037d0| 4b 20 29 0d 09 09 09 09 | 69 66 20 28 20 69 6e 73 |K ).....|if ( ins|
|000037e0| 74 61 6c 6c 50 61 74 63 | 68 20 29 0d 09 09 09 09 |tallPatc|h ).....|
|000037f0| 09 53 68 6f 77 49 63 6f | 6e 46 61 6d 69 6c 79 28 |.ShowIco|nFamily(|
|00003800| 20 6b 49 63 6f 6e 46 61 | 6d 69 6c 79 49 44 20 29 | kIconFa|milyID )|
|00003810| 3b 0d 09 09 09 09 65 6c | 73 65 0d 09 09 09 09 09 |;.....el|se......|
|00003820| 53 68 6f 77 49 63 6f 6e | 46 61 6d 69 6c 79 28 20 |ShowIcon|Family( |
|00003830| 6b 4e 6f 50 61 74 63 68 | 49 63 6f 6e 49 44 20 29 |kNoPatch|IconID )|
|00003840| 3b 0d 09 09 09 65 6c 73 | 65 0d 09 09 09 09 53 68 |;....els|e.....Sh|
|00003850| 6f 77 49 63 6f 6e 46 61 | 6d 69 6c 79 28 20 6b 58 |owIconFa|mily( kX|
|00003860| 49 63 6f 6e 49 44 20 29 | 3b 0d 09 09 7d 0d 0d 09 |IconID )|;...}...|
|00003870| 2f 2a 09 52 65 73 74 6f | 72 65 20 74 68 65 20 6d |/*.Resto|re the m|
|00003880| 65 6d 6f 72 79 20 7a 6f | 6e 65 20 74 6f 20 77 68 |emory zo|ne to wh|
|00003890| 61 74 20 69 74 20 77 61 | 73 20 77 68 65 6e 20 77 |at it wa|s when w|
|000038a0| 65 20 62 65 67 61 6e 2e | 20 2a 2f 0d 09 0d 09 09 |e began.| */.....|
|000038b0| 53 65 74 5a 6f 6e 65 28 | 20 73 61 76 65 5a 6f 6e |SetZone(| saveZon|
|000038c0| 65 20 29 3b 0d 09 0d 09 | 2f 2a 09 4d 61 72 6b 20 |e );....|/*.Mark |
|000038d0| 74 68 65 20 64 61 74 61 | 20 73 74 72 75 63 74 75 |the data| structu|
|000038e0| 72 65 20 61 73 20 6e 6f | 20 6c 6f 6e 67 65 72 20 |re as no| longer |
|000038f0| 69 6e 20 75 73 65 20 2d | 20 77 65 27 72 65 20 74 |in use -| we're t|
|00003900| 68 72 6f 75 67 68 20 77 | 69 74 68 20 69 74 2e 20 |hrough w|ith it. |
|00003910| 2a 2f 0d 09 0d 09 09 69 | 66 20 28 20 73 68 61 72 |*/.....i|f ( shar|
|00003920| 65 64 44 61 74 61 4f 4b | 20 29 0d 09 09 09 6d 79 |edDataOK| )....my|
|00003930| 44 61 74 61 2d 3e 69 6e | 55 73 65 20 3d 20 66 61 |Data->in|Use = fa|
|00003940| 6c 73 65 3b 0d 7d 0d 0d | 23 69 6e 63 6c 75 64 65 |lse;.}..|#include|
|00003950| 20 22 53 68 6f 77 49 63 | 6f 6e 46 61 6d 69 6c 79 | "ShowIc|onFamily|
|00003960| 2e 63 22 0d 00 00 00 00 | 00 00 00 00 00 00 00 00 |.c".....|........|
|00003970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003980| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00003990| 00 00 00 00 00 00 03 08 | 05 00 00 00 02 af 00 00 |........|........|
|000039a0| 01 18 05 00 00 00 05 15 | 00 00 04 76 05 00 00 00 |........|...v....|
|000039b0| 0d 4d 79 45 78 74 65 6e | 73 69 6f 6e 2e 63 02 00 |.MyExten|sion.c..|
|000039c0| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|000039d0| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|000039e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000039f0| 00 00 aa da 77 98 00 00 | 00 00 00 00 01 7e 00 00 |....w...|.....~..|
|00003a00| 17 c4 00 00 01 ba 05 00 | 00 00 18 bb 00 00 01 ec |........|........|
|00003a10| 05 00 00 00 19 9d 00 00 | 02 ec 05 00 00 00 19 7b |........|.......{|
|00003a20| 00 00 02 ec 05 00 00 00 | 19 7b 00 00 02 ec 05 00 |........|.{......|
|00003a30| 00 00 19 7b 00 00 02 ec | 05 00 00 00 19 7b 00 00 |...{....|.....{..|
|00003a40| 02 ec 05 00 00 00 19 7b | 00 00 02 ec 05 00 00 00 |.......{|........|
|00003a50| 19 7b 00 00 02 ec 05 00 | 00 00 19 7b 00 00 02 ec |.{......|...{....|
|00003a60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a80| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00003a90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003aa0| 00 00 00 00 00 00 00 06 | 00 04 00 2a 00 03 01 dd |........|...*....|
|00003ab0| 02 7d 00 3a 00 12 01 d8 | 02 3e aa b9 00 03 00 00 |.}.:....|.>......|
|00003ac0| 13 46 00 00 13 46 00 00 | 00 00 00 00 00 00 01 00 |.F...F..|........|
|00003ad0| 00 00 01 4c 00 00 00 4c | 00 00 00 32 00 a6 c3 f4 |...L...L|...2....|
|00003ae0| 10 2a 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |.*.....2|..MPSR..|
|00003af0| 00 0a 03 ed ff ff 00 00 | 00 00 00 a6 c5 2c 00 00 |........|.....,..|
+--------+-------------------------+-------------------------+--------+--------+