STA Threads Lose Thread Token

This article was previously published under Q192132
This article has been archived. It is offered "as is" and will no longer be updated.
If a Single Threaded Apartment (STA) thread sets a thread token on itsapartment thread, it may lose this token unexpectedly. As a result, securecalls to open files, databases, and so on, can fail. This behavior isexhibited only by STA servers; MTA servers are unaffected by this problem.
This problem is caused by a bug in the COM/RPC runtime that causes it toincorrectly revert the thread token after a call was dispatched to the STA.
To resolve this problem, obtain the latest service pack for Windows NT 4.0 or Windows NT Server 4.0, Terminal Server Edition. For additional information, click the following article number to view the article in theMicrosoft Knowledge Base:
152734 How to Obtain the Latest Windows NT 4.0 Service Pack

Microsoft has confirmed that this is a problem in Windows NT 4.0 and Windows NT Server 4.0, Terminal Server Edition. This problem was first corrected in Windows NT 4.0 Service Pack 4.0 and Windows NT Server 4.0, Terminal Server Edition Service Pack 4.
COM server processes may set thread tokens on their threads for variousreasons. Secure calls from such threads will use the thread token in theaccess checks performed by the operating system. If these threads alsohappen to host STA objects, the token can be lost because of the above bug.Secure calls from the threads will then use the process token for accesschecks, and this can lead to different results from the first case. Theproblem usually manifests as unexpected security failures in secureaccesses made by such threads.

Article ID: 192132 - Last Review: 10/10/2013 20:50:12 - Revision: 1.3

  • Microsoft Windows NT Server 4.0, Terminal Server Edition
  • Microsoft Windows NT Workstation 4.0 Developer Edition
  • Microsoft Windows NT Server 4.0 Standard Edition
  • kbnosurvey kbarchive kbhotfixserver kbqfe kbbug kbfix KB192132