I am not too sure why GetProcAddress is returning nil, but a few points:
1) you do not need to typecast string literals as PChar
FGetAsText := GetProcAddress (FHandle, 'clipboard_getastext');
2) You really should not return strings as PChar, passing them is fine, but
return, nope
result := PCha
| The same, just add dynlibs to your uses clause.
|
| This is documented.
|
| Michael.
Actually, I have dynlibs in uses, I just need education on the rules of objfpc
I will create an example for the docs though. I don't think it shows an example,
and I love examples.
An example:
var
myprocedu
On Thu, 14 Jul 2005, L505 wrote:
> I have a menu plug-in system working for lazarus and just need a tip to get it
> running ;-).
>
> What is the syntax to load a library dynamically? In delphi, you go
>
> @MyProcedure := GetProcAddress(MyProcedure, 'MyProcedure');
>
>
> In objfpc you go:
> .