Error Message "winError = 122" Using AT Command to Display Scheduled Tasks with Japanese Default Locale (302385)
The information in this article applies to:
- Microsoft Windows 2000 Server SP1
- Microsoft Windows 2000 Server SP2
- Microsoft Windows 2000 Advanced Server SP1
- Microsoft Windows 2000 Advanced Server SP2
- Microsoft Windows 2000 Professional SP1
- Microsoft Windows 2000 Professional SP2
This article was previously published under Q302385 SYMPTOMS
If you run the At.exe tool without parameters to display scheduled job details, the at command may display the following error message in the middle of its output:
FormatMessage(4310) fails with winError = 122
The error message is produced for every command that is scheduled to run on three or more days in the week. Full details of the schedule for such commands are not displayed. Although you see these error messages, the affected jobs run normally. This issue is only a cosmetic display issue.
Note that this problem occurs only when a double-byte character set (DBCS) language (such as Japanese) is selected as the system's default system locale in versions of Windows 2000 (such as English) that do not typically use a DBCS.
CAUSE
When you run At.exe with no parameters and you are using a locale that uses a DBCS, At.exe chooses long day names rather than short day names to include in its output. This occurs because there are no short day name strings in the DBCS locales.
The maximum expected long day name length in DBCS locales is four characters. However, if the underlying Windows version is English (or another non-DBCS locale), the long day name strings that are selected may actually be longer than four characters (for example, Wednesday is nine characters). This may result in an unexpected buffer overflow when day names are copied to the At.exe output buffer. When this error occurs, the error message "FormatMessage(4310) fails with winError = 122" is displayed in the middle of the At.exe output. Error 122 has this description: "The data area passed to a system call is too small."
Note that this is only a cosmetic display issue. The scheduling information for the affected jobs is not corrupted in any way.
RESOLUTIONTo resolve this problem, obtain the latest service pack for Windows 2000. For additional information, click the following article number to view the article in the
Microsoft Knowledge Base:
260910 How to Obtain the Latest Windows 2000 Service Pack
The English version of this fix should have the following file attributes or later:
Date Time Version Size File name
-----------------------------------------------------
10-Aug-2001 14:34 5.00.2195.4118 23,824 At.exe
30-May-2001 00:03 5.00.2195.3649 3,584 Spmsg.dll
WORKAROUND
To work around this problem, use any of the following methods:
- Reset the default system locale to English.
- Use the at n command to display full details for the job that causes the error message, where n is the job's ID.
- Use the explorer \\computername command, double-click Scheduled Tasks, and then double-click any job to see its schedule details in full.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Windows 2000 Service Pack 3.
Modification Type: | Minor | Last Reviewed: | 9/26/2005 |
---|
Keywords: | kbHotfixServer kbQFE kbbug kbfix kbSysAdmin kbWin2000PreSP3Fix kbWin2000sp3fix KB302385 |
---|
|