共用方式為


CStringData::Lock

Locks the character buffer of the associated string object.

void Lock( ) throw( );

Remarks

Call this function to lock the character buffer of the string data object. Locking and unlocking is used when direct access to the character buffer is required by the developer. A good example of locking is demonstrated by the LockBuffer and UnlockBuffer methods of CSimpleStringT.

Note

A character buffer can only be locked if the buffer is not shared among higher string objects.

Requirements

Header: atlsimpstr.h

See Also

Reference

CStringData Class

CStringData::Unlock