Microsoft Windows 2000 Application Compatibility

zhaozj2021-02-08  261

November 1999 Summary: Discussion Make the application in Microsoft (R) Windows (R) 2000 in less than compatibility. Some of these parts: Introduction to setting and installation issues Windows 2000 compatibility issues Application Stability Issues The difference between the Windows platform has been introduced for a few months, that is, find out the application in the Windows 2000 operating system. Program compatibility problem. What I really want to discuss here is that the application is incompatible with Windows 2000. No one truly cares about the reason why the application is compatible. I have been working with the Windows 2000 test group, and they have tested hundreds of applications in the past few months. We have discussed the application for normal or abnormal operations on Windows 2000. The issues we found can be classified as four categories:

Applications that cannot be installed on Windows 2000. This is the biggest problem we have found so far. Applications are not particularly installed on Windows 2000; the problem is that these applications do not allow themselves to install them into this new version of the operating system. We do what the operating system is made and affect the application running. Whenever the Microsoft Windows NT (R) development group faces the choice, it is to make the system more stable or more powerful, or to ensure the compatibility of the application, they always sacrificed the latter and taking stability. A main goal of Windows 2000 development work is to make the system more stable as a platform. Unfortunately, some changes that must be performed in order to achieve this, the application has caused the application to be incompatible on Windows 2000. Changes we have made to the operating system do not affect the compatibility of the application, but it will interrupt some applications. Applications that depend on the Windows 9x platform. When we develop Windows 2000, we take into account many Windows 9x users to upgrade, so the Windows 9x applications are tested, and they are ported to Windows 2000. We find that some applications are too dependent on Windows 9x. Setting and installation issues We have to discuss the first type of problem is setting and installation issues; the most common problem is undoubtedly unable to install an application on Windows 2000. In fact, a most common reason that cannot be installed in the application is that Windows 2000 is a version 5.0 version of Windows NT. Test group tests the application in a variety of ways. They install the application in Windows 2000-based systems, or install the application in Windows NT 4.0 or Windows 95, and then upgrade the system to Windows 2000 for testing. After we take a machine that does not have any operating system, we install Windows 2000, then install the application, compared with the above upgrades, the former has much less compatibility. Version Check that the application cannot be installed on Windows 2000, which cannot handle the version number correctly. We have found that many applications do the operations made by the following sample code. They call GetversionEx during operation, then write a "if" statement, the statement specifies: "If the system is version 3, because there is no new shell, I can't run normally, so I may not be installed. If the system is version 4, I can install and set up. " The problem is that if the system is version 5, this "if" statement is not below. Because the version number is 5.0, these applications cannot be installed due to their own reasons, so we found a series of such problems. IF (Osvi.dwmajorversion == 3)

{

/ / Please do this

}

Else IF (Osvi.dwmajorversion == 4) {

// Please do that

}

The test group continues to look for the solution and blinds many of these applications. In early compilation, we can take steps to change the return value of GetVersionex. We can change its return value, deceive the app, tell it that version number is 4.0, and then the program will continue to install and run normally. But some application ideas are not installed on Windows 2000. For viral scanners or other low-level utilities, it is understood to be understood by an operating system. However, these applications displays the message to illustrate this. What we look for is those that cannot be installed or unable to run, and there is no application that does not know the user. How can I correctly check the version number? In Windows 2000 we will add a new API: VerifyVersionInfo, this API will check the primary version number, secondary version, and service pack in turn. If there is a new version of the operating system, the application can still install and run on it. There are still many options and ways to apply VerifyVersionInfo, but if you just check "If the operating system is upgraded, how do you handle this, you only need to call these three signs, then check the primary version number, Version number and service pack. You can define the following statement: "My program needs to run on Windows NT 4.0, SP2", then ask VerifyVersionInfo "whether I am running this standard?", The API will return true value or false value. VerifyVersionInfo (& OSVI,

VER_MAJORVERSION |

VER_MINORVERSION |

Ver_ServicePackmajor,

Dwlconditionmask;

