The GetIsCheckedOut method returns a Boolean indicating whether the object store item specified in IIsCheckedOutCmd::Initialize is checked-out by the current user.
NOTE This method will return true, even if a document is checked out and IIsCheckedOutCmd::Initialize was configured with the current, released or superseded version of the object. Therefore, the bstrVersionID parameter of the IObjectStoreItem::Initialize method must specify the version series ID (GUID) for the reservation object for the item to be inspected.
VARIANT_BOOL b
IsCheckedOut = spIIsCheckedOutRsp->GetIsCheckedOut();
...
// Obtain the specific response information contained in the custom IsCheckedOut component
IIsCheckedOutRspPtr spIIsCheckedOutRsp(spIAppIntRsp);
_ASSERTE(spIIsCheckedOutRsp != 0);
// Determine if the object store item is checked out by the current user.
std::cout << "Determining if object store item is checked out by the current user..." << std::endl;
VARIANT_BOOL bIsCheckedOut = spIIsCheckedOutRsp->GetIsCheckedOut();
if (bIsCheckedOut == VARIANT_TRUE) {
std::cout << "Item IS checked-out by the current user." << std::endl;
} else {
std::cout << "Item IS NOT checked-out by the current user." << std::endl;
}
...