unsubscribe potatoe [address=marc@perkel.com]

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

unsubscribe potatoe [address=marc@perkel.com]

Marc Perkel

--
Marc Perkel - [hidden email]

Spam Filter: http://www.junkemailfilter.com
    My Blog: http://marc.perkel.com


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

getprocaddress

L505
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:
..................
................?




_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: getprocaddress

Michael Van Canneyt


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:
> ..................
> ................?

The same, just add dynlibs to your uses clause.

This is documented.

Michael.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: getprocaddress

L505

| 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
 myprocedure: procedure;stdcall;

@myprocedure:=

Error: Can't assign values to an address


However I figured something out.. this works:

    MyProcedure:=TMyProcedure(GetProcAddress(handle,'MyProcedure'));

So @ doesn't work.. because objfpc assumes assigning to an address is just not
right?


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal