Sign in Join

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

Mailing lists / fpc-devel / 2000-10

dinamic/shared library

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Breno Ramalho Lemes

How dinamic/shared library works and how the program load this?

__________________________________________________________________________ Todo brasileiro tem direito a um e-mail gr�tis
http://www.bol.com.br

Michail A.Baikov
to Breno Ramalho Lemes

LoadLibrary, FreeLibrary, GetProcAddr.

RTFM please.

Earlier message 21 lines
----- Original Message ----- From: "Breno Ramalho Lemes" To: Sent: Tuesday, October 24, 2000 6:07 PM Subject: [fpc-devel]dinamic/shared library > How dinamic/shared library works and how the program > load this? > > > __________________________________________________________________________ > Todo brasileiro tem direito a um e-mail grАtis > http://www.bol.com.br > > > > > _______________________________________________ > fpc-devel maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-devel
Michael Van Canneyt
to Michail A.Baikov
Michail A.Baikov wrote
LoadLibrary, FreeLibrary, GetProcAddr. RTFM please.

Michail,

your answer is incomplete:

In the development version, FPC has a unit called dynlibs. This unit has an OS independent interface for loading libraries:

Function LoadLibrary(Name : AnsiString) : TLibHandle;
Function GetProcedureAddress(Lib : TlibHandle; ProcName : AnsiString) : Pointer;
Function UnloadLibrary(Lib : TLibHandle) : Boolean;

The unit can be compiled with the 1.0 release, just download the sources of the development RTL and copy&compile the relevant sources:

dynlibs.pp in the rtl/inc directory
dynlibs.inc in the rtl/OS directory (replace OS with linux, OS2 or Win32)

The unit should compile out of the box.

So before answering with RTFM,
you must be 100% sure about what you say :-)

Michael.

Michail A.Baikov
to Michael Van Canneyt
Show quoted text 14 lines
> LoadLibrary, FreeLibrary, GetProcAddr. > > RTFM please. Michail, your answer is incomplete: In the development version, FPC has a unit called dynlibs. This unit has an OS independent interface for loading libraries: Function LoadLibrary(Name : AnsiString) : TLibHandle; Function GetProcedureAddress(Lib : TlibHandle; ProcName : AnsiString) :
Pointer;
Show quoted text 13 lines
Function UnloadLibrary(Lib : TLibHandle) : Boolean; The unit can be compiled with the 1.0 release, just download the sources of the development RTL and copy&compile the relevant sources: dynlibs.pp in the rtl/inc directory dynlibs.inc in the rtl/OS directory (replace OS with linux, OS2 or Win32) The unit should compile out of the box. So before answering with RTFM, you must be 100% sure about what you say :-)

Dear Michael, know on 100% might only documents writer ... :))

to est' tolko ty :))