Date: Mon, 14 Feb 2000 03:09:44 -0500 (EST) From: Mike Nowlin <mike@argos.org> To: Marc Wandschneider <marcw@lanfear.com> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Loadable Code Modules? Message-ID: <Pine.LNX.4.05.10002140303440.20605-100000@jason.argos.org> In-Reply-To: <003901bf76c1$302107e0$0300000a@katana>
next in thread | previous in thread | raw e-mail | index | archive | help
> > i was wondering if FreeBSD had a kind of like DLL capability? > > i'd like to be able to do something as follows: > > // ... construct char *fileName > moduleHandle = loadCodeModule(fileName); > (char *)(*fn char *) myfn; // ii'm pretty sure i screwed that up > myfn = getFunctionAddress(moduleHandle, "doSomethignCool"); > // use fn > releaseModule(moduleHandle); First, a friendly smack for using a WinDoze term (DLL).... "Thwack!" Second, an answer. Yes, they are supported... Take a look at the man page for "dlopen". I just had a need to (finally) use dynamically loadable objects in a program, and they're pretty easy to implement. (The "dlopen" and related functions apply to most modern UNIX variants.) --mike To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.05.10002140303440.20605-100000>