In this way, check the version, you can comply with Windows 2000 applications, and its basic idea is "as long as there is a new version of the operating system, it is necessary to install on the new version." One problem with VerifyVersionInfo is currently the current API only Can run on the Windows 2000 platform. In order to check the version of the old platforms such as Windows 95, you must apply GetversionEx. You can find that its function is basically the same as VerifyVersionInfo: check the primary version number, secondary version number, and service pack in turn. Bool BiswindowsVersionok (DWORD DWMAJOR, DWORD DWMINOR, DWORD DWSPMAJOR)

{

OsversionInfo Osvi;

// Initialize the OsversionInfo structure

//

ZeromeMory (& OSVI, SIZEOF (OsversionInfo);

Osvi.dwosversionInfosize = SizeOf (OsversionInfo);

GetVersionex (OsversionInfo *) & OSVI);

// First, the main version

IF (Osvi.dwmajorversion> dwmajor)

Return True;

Else if (Osvi.dwmajorversion == dwmajor)

{

// Then, the second version

IF (Osvi.dwminorVersion> dwminor)

Return True;

Else if (Osvi.dwminorVersion == dwminor)

{

// Yes, it is best to check the service pack

IF (DWSPMAJOR && OSVI.DWPLATFORMID == Ver_Platform_WIN32_NT) {

HKEY HKEY;

DWORD DWCSDVERSION;

DWORD DWSIZE;

Bool fmeetssprequirement = false;

IF (REGOPENKEYEX (HKEY_LOCAL_MACHINE,

"System // CurrentControlset // Control // Windows", 0,

Key_Query_Value, & HKey) == Error_Success)

{

DWSIZE = SizeOf (dwcsdversion);

IF (RegQueryValueex (HKEY, "csdversion",

NULL, NULL, (UNSIGNED Char *) & DWCSDVERSION,

& dwsize) == Error_Success)

{

FmeetssPRequirement = (loword (dwcsdversion)> = dwspmajor);

}

RegcloseKey (HKEY);

}

Return fmeetssprequirement;

}

Return True;

}

}

Return False;

}

//

// This example applies to Windows 2000 and updated versions

//

Bool BiswindowsVersionok (DWORD DWMAJOR, DWORD DWMINOR, DWORD DWSPMAJOR)

