> Lawrence Loadman wrote: > > Hi all, > > Just picked up a copy of map basic 6.0. Seems I will have to > upgrade to mapinfo 6 also - is this true? > I just keep getting a mssage saying that mapinfo 6 can run this > when i try to run a program. Yep, that's true. However, as long as you don't use any 6.0 features, all you have to do to get your mbx to run in an older version is edit the very top line of the mbx and replace the 600 with 550 or 500 or whatever your MI version is. You need to edit this with a hex editor, because a text editor will make a mess of the binary contents of an mbx. If you want to take a trip into the WayBack machine, you can do this with that venerable and most spartan microsoft software you will porbably ever see. It's called debug.exe (it's in c:\Windows\Command\ on Windows machines). This is the tool that Real Programmers use to build Windows programs (muhaha!) Anyway, picture yourself back in 1988. Open a DOS window and change directories to where your mbx is. Hmmm... okay, I see we've lost a few already. The old DOS command to change directories is "cd" followed by a space and the name of the directory on the same line. Then type in "debug" followed by a space and the name of your mbx. Now your prompt turns into a simple dash. This "command line" stuff is what we used before they invented the user interface. You could almost see a Zen koan in something so simple and yet at the same time so opaque. This is a super-powerful tool too, so don't just press buttons willy-nilly! From here you could edit ANYTHING anywhere in your computer or on your disk. You can even write working assembler code with this. Welcome to the Tao of Geek! Anyway, I digress... Try it with NViews.mbx in c:\Program Files\MapInfo\Professional\TOOLS\ At the DOS prompt, type Debug Nviews.mbx At the debug dash prompt type "d" (for 'Dump') This "dumps" the hexadecimal and ASCII equivalent of your mbx to the screen. Notice over on the right you can see the 600 version number. To edit is, type e 010E and press enter. (e stands for edit, and the position to edit is offset 10e, where the &h36 is or '6' in ASCII.) Now you see 36. Enter the hexadecimal number that you want in place of 36. The character '5' is 35. Press a space to edit the next byte, which is 30. Change it to 35. Press Enter to exit edit mode. Now the dump the data again to see your changes. The command is d 100 (dump the next paragraph from offset &H100) See? Now the version number is 550, or MI version 5.5. Now save the file back to disk with the 'w' command (Write). then to quit, enter 'q'. If you ever want to see debug's help, enter '?' at the dash. The attachment is plain text and shows a debug session. - Bill Thoen ------------------------------------------------------------ GISnet, 1401 Walnut St., Suite C, Boulder, CO 80302 tel: 303-786-9961, fax: 303-443-4856 mailto:[EMAIL PROTECTED], http://www.ctmap.com/gisnet ------------------------------------------------------------
C:\WINDOWS>cd "Program Files"\MapInfo\Professional\TOOLS C:\Program Files\MapInfo\Professional\TOOLS>debug nviews.mbx -d 106E:0100 21 41 70 70 0A 21 56 65-72 73 69 6F 6E 20 36 30 !App.!Version 60 106E:0110 30 0A 21 43 68 61 72 73-65 74 20 57 69 6E 64 6F 0.!Charset Windo 106E:0120 77 73 4C 61 74 69 6E 31-0A 00 00 00 00 00 00 00 wsLatin1........ 106E:0130 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 106E:0140 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 106E:0150 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 106E:0160 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 106E:0170 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ -e 10E 106E:010E 36.35 30.35 -d 100 106E:0100 21 41 70 70 0A 21 56 65-72 73 69 6F 6E 20 35 35 !App.!Version 55 106E:0110 30 0A 21 43 68 61 72 73-65 74 20 57 69 6E 64 6F 0.!Charset Windo 106E:0120 77 73 4C 61 74 69 6E 31-0A 00 00 00 00 00 00 00 wsLatin1........ 106E:0130 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 106E:0140 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 106E:0150 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 106E:0160 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 106E:0170 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ -w Writing 03CE1 bytes -q C:\Program Files\MapInfo\Professional\TOOLS>
