Article View: comp.os.os2.programmer
Article #1002Re: Exporting variables from DLL's
From: Bill Tracey
Date: Thu, 27 Aug 1992 03:04
Date: Thu, 27 Aug 1992 03:04
23 lines
1618 bytes
1618 bytes
In <1992Aug26.213514.14162@natinst.com> Malathi Ramdas writes: > Is it possible to export global variables from a DLL? I have written a >DLL that exports 3 variables. I have created an import library for an appl >ication that wishes to use this DLL. As soon as I try to run this application >it complains about not being able to find these variables in the DLL module. >It seems like from the export declararions in the .def file it is assuming >that these are functions and not variables. Should I be doing anything differe >nt or is it simply impossible to export global variables? By the way, I am compi >ling and linking the DLL application using CSET/2 and LINK386. > This should work just fine. Is it possible the DLL was linked with the /noi (noignorecase) option and the calling application was linked without it? One common mistake that causes errors like this is for the case of the variable in the DLL to be different than the case of the variable in the calling program. If the case of the variable name in the error message is different from the case of the variable name in the DLL code then the case mismatch is probably the problem. Hope this helps, Bill Tracey
Technical Details
Message-ID:
<19920826.200530.323@almaden.ibm.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!vnet.ibm.comReferences:
<1992Aug26.213514.14162@natinst.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!vnet.ibm.com From: wtracey@vnet.ibm.com (Bill Tracey) Message-ID: <19920826.200530.323@almaden.ibm.com> Date: Wed, 26 Aug 92 23:04:54 EDT Newsgroups: comp.os.os2.programmer,comp.os.os2.apps Subject: Re: Exporting variables from DLL's Reply-To: wtracey@vnet.ibm.com Organization: IBM Corp. News-Software: UReply 3.0 References: <1992Aug26.213514.14162@natinst.com> Lines: 23