Public Overridable Sub ItemCheckingOut ( _ properties As SPItemEventProperties _ )
Dim instance As SPItemEventReceiver Dim properties As SPItemEventProperties instance.ItemCheckingOut(properties)
public virtual void ItemCheckingOut ( SPItemEventProperties properties )
Each time the itemCheckingOut eventReceiver is fired, the following error message is raised:
"Attempted to read or write protected memory. This is often an indication that other memory is corrupt. "
No known workaround at this time, to my knowledge.
Description:When attempting to cancel an item checkout in the ItemCheckingOut event handler the error "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." is shown to the user. This is a known issue with WSS 3.0 however, there is a workaround. You should set the Status property to SPEventReceiverStatus.CancelNoError instead of SPEventReceiverStatus.CancelWithError or setting properties.Cancel = true;C# Version
public override void ItemCheckingOut(SPItemEventProperites properties){ // Logic to decide checkout status here properties.Status = SPEventReceiverStatus.CancelNoError;}
VB Version
Public Overrides Sub ItemCheckingOut(ByVal properties as SPItemEventProperties) properties.Status = SPEventReceiverStatus.CancelNoErrorEnd Sub