Article View: comp.os.os2.programmer.misc
Article #183Ill Effects of Including an .obj in .dll & .exe (DosMonReg)?
From: Keith Bennett
Date: Fri, 28 Apr 1995 00:00
Date: Fri, 28 Apr 1995 00:00
39 lines
2348 bytes
2348 bytes
What is the effect of including an object module both in a .DLL and in and .EXE that uses that .DLL (under OS/2)? [I'm posting this message both in OS/2 specific and general C++ areas because it pertains to both.] I posted a message a few days ago asking for help with a problem I was having with DosMonReg(). (This function is used to register a function that intercepts printer output.) It was returning an error code 379 (Invalid Parameter) for no apparent reason. The call was in a DLL. Other apps that used that same DLL had no problem. After making a change, the problem has disappeared. I would like to find out if the change solved the problem or merely submerged it. This is what fixed it: There was an object file that was included both in the .DLL and the .EXE. This object file was minimal (about 400 bytes) so wasted space was not really a problem. But when I removed it from the .DLL the problem went away. The object file is truly tiny, containing a single one-line function and a single static char array. It is in a separate file in order to be logically consistent with the way we handle other files. (It isn't logically related to anything else, and there's nothing else that would need to be included with it.) Does anyone know why the problem went away and whether the duplicate inclusion was the cause of the problem? Thanks for any help. - Keith -- -------------------------------------------------------------------------- Keith Bennett Bennett Business Solutions, Inc. Silver Spring, MD USA OS/2 & DOS Software Development kbennett@cpcug.org (301) 871-7696
Technical Details
Message-ID:
<3nrd40$h8d@cpcug.org>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,7fa8bd30a999fbb0,start X-Google-Attributes: gid109fba,public X-Google-Thread: 10cd94,7fa8bd30a999fbb0,start X-Google-Attributes: gid10cd94,public X-Google-Thread: 11307a,7fa8bd30a999fbb0,start X-Google-Attributes: gid11307a,public From: kbennett@cpcug.org (Keith Bennett) Subject: Ill Effects of Including an .obj in .dll & .exe (DosMonReg)? Date: 1995/04/28 Message-ID: <3nrd40$h8d@cpcug.org> X-Deja-AN: 101746057 organization: Express Access Online Communications USA: 800-969-9090 newsgroups: comp.os.os2.programmer.misc,bit.listserv.os2-l,comp.lang.c++