a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Libraries:
 exec.library
  AVL_AddNode
  AVL_FindFirstNode
  AVL_FindLastNode
  AVL_FindNextNodeByAddress
  AVL_FindNextNodeByKey
  AVL_FindNode
  AVL_FindPrevNodeByAddress
  AVL_FindPrevNodeByKey
  AVL_RemNodeByAddress
  AVL_RemNodeByKey
  AbortIO
  AddDevice
  AddHead
  AddIntServer
  AddLibrary
  AddMemHandler
  AddMemList
  AddPort
  AddResource
  AddSemaphore
  AddTail
  AddTask
  Alert
  AllocAbs
  AllocEntry
  AllocMem
  AllocPooled
  AllocSignal
  AllocTrap
  AllocVec
  Allocate
  AttemptSemaphore
  AttemptSemaphoreShared
  AvailMem
  CacheClearE
  CacheClearU
  CacheControl
  CachePostDMA
  CachePreDMA
  Cause
  CheckIO
  CloseDevice
  CloseLibrary
  ColdReboot
  CopyMem
  CopyMemQuick
  CreateIORequest
  CreateMsgPort
  CreatePool
  Deallocate
  Debug
  DeleteIORequest
  DeleteMsgPort
  DeletePool
  Disable
  DoIO
  Enable
  Enqueue
  FindName
  FindPort
  FindResident
  FindSemaphore
  FindTask
  Forbid
  FreeEntry
  FreeMem
  FreePooled
  FreeSignal
  FreeTrap
  FreeVec
  GetCC
  GetMsg
  InitCode
  InitResident
  InitSemaphore
  InitStruct
  Insert
  MakeFunctions
  MakeLibrary
  ObtainQuickVector
  ObtainSemaphore
  ObtainSemaphoreList
  ObtainSemaphoreShared
  OldOpenLibrary
  OpenDevice
  OpenLibrary
  OpenResource
  Permit
  Procure
  PutMsg
  RawDoFmt
  ReleaseSemaphore
  ReleaseSemaphoreList
  RemDevice
  RemHead
  RemIntServer
  RemLibrary
  RemMemHandler
  RemPort
  RemResource
  RemSemaphore
  RemTail
  RemTask
  Remove
  ReplyMsg
  SendIO
  SetExcept
  SetFunction
  SetIntVector
  SetSR
  SetSignal
  SetTaskPri
  Signal
  StackSwap
  SumKickData
  SumLibrary
  SuperState
  Supervisor
  TypeOfMem
  UserState
  Vacate
  Wait
  WaitIO
  WaitPort
Include
GuruMeditation
Docs » Autodocs » exec.library » MakeLibrary

NAME

	MakeLibrary -- construct a library

SYNOPSIS

	library = MakeLibrary(vectors, structure, init, dSize, segList)
D0 A0 A1 A2 D0 D1
struct Library *MakeLibrary
(APTR,struct InitStruct *,APTR,ULONG,BPTR);

FUNCTION

	This function is used for constructing a library vector and data
area. The same call is used to make devices. Space for the library
is allocated from the system's free memory pool. The data portion of
the library is initialized. init may point to a library specific
entry point.

NOTES

	Starting with V36, the library base is longword adjusted.  The
lib_PosSize and lib_NegSize fields of the library structure are
adjusted to match.

INPUTS

	vectors - pointer to an array of function pointers or function
displacements. If the first word of the array is -1, then
the array contains relative word displacements (based off
of vectors); otherwise, the array contains absolute
function pointers. The vector list is terminated by a -1
(of the same size as the pointers).
structure - points to an "InitStruct" data region. If NULL,
then it will not be used.
init - If non-NULL, an entry point that will be called before adding
the library to the system. Registers are as follows:
d0 = libAddr ;Your Library Address
a0 = segList ;Your AmigaDOS segment list
a6 = ExecBase ;Address of exec.library
The result of the init function must be the library address,
or NULL for failure. If NULL, the init point must manually
deallocate the library base memory (based on the sizes stored
in lib_PosSize and lib_NegSize).
dSize - the size of the library data area, including the
standard library node data. This must be at leas
sizeof(struct Library).
segList - pointer to an AmigaDOS SegList (segment list).
This is passed to a library's init code, and is used later
for removing the library from memory.

RESULT

	library - the reference address of the library.  This is the
address used in references to the library, not the
beginning of the memory area allocated. If the library
vector table require more system memory than is
available, this function will return NULL.

SEE ALSO

InitStruct(), InitResident(), "exec/initializers.i"

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Fairlight

AYS
TBL
PHA
FLT

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se