Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!betasvm2.vnet.ibm.com!wtracey From: wtracey@betasvm2.vnet.ibm.com ("Bill Tracey") Newsgroups: comp.os.os2.programmer Subject: Partial DLL installation Message-ID: <9105281958.AA11150@ucbvax.Berkeley.EDU> Date: 28 May 91 20:01:05 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 24 Christophe Wolfhufel writes... >I have an application that *might* use one of 2 DLLs or both of >them. If these DLLs are defined LOADONCALL and if the application >is run on a system that does not have the unused DLL, will it work >or will I get a crash? >In the second case, is there any easy solution doing this, except >compiling 3 versions of the software and taking the one corresponding >to each workstation's configuration? It has nothing with whether or not the DLL segments are marked LOADONCALL, its whether they are linked at load time or run time. If you import a DLL in a .DEF file, or use an import library to access a DLL, then you are using load time dynamic linking for that DLL. With load time linking, all the DLLs imported must be present for the program to load. If they are not, then OS/2 will refuse to start the program. You can get around the need to have all of the DLLs present by using run time dynamic linking. To do this you use the DosLoadModule and DosGetProcAddr APIs to get a pointer to the function in a DLL and then call the function through the pointer. Bill Tracey.