{
Open, Close, GetAsHandle example
The following code locks the memory for text on the Clipboard, then reads the text.
} 
var
  MyHandle: THandle;
  TextPtr: PChar;
  MyString: string;
begin
  ClipBoard.Open;
try
  MyHandle := Clipboard.GetAsHandle(CF_TEXT);
  TextPtr := GlobalLock(MyHandle);
  MyString := StrPas(TextPtr);
  GlobalUnlock(MyHandle);
finally
  Clipboard.Close;
end;
end; 
