The instance query methods are used to define the properties of an instance of your object. You would normally override these methods to define the unique properties of the instance of the object. For example, you might override wpclsQueryStyle if you want to prevent all instances of your object from being deleted. However, you would override wpQueryStyle to prevent only certain instances of this object from being deleted, as shown in the following sample code:

ULONG SOMLINK myfdr_wpQueryStyle(MyFolder *somSelf)
{
  ULONG ulStyle;
  ULONG ulAttr;

  MyFolderMethodDebug("MyFolder","myfdr_wpQueryStyle");
  ulStyle = parent_wpQueryStyle(somSelf);
  ulAttr  = _wpQueryAttr( somSelf );

  if (ulAttr & FILE_READONLY)
  {
    ulStyle |= OBJSTYLE_NODELETE;
  }
  return ulStyle;
}


[Back] [Next]