Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2003-02

creating DLL with FPC 1.0.6

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Iván Montes

Hi,

I'm having problems using a dll created under Win2k and FPC 1.0.6.

library myplugin;
uses Windows;
function Hello( s :pchar ) :boolean;
begin  WriteLN('hello ',s); end;
exports Hello name 'Hello';
end.

This compiles and creates the dll just fine but when I try to load it at runtime I get an error:

address := LoadLibrary( 'myplugin.dll' );

this call gives error code 487, that according to MSDN means : "Attempt to access invalid address."

any help will be greatly appreciated

Anton Tichawa
to Iván Montes: I'm having problems using a dll created under Win2k and FPC 1.0.6. library myplugin; uses…

Hello, Iván!

you wrote
address := LoadLibrary( 'myplugin.dll' ); this call gives error code 487, that according to MSDN means : "Attempt to access invalid address."

Maybe it's a simple i/o error. Have you tried specifying a full absolute path and verifying if the file 'myplugin.dll' actually exists under that name?

hth,

Anton Tichawa.

----------

"Adas Methode war, wie sich zeigen wird, Tagträume in offenbar korrekte Berechnungen einzuweben."

Doris Langley Moore: Ada, Countess of Lovelace (London 1977).

----------

Anton Tichawa
Volkertstrasse 19 / 20
A-1020 Wien
mobil: +43 664 52 07 907
email:

----------