cancel save operation

Is it possible to cancel the save operation through the api?  I know how to tie into the FileSaveAsPreNotify hook, but do not know how to stop the whole save operation.  I have some conditions that I'd like to check before a document is allowed to be saved.  If the conditions are not met, I want to display a message and cancel the save operation.  Thanks in advance.

SolidworksApi macros