SAMPLE: ROTCLEAN: Tool to Remove Stale Monikers from ROT

ID: Q139468

The information in this article applies to:

SUMMARY

ROTCLEAN is a tool to remove stale monikers from the OLE Running Object Table (ROT) in Windows 95 and Windows NT 3.51.

MORE INFORMATION

The following file is available for download from the Microsoft Software Library:

 ~ ROTCLN32.EXE (size: 65949 bytes) 

For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q119591
   TITLE     : How to Obtain Microsoft Support Files from
               Online Services

An application may terminate unexpectedly before removing monikers that it may have registered in the ROT. The stale monikers that it leaves in the ROT will not correspond to running objects. Stale monikers in the ROT will not affect the binding of a moniker because OLE will never return the object that corresponds to a stale moniker. Therefore an application need not worry about removing its stale monikers from the ROT if it unexpectedly terminates.

For example, if the ROT has two objects with the same moniker and if one of the objects unexpectedly terminates, IRunningObjectTable::GetObject will return the other object. If another valid object with the same moniker does not exist, IRunningObjectTable::GetObject will return MK_E_UNAVAILABLE.

A tool like ROTCLEAN that removes stale monikers from the ROT is useful in debugging situations. Otherwise the system will have to be rebooted to clean the ROT. ROTCLEAN uses a technique that may not work in future versions, so source code is not included or available. Moreover the technique may cause some buggy applications to shutdown prematurely. ROTCLEAN will not work in Windows 3.x.

Additional query words: 0 kbfile

Keywords          : LeTwoArc 
Version           : 4.00 | 3.51
Platform          : NT WINDOWS

Last Reviewed: December 9, 1998