View Single Post
Old 28 November 2017, 23:06   #7
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,344
There's a distinction between initialisation and library open/close routines.

Your initialisation routine is called once when the library is loaded from disk. The first time some program OpenLibrary()s your library, Exec loads it from disk and executes your intialisation routine. That's where you would typically allocate memory for the library base, create your task etc. Then Exec calls your library open routine (offset -6 from library base).

If your initialisation routine returns failure, your library won't be added to the system list.

If your initialisation routine succeeded then the library will be added to the system list. Then your open routine would be called.
mark_k is offline  
 
Page generated in 0.05776 seconds with 11 queries