Xref: utzoo comp.sys.dec:2826 comp.os.vms:23346 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!pacbell!rtech!mikes@rtech.UUCP From: mikes@rtech.UUCP (Mike Schilling) Newsgroups: comp.sys.dec,comp.os.vms Subject: Re: Runtime loading of shareable images Message-ID: <4969@rtech.rtech.com> Date: 12 Mar 90 18:12:17 GMT References: <27705@cup.portal.com> Sender: news@rtech.rtech.com Distribution: usa Lines: 20 From article <27705@cup.portal.com>, by Prodas@cup.portal.com (Henry Lewis Feldman): > I have a question about run-time dynamic linking. > > I am working on a C program that during run-time must choose between > several different subroutines. Ideally these run-time subroutines > should be "shareable images". But is there a program callable routine > that will dynamically load an image, my reading of the linker is that > link to the shareable image is fixed at link time. My program must choose > between one of many images after the program has started. > > Can anyone point me to the proper routines? > I'm posting this, rather than mailing it, because the technique is so generally useful: Use LIB$FIND_IMAGE_SYMBOL. It will, at run-time, map a shareable image and return the value of any universal symbol which that image defines. ---------------------------------------------------------------------------- "I want the right to urinate in different colors" -- Tom Stoppard, "Travesties" mikes@rtech.com = Mike Schilling, Ingres Corporation, Alameda, CA