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 » OpenLibrary

NAME

	OpenLibrary -- gain access to a library

SYNOPSIS

	library = OpenLibrary(libName, version)
D0 A1 D0
struct Library *OpenLibrary(STRPTR, ULONG);

FUNCTION

	This function returns a pointer to a library that was previously
installed into the system. If the requested library is exists, and
if the library version is greater than or equal to the requested
version, then the open will succeed.
The library may exist in memory, or on disk; this is transparent to
the OpenLibrary caller. Only Processes are allowed to call
OpenLibrary (since OpenLibrary may in turn call dos.library).
A full path name for the library name is legitimate. For example
"wp:libs/wp.library". This allows the use of custom libraries
without requiring the user to copy the library into the system's
LIBS: directory.

NOTES

	All calls to OpenLibrary should have matching calls to CloseLibrary!
Libraries on disk cannot be opened until after DOS has been
started.
As of V36 tasks can safely call OpenLibrary, though DOS may open
system requesters (e.g., asking the user to insert the Workbench
disk if LIBS: is not online). You must call this function from a
DOS Process if you want to turn off DOS requesters.

INPUTS

	libName - the name of the library to open
version - the version of the library required.

RESULT

	library - a library pointer for a successful open, else zero

BUGS

	AmigaDOS file names are not case sensitive, but Exec lists are. If
the library name is specified in a different case than it exists on
disk, unexpected results may occur.
Prior to V36, tasks could not make OpenLibrary calls requiring disk
access (since tasks are not allowed to make dos.library calls).
Now OpenLibrary is protected from tasks.
The version number of the resident tag in disk based library must
match the version number of the library, or V36 may fail to load it.

SEE ALSO

CloseLibrary()

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:

Abyss

AYS
SNT
RZR
FLT

Comments:

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