{

OsversionInfoEx Osvi;

ZeromeMory (& OSVI, SIZEOF (OsversionInfoEx);

Osvi.dwosversionInFoSize = SizeOf (OsversionInfoEx);

Osvi.dwmajorversion = dwmajor;

Osvi.dwminorversion = dwminor;

Osvi.WServicePackmajor = dwspmajor;

// Set the condition mask.

VER_SET_CONDITION (DWLCONDITIONMASK, VER_MAJORVERSION, VER_GREATER_EQUAL);

VER_SET_CONDITION (DWLCONDITIONMASK, VER_MINORVERSION, VER_GREATER_EQUAL);

Ver_set_condition (dwlconditionmask, ver_servicepackmajor, ver_greater_equal);

// Execute the test.

Return VerifyVersionInfo (& OSVI,

VER_MAJORVERSION | VER_MINORVERSION

| Ver_ServicePackmajor, dwlconditionmask;

}

First, you need to check the primary version number. If the primary version number of the current operating system is higher than the required primary version number, no check is required, run down directly. If the primary version number is equal, check the second version in the same way. Finally check the service package number. When we get a version of the release, you can say "It doesn't matter, we don't care whether service pack 3, 4 or 5". If the primary version number or the secondary version number has increased, the system can also be handled. We find all applications to check the version information, find that they will check each component separately. They will say "Hey, the main version number is 5, I only ask 4, good. The second number is .0, very good, but service pack is 0, I need 3". Obviously, Windows 2000 has not launched SP3, so this method of checking version information is wrong. Check the following details when checking the version number of Windows NT: Checking the version number and service pack information. The first is to get the return value of getVersionex and check the "Szcsdversion" string. The actual service pack number is embedded in a certain location of the string. Analysis This string character is really cumbersome, and you must always keep in mind whether it has been localized, it is difficult to do. This is not the best way. If the system is running Windows NT 4.0, you only need to check the following registration key value, where there is a number of service package numbers. Extract this number and make a "equal" or "greater than" comparison: HCLM / System / CurrentControlSet / Control / Windows / CSDVERSION If you run Windows 2000 or higher, you can still use GetversionEx, but you need Transfer it to the OsversionInfoEx structure, not the OsVersionInfo structure being used. Considering the size of the operator member, Windows 2000 will treat it as a larger structure and give a new field (service package, main version, subset) as an integer used in comparison. If you still use VerifyVersionInfo, you will find this is the most convenient way. DLL version check In the case of checking the Windows version, we also discovered another question related to the version, that is, the user does not check the version of the DLL. Whether the DLL is Microsoft DLL in the system directory, or your own DLL, you must have a version check before copying it to the system. The purpose of the inspection is to prevent the old version of the DLL from being copied to the new version. Version information must be confirmed in the user's own DLL to check. It is important to do this, it can avoid a variety of trouble. Do not try to change the DLL in the system directory, do not consider upgrading the system DLL, or override the same DLL. The system DLL is a DLL submitted by Windows 2000 in a CD or a service package, located in the system directory. If you intend to prepare new Windows 2000 applications, you need to use Windows Installer, which can check the version of the DLL. As long as you explain that you need to place a particular DLL in a specific directory, you can find that Windows Installer is checked for you. You don't need to process this small piece of code. Dll Hell If the DLL version is not checked correctly, the result is no doubt that a DLL Hell will occur. I definitely not explain what DLL Hell is to explain to you, you must spend a lot of time on this. Because I originally participated in the development of CTL3D.dll, the same thing as familiar with my neighbors.

We spent a few years, trying to break through obstacles that affect the normal work of DLL, and we finally determine that application developers cannot keep backward compatibility. Everyone is working hard in this regard, this goal is great, but it can't be realized. In fact, the DLL cannot keep backward compatibility. The result is: If an application is to end properly, it must depend on a specific version of a DLL, and another application depends on another version of the DLL, because these two applications are in this share of components. (Ie, shared DLL) has a conflict, resulting in the same system that cannot be coemented in the same system. So far, we still think that for Windows applications, DLL sharing features is a very good and important part. We also think that DLL can provide you with the features of you or very valuable. The problem is if you do not test the version of the DLL, and the cross-care program will bring a lot of problems with the DLL global sharing. Parallel DLL In Windows 2000, we have begun to implement some content called parallel DLLs. We hope that your application has also begun to close to parallel versions. In Windows 2000, we have taken some preventive measures to reduce DLL Hell. The first thing we have to consider is to ensure that the system is in protected state, and maintain its integrity. Then we will discuss Windows file protection. Another thing we have to do is in parallel to implement components, and I hope that the application vendor will do this. We are targeting Microsoft components; as for your own components, we also recommend that you do this. We will use a parallel version of the component, and we also hope that you can use a parallel version of the component for your own partial shared components. Another job that the System Stability Windows NT Group is working hard is to ensure that the system maintains a long time. Microsoft allows all functions to Windows NT in the form of division service packages, which is a problem. Customers who have installed Windows NT and companies are very vigilant when selecting a service package, because these things are not just some problems. Usually it will make some corrections, then say "Hey, we add this feature here, add that function there", these things make the system unable to reach the expected stability. According to routine strategies, the service pack can only contain corrections to errors, and there is no other content. If we think that the operating system needs to add some important features and features, we will launch the .x version of Windows 2000. You will get such content similar to Windows NT 5.1, 5.2, and there are also three different versions of service packages for Windows NT. We will continue to work hard to maintain the integrity of each platform function, which even relate to QFE, error checking, and hot fix. The new version of the operating system will be issued each time with new features or new features. The last job we conducted in Microsoft is to ensure that what components have been released with the same product, we strongly recommend that you will follow. We are doing the most likely to reduce the number of components released in different products. If a particular component needs to work with another specific component, we will try to publish these two components together. For all these components that can be re-distributed, we will set out the released structure sequence. Parallel DLL If you need to change the components by global sharing components or DLLs to new parallel DLLs, you need to change some changes to the DLL. This change to DLL itself is necessary. You must declare: "The components I have designed will allow multiple versions to run at the same time." In order to make a component become a real parallel component, first need to rename the DLL, and change may exist in the OCX control, COM object All GUIDs. This renamed job can guarantee a new DLL running in parallel, which will no longer be global sharing.

After the DLL is renamed, the application installs it into the autonomous directory without being installed. In this way, the application developers can say: "I have fully tested a specific version of this DLL, and I also confirm that this DLL will not upgrade before I will test again." Just give your developer enough confidence: Anyone cannot use shared components to disturb your app, causing the system to crash and bring us back to DLL Hell. If you are using these components as a user, you can register a relative path in your own directory (instead of the system directory). This will load a local version falling somewhere in the system, not a global copy. We modify the loadLibrary function to ensure that if the application registers a component with a relative path, we always complete the load in a relative path, regardless of this component is in the system directory, or is running else. This makes it possible to ensure that you get the copy of the application to test the application. Isolated Applications We also modified the LoadLibrary code to support DLL redirection. This administrator can redirect the DLL load process to a certain location and load the DLL by the local directory. After this process, your DLL can be in an isolated state. Suppose someone of a large unit is to test whether they can use your app, they have another application, and then test whether the two work together. They found that the result is not, the administrator starts to find where the two applications are conflicted on which component has occurred. After finding this component, the administrator considers the perspective of employees using these two programs, extracts the DLL (or contains OCX to the object) and places it in the directory where the application is located. Then the administrator created a file called foo.exe, and then added .local. If you call LoadLibrary, LoadLibrary finds that there is a foo.exe.local file here, which will first load the file in the application directory without considering the application for the application for the LoadLibrary call itself. This approach helps people distinguish between multiple applications that require the same component, so that all of these applications are running in the same system. Windows file protection To ensure that the system's stability and platform reliability, the first step is to ensure that the system will not encounter any DLL HELL problem. We hope that no matter what happens, the system is still able to run, can boot, ie, users can have sufficient confidence in the stability of the system. With Windows File Protection (WFP), if the application tries to change a system file, Windows 2000 will restore it. For some features, the application will be installed and said: "Hey, I need this DLL new version ..." to implement a function, or at all this is a wrong application that does not correctly execute the version check function. Windows 2000 will check this and find that the file has been changed. If Windows 2000 found this is a system file, and declare "I don't allow this file", it will restore the file. If you want to upgrade files that have been locked by the system, you can only use several file replacement mechanisms issued by the Windows NT team: service pack, QFE or Hot FIX. They enable alternatives to system files, while other applications cannot be. For example, mfc42.dll is a file we locked. The DLL will not be upgraded through the language group, and only the Windows NT team can change this file in the system.

If the C programmer needs to upgrade their DLL (and assume that they want to upgrade before the next version of Windows NT released after Windows 2000), only the parallel component version feature can only be used. Most * .sys, *. Dll, *. Exe and * .ocx files and several font files are in the protection. There are still several compatibility issues. First, the anti-virus program must recognize and correctly handle the Windows file protection, and then make the application's backup and recovery; these files cannot be copied, backed up, and recovered. Because you don't have a file replacement mechanism supported by your system, if you do this, you will cancel the Windows file protection. In order to prevent such operations, we added a few APIs in the system. The first API of the WFP API is SfcgetNextProtacectedFile. A list of all protected or protected files can be obtained. You can reply to this API at an null value to get a list of protected files. Bool WinApi sfcgetnextprotectedFile

(In Handle rpchandle, in pprotected_file_data protfiledata);

//

// This feature will list protected files

//

Void ListProtectedFiles (HWND HWND)

{

HWND HWNDLIST;

Protected_file_data pfd;

Int iCount;

Char szfilename [260];

Ilen;

RECT RT;

HWndList = getWindow (hwnd, gw_child);

IF (hwndlist == null)

{

GetClientRect (hwnd, & rt);

// Create a "list" control for the first time

HWndList = CREATEWINDOW ("ListBox", NULL,

WS_CHILD | WS_VISIBLE | LBS_STANDARD | LBS_NOINTEGRALHEIGHT |

LBS_USETABSTOPS,

0, 20, RT.right, RT.BOTTOM-40,

HWnd,

NULL,

Hinst,

NULL);

}

Else

SendMessage (Hwndlist, LB_RESETCONTENT, 0, 0);

ZeromeMory (& PFD, SIZEOF (protected_file_data);

ICOUNT = 0;

While (g_pfnsfcgetnextprotectedfile (null, & pfd)! = 0)

{

/ / Convert Wchar to ANSI for this "ANSI application"

Ilen = widechartomultibyte (CP_ACP, NULL, PFD.FILENAME, WCSLEN (PFD.FileName),

SZFileName, 260, NULL, NULL

SZFileName [Ilen] = '/ 0';

SendMessage (HWndList, LB_ADDString, 0, (LPARAM) SZFileName);

ICOUNT ;

}

}

Another more direct API is SFCISFileProtacected. The API can be more convenient to call most applications, and answer the following questions: "Take a look at this file, is it protected?" But remember that it needs to point to the full path to this file. You cannot just simply specify NTS.sys, but you need to give the path to the position where NTS.sys is located. If you pass this file to the API, it will say: "Yes, this file is protected", or "This is not a protected file." This API needs to be used when you do any backup or recovery operation. You can call this API if you want any installation settings or may update a system file. If you want to place a target file in the system directory, you need to call this API before doing this, to avoid cancel the Windows file protection. The next version of Windows Installer (released with Windows 2000) will check before the replication file is checked, so WFP will not be initiated unexpectedly. Bool WinApi sfcisfileProtected (in Handle Rpchandle, In LPCWSTR PROTFILENAME); //

// This function uses the "file" to open the dialog to get the file name from the user and check if it is protected.

Void CheckfileForProtection (HWND HWND)

{

OpenFileName OpenFileName;

Char Szfile [MAX_PATH] = "/ 0";

Char Szsystem32 [MAX_PATH];

STRCPY (SZFILE, "");

ZeromeMory (& OpenFileName);

// Fill the OpenFileName structure to support templates and hooks.

OpenFileName.lstructSize = sizeof (OpenFileName);

OpenFileName.hwndowner = hwnd;

OpenFileName.hinstance = hinst;

OpenFileName.lpstrfile = SZFILE;

OpenFileName.nmaxFile = sizeof (SZFILE);

OpenFileName.lpstitle = "SELECT A FILE";

OpenFileName.Flags = OFN_FILEMUSTEXIST

IF (g_pfnshgetfolderpath! = null)

g_pfnshgetfolderpath (NULL, CSIDL_SYSTEM, NULL, NULL, SZSYSTEM32);

Else

Szsystem32 [0] = '/ 0';

OpenFileName.lpstrinitialDir = szsystem32;

// Call the public dialog function.

IF (& OpenFileName))

{

// Check the file

Wchar wzfilename [260];

Ilen;

Ilen = MultibytetowideChar (CP_ACP, NULL, SZFILE, STRLEN (SZFILE), WZFILENAME, 260);

WZFileName [Ilen] = '/ 0';

IF (g_pfnsfcisfileprotected (null, wzfilename) == true) {

MessageBox (hwnd, "is protected", szfile, mb_ok);

}

Else

MessageBox (HWnd, "IS Not Protected", SZFILE, MB_OK;

}

Components Check that we have found that another reason that cannot be installed on Windows 2000 is the component check function. Obviously, each version of our operating system consists of multiple different components. These components include TAPI, MAPI, Microsoft DirectX (R), and the like. We found what components are in what components, and whether there is a component to make your own assumption. The application is assumed because of the presence of the A component, because the version 2 of a component is exist and the version 3 of the other component will also exist. If you need to use a component, you must check if this component is present in the system, and whether it is at the correct level. In addition, developers also assume that there is no DirectX in Windows NT. Sometimes a statement is true, and the application also thinks it may be true during the preparation. Then when checking it, because the Windows 2000 has no DirectX, it will declare: "Oh, I can't run." But Windows 2000 has DirectX, this assumption is incorrect. Another problem we have encountered is hard-coded issues, and the application will not be able to hardcode the path if the location is false, it is impossible to codize the path at all. Another example is that Windows 2000 now contains TAPI (latest version TAPI 3.0) and DirectX (the latest version 7), not by default MAPI. In the past, it always believes that if the operating system is Windows NT, which should include MAPI. But the current situation is different. If you use a component, you must check if this component exists, and no assumptions are made according to platform or components. Another problem found in the installation of the wrong location installation is that the location of people placed files. If you upgrade some files placed somewhere, it doesn't matter; you can place them in the location of the user. However, some files need to be placed in the "Program Files" directory in the first installation. Note that it is not necessarily C: / Program Files. Sometimes it is this directory, sometimes it is not. For example, in my machine is not. I usually leave the C partition to Windows 98, and install the Windows NT partition to other partitions. We hope that you don't put your files as much as possible in any subdirectory such as the Windows directory, or System32. Although there is no harm of this, we often hope you, so we can't completely ban this practice, but we now hope that all files in the system are more organized. We have discovered that users deeply feel a headache for hundreds of documents in the System32 directory, and they can't delete them. Every time you hear people say this: "Every year, you must clean up the system and start reloading Windows from the beginning. Uninstalling and cleaning procedures have become the most popular application on the software market. We hope that the system remains in an orderly state and makes the operation process more simplified. Possible, we do even want you to write some shared components elsewhere; Microsoft Visual Basic (R) is a better example in this regard. Many applications use this component. Old Visual Basic is always installed in the system directory, now we placed it in a specified folder of Program Files. If you want to find the location where the file should be placed, you can call a named SHGETFolderPath. SHGETFolderPath is an integral part of Windows 2000. It has also existed in the second edition of Windows 98. If you find that there is no this API in the system, you can distribute S HFolder.dll.

The DLL will unlock the housing of this new API for SHGETFolderPath. This API understands the location where each special folder is in the system. You can find the API in the SDK. It is a very long list, which lists each folder you can consider. Note that the old version of the platform only supports the following four CSLIDs. If you are looking for a specific directory, find that the directory does not exist, the SHGETFolderPath can create this directory for you, and the condition is that you have specified, but in the Windows 95, this process can only be followed. Four csidl valid: csidl_personal csid1_ApplicationData CSIDL_MYPICTURES CSIDL_LOCAL_APPLICATIONDATA The following code example shows the application of SHGETFolderPath; it is a very simple and easy to use API. One thing to pay attention to: If you want the code to run on all platforms (including the platforms such as SHGETFOLDERPATH with Windows 2000 and Windows 95 without SHGETFolderPath, the application must dynamic links with the implementation process in Shfolder.dll . // ShgetFolderPath Can Work Everywhere Shfolder Is Installed.

HModule HMODSHFOLDER = loadingLibrary ("shfolder.dll");

IF (HMODSHFOLDER! = NULL)

{

(* (FarProc *) & g_pfnShgetFolderPath =

GetProcaddress (HMODSHFolder, "ShgetFolderPatha));

}

Else

g_pfnshgetfolderpath = null;

}

IF (g_pfnshgetfolderpath! = null)

g_pfnshgetfolderpath (NULL, CSIDL_SYSTEM, NULL, NULL, SZSYSTEM32);

Else

Szsystem32 [0] = '/ 0';

OpenFileName.lpstrinitialDir = szsystem32;

Safety Questions Finally, as the last problem for setting and installation, we will discuss several security issues that occur with Windows 2000:

Advanced users should install the entire system-wide application. We have found that some applications can only be installed by administrators. For locked machines, companies still want many different users, or two or three users in one day can be shared; or all employees can use this system for a certain day. They just don't want anyone to be arbitrarily changed by administrator privileges, for what they want. Many customers require advanced users (not only administrators) to complete the installation of the application. Another application can be installed for yourself (rather than anyone in the system). If I want to play a game, I should be able to install the game, and don't let anyone else in the system use this game. But remember that non-advanced users cannot write things to the "Program Files" directory; the user cannot write HKEY_LOCAL_MACHINE. In the installation process, you should open HKEY_LOCAL_MACHINE to see if there is any write permission to it, and then make it a statement: "You cannot write to the site; if you want this app for personal use only?" A security issue is the default server permissions. If you are trying to install server applications or services, use non-privileged service accounts (meaning, you do not use the local system account, and no account established as a member of the local administrator group), the account is basically It is impossible to have the privileges required to actually run the service. In Windows 2000, the permissions owned by non-privileged users (actually non-privileged service accounts) are different from Windows NT 4.0. There is less authority with the former. For example, non-privileged users cannot write anywhere anywhere in the Windows system directory. If you have a running server, the server tries to make some operations, or trying to install certain things, but it may not have appropriate permissions. If you are running a server application, confirm that it has logged into the correct account and has all permissions required to run properly. Windows 2000 Compatibility Issue I want to discuss the next problem called Windows 2000 compatibility issues, here is some changes to the Windows platform, the purpose is to promote the platform constant progress, and implement us for users Provide a more reliable platform goal. These modifications will affect some applications running on Windows 2000. Set the front window We start with a fairly simple operation: set the front desk window. In fact, this change begins with Windows 98. It cannot be expected to simply use the application to call setForegroundWindow, and then your window can automatically change to the front desk. All of this is to prevent any worker options when anyone wants to jump to the forefront. You are trying to type, suddenly pop up a window, requiring some action. You may have a positive answer to something that doesn't understand anything at all, in the process of typing. In order to prevent this, the application can be developed for the application for the application. In fact, these rules in Windows 98 already exist:

If your process is already a reception process, you can take the front desk window. If your process is just started by the front process, you can take the front desk. If your process receives the last input, it will become a front desk. If there is no front window at this time, you can take the front desk. If you are debugging the front desk process, everyone can take the front desk. If a reception timeout is locked (there is no action in the front desk lock in a certain period of time, and the response will not be responded), then others can get the front desk. If the current system menu is active, your application will not be able to get the front desk. This is mainly to prevent the appearance of the problem: you are using the "Start" menu, and along its branch menu is about to start an application, suddenly these menus disappear. This new rule in Windows 2000 can prevent this. Another new feature added in the Super Hide File Windows 2000 is called "Super Hidden File". Here, the system will mark "System" and "Hide" attributes simultaneously. The file is still in the original position, we can also apply these files; just after you enter the Windows Explorer, these files will not be displayed. Even if you select "Show Hide Files", you cannot see them. There is a new check box in the property list of the folder, which will allow the user to see these files, but ordinary users do not select this option, so they cannot see these files. Moreover, the system will no longer display those files in the Windows environment, most of which are based on the old files and similar files based on MS-DOS (R). In most cases, this has no effect on ordinary users; what they see will be a more concise system. This is not a compatibility issue for 32-bit applications. Applications can see files in the General "Open File" dialog and open files smoothly, and the command line is still valid. If you use the DIR / ASH command that can view the super hidden file, all files will be seen. The only compatibility problem is 16-bit applications, which will encounter a bit of trouble. This is mainly caused by invocating the INT21 of MS-DOS. If you require the system to find the hidden file, MS-DOS's int21 will only find hidden service files. Partially hidden files:

MS-DOS system files, such as IO.DOS Office Quick Find file NetBIOS NetBIOS has been part of Windows NT. From Windows 2000, this situation has changed. It is not a default configuration, and the user may set the system so that it does not load does not appear NetBIOS. If your application calls the API using NetBIOS in the system without NetBIOS, these applications will not work properly and return errors. For example, if you use a call such as NetServereNum, there is no NetBIOS in the running system, the error message will be returned. You must check all where you use NetBIOS calls to determine if they happen to the machine without NetBIOS and correctly handle it. Alternatively, it can be replaced with a non-NetBIOS call. Make sure your user knows that your system always needs NetBIOS and clearly notifies in the installer or version release instruction. Need a new network .inf file If you have any network devices (such as network drivers, transfer drivers, and some network file print providers, you need to confirm that there are new networks needed in the system. INF file to support Windows 2000 plug-and-play. These new files are used to use the Windows NT 4.0 upgrade from the beginning of the network device or by Windows NT 4.0 to Windows 2000. Because this format is compatible with Windows 98, you can use it before. In any case, you need to provide these files to the user immediately so that after the system is upgraded to Windows 2000, network devices can still be supported. Physical Drive No If your application needs to access your hard drive and volume (such as viral scanning) in a low mode, you will need to find physical drive numbers, and you must change the way you find this number. In the past, you may use a symbolic chain, the content returned by the symbol chain is similar to: / device / harddiskx / partitiony where you will find "HardDisk" and the back X, and see it is a hard disk 2 or hard disk 3 . Now, the symbol chain returns: / device / harddiskvolumez Physical Drive Number will no longer appear anywhere in this symbolic chain. You need to replace with a pair of available IOCTLs. The first is: ioctl_storage_get_device_number This IOCTL is only valid for a single physical drive letter. For example, if the drive is a C drive, even multiple partitions on one drive, the IOCTL will take effect. But for multi-volume collection, you need to use: ioctl_volume_get_volume_disk_extents

转载请注明原文地址:https://www.9cbs.com/read-1410.html

New Post(0)