Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
[CLOSED] LoadLibrary() in initialization section
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
IRC channel
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
TBGRABitmap.TextSize retu...
by
hedgehog
[
Today
at 06:07:46 am]
AI, NLP and CAI: Text Gen...
by
schuler
[
Today
at 04:26:36 am]
The weird Rewrite bug
by
ojz0r
[
Today
at 03:50:28 am]
Demoscene Square dot flag...
by
KodeZwerg
[
Today
at 03:47:30 am]
How does Castle Game Eng...
by
michalis
[
Today
at 02:51:40 am]
Lazarus for Windows on aa...
by
dsiders
[
Today
at 01:22:37 am]
Have anyone develop UEFI ...
by
440bx
[April 16, 2024, 09:39:52 pm]
For-in loop over constant...
by
VisualLab
[April 16, 2024, 09:15:53 pm]
BUG REPORT: Unable to gen...
by
PascalDragon
[April 16, 2024, 09:02:49 pm]
Lazarus project made on M...
by
Odacir
[April 16, 2024, 08:56:58 pm]
Is it possible to support...
by
PascalDragon
[April 16, 2024, 08:51:36 pm]
CORBA interface and Varia...
by
PascalDragon
[April 16, 2024, 08:35:43 pm]
Macros confuse error mess...
by
PascalDragon
[April 16, 2024, 08:13:25 pm]
Form scaling
by
fxeconomist
[April 16, 2024, 08:09:39 pm]
InstallAware Using Lazaru...
by
Thaddy
[April 16, 2024, 07:21:31 pm]
Post your internal error ...
by
Eugene Loza
[April 16, 2024, 07:12:35 pm]
C-evo: New Horizons 1.3.0...
by
Chronos
[April 16, 2024, 06:32:41 pm]
How can i make this windo...
by
Handoko
[April 16, 2024, 06:23:43 pm]
CocoaInt.CocoaIconUse no ...
by
dsiders
[April 16, 2024, 06:22:10 pm]
Does anyone know why this...
by
Laksen
[April 16, 2024, 06:01:04 pm]
pre-processor symbol when...
by
paule32
[April 16, 2024, 05:11:35 pm]
How are cookies share Web...
by
Thaddy
[April 16, 2024, 04:59:59 pm]
Azure sql database will n...
by
wpflum
[April 16, 2024, 04:04:56 pm]
Values of a custom compon...
by
CM630
[April 16, 2024, 01:42:08 pm]
Arabic text, problem on L...
by
marius.maximus
[April 16, 2024, 12:59:47 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [CLOSED] LoadLibrary() in initialization section (Read 1175 times)
julkas
Guest
[CLOSED] LoadLibrary() in initialization section
«
on:
July 04, 2020, 06:10:21 pm »
Is it safe call
LoadLibrary()
from unit initialization section?
Thanks.
«
Last Edit: July 05, 2020, 06:55:59 pm by julkas
»
Logged
jamie
Hero Member
Posts: 6129
Re: LoadLibrary() in initialization section
«
Reply #1 on:
July 04, 2020, 10:16:07 pm »
Yes, in fact its most likely the best place since that gets called before any of the code does in the units.
Those sections get called first before the first line of your main file gets executed.
Logged
The only true wisdom is knowing you know nothing
Cyrax
Hero Member
Posts: 836
Re: LoadLibrary() in initialization section
«
Reply #2 on:
July 05, 2020, 11:00:36 am »
It is if your application is an executable, not dynamic loadable library. Windows OS will add some restrictions on this :
https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-best-practices
Under Unix OS (at least Linux), it seems that you can use it as you fit without any restrictions.
Logged
julkas
Guest
Re: LoadLibrary() in initialization section
«
Reply #3 on:
July 05, 2020, 06:55:00 pm »
Thanks.
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
[CLOSED] LoadLibrary() in initialization section
TinyPortal
© 2005-2018