IOleUndoUnit::GetUnitType method (ocidl.h)

Retrieves the CLSID and a type identifier for the undo unit.

Syntax

HRESULT GetUnitType(
  [out] CLSID *pClsid,
  [out] LONG  *plID
);

Parameters

[out] pClsid

A pointer to CLSID for the undo unit.

[out] plID

A pointer to the type identifier for the undo unit.

Return value

This method returns S_OK on success.

Remarks

A parent undo unit can call this method on its child units to determine whether it can apply special handling to them. The CLSID returned can be the CLSID of the undo unit itself, of its creating object, or an arbitrary GUID. The undo unit has the option of returning CLSID_NULL, in which case the caller can make no assumptions about the type of this unit. The only requirement is that the CLSID and type identifier together uniquely identify this type of undo unit.

Note that the undo manager and parent undo units do not have the option of accepting or rejecting child units based on their type.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header ocidl.h

See also

IOleUndoUnit