Destroy
Destroy (delete) the OriginObject.
BOOL Destroy( DWORD dwCntrl = OCD_DEL_LINKED_OBJS | OCD_DEL_PARENT_IF_LAST )
Returns TRUE on successful exit (the OriginObject was destroyed) and FALSE on failure.
EX1
// WARNING! Example deletes a worksheet if it is the active window // Attach to the active layer in a project // If it is a worksheet, destroy it int OriginObject_Destroy_ex1() { Worksheet wks = Project.ActiveLayer(); if( wks.IsValid() ) { printf("wks object is valid\n"); wks.Destroy(); if( wks.IsValid() ) printf("Still valid (but shouldn't be)\n"); else printf("No longer valid\n"); return 0; } else { printf("There was a problem\n"); return -1; } }
origin.h