Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
SDK Documentation
 ItemCheckingOut Method

  Switch on low bandwidth view
Community Content
In this section
Statistics Annotations (0)
SPItemEventReceiver.ItemCheckingOut Method (Microsoft.SharePoint)
Synchronous Before event that occurs after an item is checked out.

Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
Visual Basic (Declaration)
Public Overridable Sub ItemCheckingOut ( _
    properties As SPItemEventProperties _
)
Visual Basic (Usage)
Dim instance As SPItemEventReceiver
Dim properties As SPItemEventProperties

instance.ItemCheckingOut(properties)
C#
public virtual void ItemCheckingOut (
    SPItemEventProperties properties
)

Parameters

properties
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
This eventReceiver does not work      MarkLive64 ... Noelle Mallory - MSFT   |   Edit   |   Show History

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.

ItemCheckingOut not fire      jab_be   |   Edit   |   Show History
ItemcheckingOut is not fire when Require Check Out property is set to Yes !!!
Tags What's this?: Add a tag
Flag as ContentBug
Canceling a checkout generates "Attempted to read or write protected memory." error.      Michael Washam - MSFT   |   Edit   |   Show History

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.CancelNoError
End Sub
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker