ReadVersionWithLock
Purpose
ReadVersionWithLock reads in a specific version of an object from the repository into the instantiated CMetaObject. ReadVersionWithLock differs from ReadVersion in that it acquires all database locks necessary to both read and write the object. For a subsequent WriteVersion on this object, this will prevent a deadlock caused by lock upgrades. This function should always be used within an explicit transaction to retain the locks since locks are maintained until the transaction commits or rolls back.
Requirements
The internal object ID for the desired version must be set before calling ReadVersionWithLock.
Syntax
HRESULT ReadVersionWithLock();