Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!clarkson!grape.ecs.clarkson.edu!towfiq From: towfiq@FTP.COM (Mark Towfiq) Newsgroups: comp.os.os2.programmer Subject: Re: Partial DLL installation Message-ID: Date: 27 May 91 16:05:57 GMT Sender: usenet@grape.ecs.clarkson.edu Reply-To: towfiq@FTP.COM Organization: FTP Software, Inc., Wakefield, MA Lines: 26 In-Reply-To: wolf@grasp1.univ-lyon1.fr's message of 25 May 91 09:33:10 GMT >>>>> On 25 May 91 09:33:10 GMT, wolf@grasp1.univ-lyon1.fr (Christophe >>>>> Wolfhugel) said: Christophe> I have an application that *might* use one of 2 DLLs or Christophe> both of them. If these DLLs are defined LOADONCALL and if Christophe> the application is run on a system that does not have the Christophe> unused DLL, will it work or will I get a crash? You will not get an error unless you try to call the function, and the DLL is not there. Then you will get the "Could not load the application's segment: _BLAHBLAH is in error" message. Christophe> In the second case, is there any easy solution doing this, Christophe> except compiling 3 versions of the software and taking the Christophe> one corresponding to each workstation's configuration? Yes, there is an easier solution. You should investigate the DosLoadModule function, which allows you to load a DLL at run-time. Then you just read in the address of the function you want, using the DosGetProcAddr procedure, and call it. -- Mark Towfiq towfiq@FTP.COM Work: +1 617 246 0900 Home: +1 617 488 2818 FTP Software, Wakefield, MA 51 Harvard Avenue, West Medford, MA 02155 "The Earth is but One Country, and Mankind its Citizens" -- Baha'u'llah