92th byte
You may have had such an experience: run a 32-bit program in DOS mode, and an error message will appear on the screen: "This Program Cannot Be Run in dos mode.", However, think about where these characters come from? Is the system built-in or the program itself comes? Let us do an experiment to confirm: Use the system "Notepad" program to open a 32-bit application (if the program is large, please open with "Word board" or "Word", the result is in each opened The program contains such a line of characters "this Program Cannot Be Run in Dos Mode.", You can get this conclusion: All 32-bit applications contain special characters (if there are different, purely accidental). More importantly, they are fixed within each program, such as "CONNOT" "C" characters occupying the 92th bytes in all programs, and other characters can be pushed in turn. So what is the use of these? I will show you a unique charm in the application of this skill in programming. When an application is installed by the user, all the initiative is transferred from the programmer to the user's hand, but in order to more express the intelligence of the program, we need a mechanism to determine the frequency or number of times the user uses this software (just like Trial software, limited edition software and virus often do), in general we are doing this: When the program is running for the first time, check whether there is a markup run in the system registry, if there is change the tag ( For example, an increase in), if it is not judged to run the first time. But now a lot of registry monitor and registry analyzer can detect these changes, so this is not a safe means. Other common processes are: there are some confusing files (such as dynamic connection libraries) when packaging programs, and then store the information in it, which is very good, but if the user misses (including intentional) or Changes (such as changing names) These files will also cause great trouble. Therefore, I usually do not use the above method, but use the 92th byte to be an article. We know: Some of the most basic applications in each Windows system - "Notepad", "WordPad", "Draw", "Registry Editor", "Volume Adjustment", "Input Method ", And these applications are 32-bit applications, so if we use these programs as the" media "of our storage information, then don't have a" no loss "(in the programmer's dictionary as if there is no word)!" How do you do it? In fact, it is very simple: first search the system in the program, such as: c: / windows / system (reader should know how to use the getSystemDirectory function!), Then find a common PC must-have program in this directory ( Don't find those procedures and system programs that are running, such as resource manager, etc.