FIX: Thread Handle Leak in PrintReport Method of Data Report
This article was previously published under Q319034
This article has been archived. It is offered "as is" and will no longer be updated.
The third-party products that are discussed in this article are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.
When a Visual Basic program uses the data report designer to create and print a large number of reports (typically 700 or more), the program may fail and you may receive the following error message:
Error obtaining printer statusYou must restart the program to continue printing.
Each time that you call the PrintReport method of the Data Report, it creates a new thread to handle the printing job in the background. Data Report keeps the handles of these background threads so that it may cancel the printing jobs. This problem occurs because Data Report does not release these handles after the threads are closed.
A supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next Visual Studio 6.0 service pack that contains this fix.
To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.
The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
Date Time Version Size File name Platform -------------------------------------------------------------- 02/26/2002 1:26PM 6.0.9517 304KB MSDBRpt.DLL x86 02/26/2002 1:26PM 6.0.9517 292KB MSDBRptR.DLL x86
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
You can use the Handleex utility to view the type of handles that are leaking. This is a freeware utility that is avalable from Sysinternals. To download this utility, visit the following Sysinternals Web site:
Article ID: 319034 - Last Review: 02/27/2014 21:12:06 - Revision: 3.4
Microsoft Visual Basic 6.0 Enterprise Edition, Microsoft Visual Basic 6.0 Enterprise Edition Service Pack 3, Microsoft Visual Basic 6.0 Enterprise Edition Service Pack 4, Microsoft Visual Basic 6.0 Enterprise Edition Service Pack 5, Microsoft Visual Basic 6.0 Professional Edition
- kbnosurvey kbarchive kbbug kbfix KB319034