IOleUndoManager::GetOpenParentState

Returns state information about the innermost open parent undo unit.

HRESULT GetOpenParentState(

DWORD* pdwState

//Pointer to state information

);

Parameters

pdwState
[out] Pointer to state information. This information is a value taken from the UASFLAGS enumeration.

Return Values

S_OK
There was an open parent unit and its state was successfully returned or the undo manager is disabled.
S_FALSE
There is no open parent unit.

Remarks

Note to Implementers

If there is an open parent unit, this method calls IOleParentUnit::GetParentState.

If the undo manager is disabled, it should fill the pdwState parameter with UAS_BLOCKED and return S_OK.

Note to Callers

When checking for a normal state, use the UAS_MASK value to mask unused bits in the pdwState parameter to this method for future compatibility. For example:

	fNormal = ((pdwState & UAS_MASK) == UAS_NORMAL) 
 

See Also

UASFLAGS