home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / os2 / programm / 4469 < prev    next >
Encoding:
Internet Message Format  |  1992-08-26  |  1.6 KB

  1. Xref: sparky comp.os.os2.programmer:4469 comp.os.os2.apps:5562
  2. Path: sparky!uunet!vnet.ibm.com
  3. From: wtracey@vnet.ibm.com (Bill Tracey)
  4. Message-ID: <19920826.200530.323@almaden.ibm.com>
  5. Date: Wed, 26 Aug 92 23:04:54 EDT
  6. Newsgroups: comp.os.os2.programmer,comp.os.os2.apps
  7. Subject: Re: Exporting variables from DLL's
  8. Reply-To: wtracey@vnet.ibm.com
  9. Organization: IBM Corp.
  10. News-Software: UReply 3.0
  11. References: <1992Aug26.213514.14162@natinst.com>
  12. Lines: 23
  13.  
  14. In <1992Aug26.213514.14162@natinst.com> Malathi Ramdas writes:
  15. >     Is it possible to export global variables from a DLL? I have written a
  16. >DLL that exports 3 variables. I have created an import library for an appl
  17. >ication that wishes to use this DLL. As soon as I try to run this application
  18. >it complains about not being able to find these variables in the DLL module.
  19. >It seems like from the export declararions in the .def file it is assuming
  20. >that these are functions and not variables. Should I be doing anything differe
  21. >nt or is it simply impossible to export global variables? By the way, I am compi
  22. >ling and linking the DLL application using CSET/2 and LINK386.
  23. >
  24.  
  25.  
  26. This should work just fine.  Is it possible the DLL was linked with
  27. the /noi (noignorecase) option and the calling application was linked
  28. without it?  One common mistake that causes errors like this is for the
  29. case of the variable in the DLL to be different than the case of the
  30. variable in the calling program.  If the case of the variable name in
  31. the error message is different from the case of the variable name in the
  32. DLL code then the case mismatch is probably the problem.
  33.  
  34. Hope this helps,
  35.  
  36. Bill Tracey
  37.