You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: KB2998527 causes wrong code lookups on past dates
3
-
description: This article explains the problem where update 2998527 causes incorrect code lookups on past dates when the application use TimeZoneInfo.
4
-
ms.date: 05/08/2020
2
+
title: KB2998527 Causes Wrong Code Lookups on Past Dates
3
+
description: This article explains how update 2998527 causes incorrect code lookups on past dates when an application uses TimeZoneInfo.
4
+
ms.date: 07/08/2025
5
5
ms.reviewer: leecow
6
6
ms.custom: sap:Class Library Namespaces
7
+
ms.topic: troubleshooting-problem-resolution
8
+
#customer intent: As a developer, I want to fix incorrect code lookups on past dates when I use the TimeZoneInfo class so that my application handles time zones correctly.
7
9
---
8
10
# Update 2998527 causes incorrect code lookups on past dates
9
11
10
-
This article explains the problem where [KB 2998527](https://support.microsoft.com/help/2998527)causes incorrect code lookups on past dates when you use the `TimeZoneInfo` class in an application.
12
+
This article describes an issue where installing the [Microsoft KB 2998527](https://support.microsoft.com/help/2998527)update can cause the `TimeZoneInfo` class to return incorrect results for past date lookups in applications.
After October 26, 2014, applications that are hosted on systems that have the September 2014 Russian time zone update ([KB 2998527](https://support.microsoft.com/help/2998527)) installed and that use the Microsoft .NET Framework might calculate time incorrectly when they use the `TimeZoneInfo` class.
20
+
After October 26, 2014, applications that are hosted on systems that have the September 2014 Russian time zone update ([KB 2998527](https://support.microsoft.com/help/2998527)) installed and that use Microsoft .NET Framework might calculate time incorrectly when they use the `TimeZoneInfo` class.
18
21
19
22
This problem occurs in the following time zones:
20
23
@@ -33,28 +36,28 @@ This problem occurs in the following time zones:
33
36
- (UTC+10:00) Vladivostok, Magadan (RTZ 9)
34
37
- (UTC+13:00) Samoa
35
38
36
-
## Cause
39
+
Consider the following C# example code:
37
40
38
-
This problem occurs because a change in the base offset of a time zone breaks any code in the affected time zones if that code looks up past dates by using `TimeZoneInfo` in the .NET Framework. This is because the .NET Framework can't track year-to-year changes in the base offset.
41
+
```csharp
42
+
TimeZoneInfotz=TimeZoneInfo.FindSystemTimeZoneById("Russian Standard Time");
This problem was exposed by the recent changes to Russian time zones that are described in Microsoft Knowledge Base article 2998527.
47
+
Before you apply KB 2998527, this code correctly returns the date and time as June 1, 2013 at 04:00. After you apply the update, the code returns the date and time incorrectly as June 1, 2013 at 03:00.
41
48
42
-
The .NET Framework previously ignored the UTC offset that is set in an internal adjustment rule. Instead, it used the base UTC offset in certain calculations. The .NET Framework also ignored adjustment rules that don't have daylight transitions.
49
+
## Cause
43
50
44
-
## Status
51
+
This problem occurs because a change in the base offset of a time zone breaks any code in the affected time zones if that code looks up past dates by using `TimeZoneInfo` in .NET Framework. This problem occurs because .NET Framework can't track year-to-year changes in the base offset.
45
52
46
-
Microsoft is researching this problem and will post more information in this article when the information becomes available. A new update is planned that will update the .NET Framework to correctly use UTC offsets and adjustment rules for all-time zones.
53
+
This problem was exposed by the changes to Russian time zones that are described in KB 2998527.
47
54
48
-
We recommend that you install both update 2998527 and the new update when it's available. This will make sure that UTC offset rules are used correctly for all past years and all years going forward.
55
+
Previously, .NET Framework ignored the UTC offset that's set in an internal adjustment rule. Instead, it used the base UTC offset in certain calculations. .NET Framework also ignored adjustment rules that don't have daylight transitions.
49
56
50
-
## More information
57
+
## Solution
51
58
52
-
Consider the following C# example code:
59
+
If your .NET application uses `TimeZoneInfo`, update it to use the latest Windows time zone information. If applicable, you should also make sure that your application correctly handles the latest time zone rules for Russia.
53
60
54
-
```csharp
55
-
TimeZoneInfotz=TimeZoneInfo.FindSystemTimeZoneById("Russian Standard Time");
For example, before you apply KB 2998527, this code correctly returns the date and time as June 1, 2013 at 04:00. After you apply the update, the code incorrectly returns the date and time as June 1, 2013 at 03:00.
63
+
-[Time zone changes for Russia in Windows](https://support.microsoft.com/topic/time-zone-changes-for-russia-in-windows-43f3d691-0bab-eb64-3ec1-6451d148194c)
title: Printing a range of pages fails when you use a WPF application
3
-
description: This article discusses a problem in which the process of printing pages fails when you use Windows Presentation Foundation (WPF) application.
4
-
ms.date: 03/22/2022
5
-
ms.reviewer: hiroakii
2
+
title: Printing a Range of Pages Fails When You Use a WPF Application
3
+
description: This article discusses a problem in which the process of printing pages fails when you use a Windows Presentation Foundation (WPF) application.
4
+
ms.date: 07/08/2025
5
+
ms.reviewer: hihayak, davean
6
6
ms.custom: sap:Class Library Namespaces
7
+
ms.topic: troubleshooting-problem-resolution
8
+
9
+
#customer intent: As a user of a WPF application, I want to work around failures when I print a range of pages so that I can print documents that contain more than 1,000 pages.
7
10
---
8
11
# Printing a range of pages fails when you use a WPF application
9
12
10
-
This article discusses a problem in which the process of printing pages fails when you use Windows Presentation Foundation (WPF) application.
13
+
This article discusses a problem in which you can't successfully print large documents when you use a Windows Presentation Foundation (WPF) application.
11
14
12
15
## Symptoms
13
16
14
17
Consider the following scenario:
15
18
16
-
1. You're using a Windows Presentation Foundation (WPF) application in Windows 10 to print a range of pages.
17
-
1. You're running the `XpsDocument` object to process the print job by using `VisualsToXpsDocument`, `DocumentPaginator`, or another method.
19
+
1. You use a WPF application in Windows 10 or later versions to print a range of pages.
20
+
1. You run the `XpsDocument` object to process the print job by using `VisualsToXpsDocument`, `DocumentPaginator`, or another method.
18
21
19
-
In this scenario, the print process fails after printing some pages.
22
+
In this scenario, the print process fails after you print some pages.
20
23
21
24
## Cause
22
25
23
-
When you print pages by using a WPF application on Windows 10, the font information is allocated on a page-by-page basis. If you're using this method to print a range of pages in a runtime, the process may increase memory usage by the operating system.
26
+
When you print pages by using a WPF application in Windows 10 or later, the font information is allocated on a page-by-page basis. If you're using this method to print a range of pages in a runtime, the process may increase memory usage by the operating system.
24
27
25
-
For example, if you're printing more than 8,000 pages, the process may stop because of a temporary increase in memory usage. This error indicates that an IOException occurred due to a failed access to the font file.
28
+
For example, if you're printing more than 8,000 pages, the process may stop because of a temporary increase in memory usage. This error indicates that an `IOException` occurred because of failed access to the font file.
26
29
27
-
When all of the pages finish printing, memory can be freed for allocation.
30
+
After all the pages finish printing, memory can be freed for allocation.
28
31
29
-
## Workaround
32
+
## Solution
30
33
31
-
For the documents that contain more than 1,000 pages, reduce the number of pages that you process to print job in a runtime.
34
+
To resolve this issue apply the [January 2025 Cumulative Update Preview](/dotnet/framework/release-notes/2025/01-28-january-cumulative-update-preview) or a later update for .NET Framework.
title: IME can't trigger PreviewKeyDown event of TextBox in WPF apps
3
-
description: Describes the issue that some Microsoft IMEs can't trigger PreviewKeyDown event of TextBox control in WPF apps.
4
-
ms.date: 02/28/2022
2
+
title: IME Can't Trigger PreviewKeyDown Event of TextBox in WPF Apps
3
+
description: Discusses an issue that prevents some Microsoft IMEs from triggering PreviewKeyDown events of TextBox controls in WPF apps.
4
+
ms.date: 07/08/2025
5
5
Author: aartig13
6
6
ms.author: aartigoyle
7
7
ms.reviewer: hirotoh
8
8
ms.custom: sap:Class Library Namespaces
9
+
ms.topic: troubleshooting-problem-resolution
10
+
11
+
#customer intent: As a developer, I want to fix an issue that prevents IMEs from triggering PreviewKeyDown events so that TextBoxes in my WPF app function correctly.
9
12
---
10
-
# PreviewKeyDown event of TextBox control can't be triggered by Microsoft IME in WPF apps
13
+
# PreviewKeyDown events of TextBox controls aren't triggered by Microsoft IME in WPF apps
11
14
12
15
> [!NOTE]
13
-
> The issue that is described in this article is a bug on Windows 10, version 2004/20H2/21H1/21H2 and it won't be fixed. But it has been fixed on Windows 11. So you can upgrade your system to Windows 11 to avoid the issue.
16
+
> The issue that's discussed in this article is a bug in Windows 10, versions 2004, 20H2, 21H1, and 21H2. This bug isn't fixed in Windows 10, but it is fixed in Windows 11. To avoid the issue, you can upgrade your system to Windows 11.
14
17
15
-
This article discusses an issue that prevents [PreviewKeyDown](/dotnet/api/system.windows.forms.control.previewkeydown) events of TextBox controls from being triggered by some Microsoft input method editors (IMEs) in Windows Presentation Foundation (WPF) applications.
18
+
This article discusses an issue that prevents [PreviewKeyDown](/dotnet/api/system.windows.forms.control.previewkeydown) events of TextBox controls from being triggered by some Microsoft input method editors (IMEs) in Windows Presentation Foundation (WPF) applications.
16
19
17
-
_Applies to:_ Windows Presentation Foundation, Windows 10, version 2004, Windows 10, version 20H2, Windows 10, version 21H1, Windows 10, version 21H2
20
+
_Applies to:_ Windows Presentation Foundation, Windows 10, version 2004, Windows 10, version 20H2, Windows 10, version 21H1, Windows 10, version 21H2
18
21
19
22
## Symptoms
20
23
21
24
Consider the following scenario:
22
25
23
-
1. You run a WPF application on Windows 10, version 2004/20H2/21H1/21H2.
24
-
1. You input in a TextBox control by using a Microsoft IME of East Asia.
26
+
1. You run a WPF application in Windows 10, version 2004, 20H2, 21H1, or 21H2.
27
+
1. You enter text into a TextBox control by using a Microsoft IME of East Asia.
25
28
26
29
In this scenario, the `PreviewKeyDown` event of the control isn't triggered. Therefore, some functions of the application that depend on the `PreviewKeyDown` event handlers don't work as expected.
27
30
28
31
## Cause
29
32
30
33
Microsoft IMEs are updated in some versions of Windows 10. This issue occurs when you use some of the latest Microsoft IMEs.
31
34
32
-
## Workaround
35
+
## Solution
33
36
34
37
Turn on the **Compatibility** option to revert to the previous version of Microsoft IME. To do this, follow these steps:
35
38
36
-
1.In the search box on the taskbar, enter *language settings*, and then select **Language settings** in the list of results.
39
+
1.Select Start, enter *language settings*, and then select **Language settings** in the list of results.
37
40
38
41
:::image type="content" source="./media/cannot-trigger-event-in-wpf-with-ime/language-settings.png" alt-text="Search language settings in the search box." border="true":::
39
42
40
-
1. Select **Options** for your language.
43
+
1. Select the **Language options** icon (ellipses) for your language.
41
44
42
45
:::image type="content" source="./media/cannot-trigger-event-in-wpf-with-ime/language-options.png" alt-text="Select language options." border="true":::
43
46
44
-
1. On the language option settings page, select **Options** for the IME that you're using.
47
+
1. On the **Options** page, select **Options** for the IME that you're using.
45
48
46
49
:::image type="content" source="./media/cannot-trigger-event-in-wpf-with-ime/ime-options.png" alt-text="Select IME options." border="true":::
47
50
@@ -51,4 +54,4 @@ Turn on the **Compatibility** option to revert to the previous version of Micros
51
54
52
55
1. Turn on the **Use previous version of \<YourIME\>** option, and then select **OK** in the window that opens.
53
56
54
-
:::image type="content" source="./media/cannot-trigger-event-in-wpf-with-ime/turn-on-compatibility.png" alt-text="Turn on the compatibility mode and confirm the IME version change." border="true":::
57
+
:::image type="content" source="./media/cannot-trigger-event-in-wpf-with-ime/turn-on-compatibility.png" alt-text="Screenshot that shows how to turn on compatibility mode and verify the IME version change." border="true":::
description: Works around an issue in which a COMException exception occurs when you create a WeakReference<T> object in a .NET Framework-based application.
4
-
ms.date: 05/09/2020
4
+
ms.date: 07/08/2025
5
5
ms.reviewer: rachanr, leecow
6
6
ms.custom: sap:Class Library Namespaces
7
+
ms.topic: troubleshooting-problem-resolution
8
+
9
+
#customer intent: As a developer, I want to resolve COMExceptions that occur when I create a WeakReference object so that my application functions as intended.
7
10
---
8
-
# COMException occurs when you create a WeakReference object in a .NET Framework-based application
11
+
# COMException when you create a WeakReference object in a .NET Framework app
12
+
13
+
This article helps you work around the `COMException` exception that occurs when you create a WeakReference object in a Microsoft .NET Framework-based application.
9
14
10
-
This article helps you work around the `COMException` exception that occurs when you create a WeakReference object in an Microsoft .NET Framework-based application.
15
+
_Applies to:_Microsoft .NET Framework 4.5
11
16
12
-
_Original product version:_ Microsoft .NET Framework 4.5
13
-
_Original KB number:_ 2978463
17
+
_Original KB number:_ 2978463
14
18
15
19
## Symptoms
16
20
17
-
Assume that you develop a .NET Framework-based application. In this application, you use the reflection API to enumerate methods in a `WeakReference<T>` type. Then you call the `GetFunctionPointer` method on the `RuntimeMethodHandle` handle for the `WeakReference<T>.Create` function. When the pointer to the `WeakReference<T>.Create` method is retrieved by using code that resembles the following code sample:
21
+
Assume that you develop a .NET Framework-based application. In this application, you use the reflection API to enumerate methods in a `WeakReference<T>` type. Then, you call the `GetFunctionPointer` method on the `RuntimeMethodHandle` handle for the `WeakReference<T>.Create` function. Code that resembles the following code sample retrieves the pointer to the `WeakReference<T>.Create` method:
To work around this issue, don't retrieve a pointer to the `WeakReference<T>.Create` method. This method is private to the `WeakReference<T>` class. So, invoking this method may cause undefined behavior even if you get a pointer to the function.
46
+
If a debugger is attached to the application process, you receive an exception and call stack that resemble the following code sample:
To work around this issue, don't retrieve a pointer to the `WeakReference<T>.Create` method. This is a private method of the `WeakReference<T>` class. Therefore, invoking this method might cause undefined behavior even if you get a pointer to the function.
0 commit comments