Help and Support
 

powered byLive Search

FIX: Thread Handle Leak in PrintReport Method of Data Report

Article ID:319034
Last Review:December 26, 2006
Revision:3.4
This article was previously published under Q319034
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.

SYMPTOMS

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 status
You must restart the program to continue printing.

Back to the top

CAUSE

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.

Back to the top

RESOLUTION

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:
http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS (http://support.microsoft.com/default.aspx?scid=fh;en-us;cntactms)
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
				

Back to the top

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

Back to the top

MORE INFORMATION

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:
http://technet.microsoft.com/en-us/sysinternals/default.aspx (http://technet.microsoft.com/en-us/sysinternals/default.aspx)

Back to the top


APPLIES TO
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

Back to the top

Keywords: 
kbbug kbfix KB319034

Back to the top

Article Translations

 

Other Support Options

  • Need More Help?
    Contact a Support professional by E-mail, Online or Phone.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.