Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: Executing procedure by it address

  1. #11

    Re: Executing procedure by it address

    Yep., I added dynlibs. Eh... I suppose should do dynamic library... But I didn't use dynamic linking before. Have I to make different code for windows libraries and linux?

  2. #12

    Re: Executing procedure by it address

    Quote Originally Posted by Darkhog
    Yep., I added dynlibs. Eh... I suppose should do dynamic library... But I didn't use dynamic linking before. Have I to make different code for windows libraries and linux?
    I haven't tested this on linux yet. And that source I showed is what I did. No dynamic libraries used. IMO you shouldn't need to write seperate code for Windows and Linux, unless you use system dependent code.

    But if you use dynamic linking then the Adress variable in my example will be used to load the library.

    [pascal]
    var
    Form1: TForm1;
    Adress: TLibHandle;

    ...

    procedure TForm1.FormCreate(Sender: TObject);
    begin
    Adress := LoadLibrary('mylib.dll');
    //OR
    Adress := LoadLibrary('mylib.so');
    end;
    [/pascal]

    Toy around and see what you can come up with...

  3. #13

    Re: Executing procedure by it address

    Thanks for advice. This will be used later. For now I must get SDL to work and make designer

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •