I am not too sure why GetProcAddress is returning nil, but a few points:<br><br>1) you do not need to typecast string literals as PChar<br><br>FGetAsText := GetProcAddress (FHandle, 'clipboard_getastext');<br><br>2) You really should not return strings as PChar, passing them is fine, but return, nope<br>
<br>result := PChar (Clipboard.AsText);<br><br>Why? Because string types are managed and referenced counted. The project returning the string is likely to deallocate the memory returned upon exit (unless you save a copy locally) . A better approach would be to have the caller allocate the memory and return the expected buffer size:<br>
<br>function clipboard_getastext(Buffer: PChar; BufferSize: Integer): Integer;<br>