Partager via


File I-O Issues

Applies To: Windows 7, Windows Vista

There are several known File I-O issues addressed by the Compatibility Administrator through compatibility fixes and compatibility modes.

Fix Name Symptom Fix Description

EmulateGetDiskFreeSpace

The application reports the incorrect amount of available hard disk space during installation and use.

Causes the Windows XP Professional operating system version of GetDiskFreeSpace to emulate the behavior of the GetDiskFreeSpace function on the Microsoft Windows®°95 operating system and the Microsoft Windows®°98 operating system. If the true free space is larger than 2 gigabytes (GB), GetDiskFreeSpace returns a free disk space value of 2 GB, which is the same value that Windows 95 and Windows 98 return. If the true available disk space is less than 2 GB, the sector geometry is modified to emulate Windows 95 and Windows 98.

RedirectDBCSTempPath

When a user with a double-byte character set name starts an application, the application returns an error message, indicating that there are problems with the user's temp path.

Redirects the double-byte character temp path to the single-byte character temp path.

RedirectWindowsDirToSystem32

You receive an error message stating "The system file does not exist."

Redirects calls from the GetWindowsDirectory function to the GetSystemDirectory function. This accounts for the differences in folder structure between Windows 95 or Windows 98 and Windows XP Professional.

EmulateWriteFile

You receive an access violation error message when you attempt to open certain AVI files.

Causes the WriteFile function on Windows XP Professional to emulate the behavior of WriteFile on Windows 95 and Windows 98 when lpBuffer passes a NULL pointer. On Windows 95 and Windows 98, WriteFile writes null characters when lpBuffer is NULL. However, on Windows XP Professional, WriteFile fails if lpBuffer is NULL.

RemoveOverlappedFlagFromCreateFile

The application stops responding when you attempt to open a file.

Removes the FILE_FLAG_OVERLAPPED flag from all CreateFile function calls if the file destination is a disk drive. Windows 95 and Windows 98 ignore this flag for disk types.

RemoveReadOnlyAttribute

When you attempt to open a file, the application says that the file is read-only.

Removes the read-only attribute from all directories. This is helpful for applications that do not work when the shell folders are set to read-only.

ChangeAuthenticationLevel

You receive an access violation error message when you move files or projects.

Changes the COM Security Level from RPC_C_AUTHN_LEVEL_NONE to RPC_C_AUTHN_LEVEL_COMMON for applications written for Windows 95 and Windows 98. This enables the temporary elevation of the security context for an application.

CorrectCreateEventName

You receive an error message that states "File mapping not created."

Replaces backslashes with an underscore. This is because the CreateEvent function in Windows XP Professional does not accept event names with a backslash as it did in Windows 95 and Windows 98.

EmulateCreateFileMapping

You receive an error message that states "File mapping not created."

On Windows 95 and Windows 98, the CreateFileMapping function automatically sets the SEC_COMMIT flag when the SEC_NOCACHE flag is set. On Windows XP Professional, that function fails.

This fix adds the SEC_COMMIT flag to the CreateFileMapping function for applications that expect it to be present.

EmulateCDFS

You receive an error message that states "Unable to locate files" or "Unable to install" while accessing a CD-ROM.

Removes the read-only flag on Windows XP Professional CD-ROM directories and causes the application to ignore all sharing and write attributes to emulate Windows 95 and Windows 98. This compatibility fix also handles the differences in the CD attributes between Windows 95 or Windows 98 and Windows XP Professional.

RemoveNoBufferingFlagFromCreateFile

When accessing a CD, the application quits without generating an error message.

Removes the FILE_FLAG_NO_BUFFERING flag from all CreateFile function calls.

EmulateEnvironmentBlock

You receive an error message that states "Files do not exist."

Enables Windows XP Professional to return a smaller environment block from the GetEnvironmentStrings function, reducing the chance of a buffer overrun.

EmulateGetCommandLine

Files are not found or file paths are truncated.

Enables Windows XP Professional to return a smaller environment block from the GetEnvironmentStrings function, reducing the chance of a buffer overrun.

CorrectFilePathsUninstall

The Uninstall command fails to remove files and folders from the program files directory.

Corrects file paths during application removal if the file paths were corrected during application installation. The program that removes the application uses this compatibility fix, while the installation program uses the CorrectFilePaths compatibility fix.

Important
You must use this fix with the CorrectFilePaths compatibility fix.

See Also

Concepts

Known Compatibility Fixes, Compatibility Modes, and AppHelp Messages
Internet Explorer Compatibility Test Tool