Update Item in Microsoft Management Console May Cause Excessive Screen Flicker

ID: Q241996


The information in this article applies to:
  • Microsoft Windows NT Server version 4.0 SP4


SYMPTOMS

Updating a Result view item at a high refresh interval (about every five seconds) may cause excessive screen flicker in Microsoft Management Console (MMC) 1.1. This may cause slow performance.


CAUSE

The call to update the Result view item in MMC 1.1 redraws all the subsequent items below it in the Result view. This causes excessive screen flicker.


RESOLUTION

This behavior is resolved in the latest version of MMC, which you can download from the following Microsoft Web site:

http://www.microsoft.com/management/mmc


WORKAROUND

To word around this problem in MMC 1.1:

  1. Perform version detection as listed below. If MMC 1.2 or later is detected, use the Update Result View item in the snap-in. If MMC 1.1 or earlier is detected, continue with these steps.


  2. Call Update Item on the first item to be updated, providing the new information.


  3. This results in a chain of calls to the GetDisplayInfo snap-in for each of the subsequent items. Provide the updated information at this point.


  4. Do not call Update Item for each of the subsequent saved items.


This workaround adds some additional work for the snap-in. It must respond to the GetDisplayInfo call with information that is more up-to-date than the current items in the Results pane. Note that the fix in MMC 1.2 prevents this from working because they are not called for display information from items that are not updated, so the version checking becomes critical. The procedure for performing version detection is listed below.

Detecting MMC Versions for Primary Snap-ins

Primary snap-ins must use the IConsole interface pointer that is passed to their IComponent::Initialize implementation for detecting MMC version numbers. This is because the console's IConsole interface pointer is the only MMC interface that can be used for querying for the new MMC 1.2 interfaces. The following sample implementation of a global function detects the MMC version number:

MMC_VERSION GetMMCVersion(IConsole *pConsole)
{
  HRESULT hr1;
  HRESULT hr2;
  MMC_VERSION mmcVersion;

  hr1 = pConsole->QueryInterface(IID_IConsole2, (void **)&m_ipConsole2);
  hr2 = pConsole->QueryInterface(IID_IColumnData, (void **)&m_ipColumnData);
    
  if (S_OK == hr1 && S_OK == hr2)
      mmcVersion = MMC12;
  else
  {    
    if (S_OK == hr1 && S_OK != hr2)
        mmcVersion = MMC11;
    else
        mmcVersion = MMC10;
  }

  return mmcVersion;
} 
The mmcVersion variable is an enumeration of type MMC_VERSION:
enum MMC_VERSION {MMC10 = 0, MMC11 = 1, MMC12 = 2};
The IConsole interface pointer passed to GetMMCVersion is the same one passed to the snap-in's IComponent::Initialize implementation. Note that neither the GetMMCVersion function nor the MMC_VERSION enumeration in this example works to identify an MMC version later than version 1.2. However, you can still use the function to identify whether the version number is 1.2 or later. That is, if the function determines that the version number is neither 1.0 nor 1.1, then it must be 1.2 or later.


STATUS

Microsoft has confirmed this to be a problem in Windows NT 4.0 SP4 (Microsoft Management Console 1.1).

Additional query words:

Keywords : kbtool
Version : winnt:4.0 SP4
Platform : winnt
Issue type : kbprb


Last Reviewed: September 27, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.