How to cancel save/auto-save action through API?

Hi,

I am trying to cancel some actions (ex. File->Save, File->SaveAs, File->print, File->close).

I can able to block other commands in above except File->Save. While blocking save action, the modifications are getting saved.

After MS_DGNAUTOSAVE set to 0, modifications not saved. How to block autosave action through programmatically.

InputFilterReturnValue monitorFunction(Inputq_element* queueElementP) 
{	
	if (queueElementP != NULL)
	{
		if (queueElementP->u.cmd.command == File_Save)
		{
			return INPUT_REJECT;
		}
	}
	return INPUT_ACCEPT;
}

In above code File_Save is commandid of File->Save action.

Regards,

Rajesh Varatharajan