# IOleUndoUnit::GetUnitType

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

HRESULT GetUnitType(

CLSID* pClsid , | //Pointer to CLSID for undo unit
LONG* plID | //Pointer to type identifier for undo unit
); |

Parameters

pclsid
  [out] Pointer to CLSID for the undo unit.
plID
  [out] Pointer to the type identifier for the undo unit.

Return Values

S_OK
  Both the CLSID and type identifier were successfully returned.

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.