home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / os / mswindo / programm / misc / 3357 < prev    next >
Encoding:
Internet Message Format  |  1992-11-10  |  1.9 KB

  1. Path: sparky!uunet!think.com!ames!agate!usenet.ins.cwru.edu!cleveland.Freenet.Edu!ae302
  2. From: ae302@cleveland.Freenet.Edu (Peter Haller)
  3. Newsgroups: comp.os.ms-windows.programmer.misc
  4. Subject: Re: BORDLG class dialog boxes
  5. Date: 11 Nov 1992 02:29:20 GMT
  6. Organization: Case Western Reserve University, Cleveland, OH (USA)
  7. Lines: 34
  8. Message-ID: <1dpr60INN8pf@usenet.INS.CWRU.Edu>
  9. References: <josteinl.1@saga.oih.no> <10966@uqcspe.cs.uq.oz.au>
  10. Reply-To: ae302@cleveland.Freenet.Edu (Peter Haller)
  11. NNTP-Posting-Host: slc12.ins.cwru.edu
  12.  
  13.  
  14. In a previous article, josteinl@saga.oih.no (LEIRA JOSTEIN) says:
  15.  
  16. >
  17. >You'r right. You must load the BWCC.DLL. There are two ways to do it.
  18. >
  19. >First method:
  20. >
  21. >  Enter these two lines of code at the start of your program:
  22. >
  23. >    HANDLE hDLL;         /* This line could be defined in the app-class */
  24. >    hDLL = LoadLibrary("BWCC.DLL"); /* and this line in the constructor */
  25. >
  26. >  and this line at the end (of WinMain):
  27. >
  28. >    FreeLibrary(hDLL);              /* and this line in the destructor */
  29. >
  30. >  Then you should link your program with BWCC.LIB and IMPORT.LIB. (The 
  31. >  Borland documentation says the linking order i important.)
  32. Nope, this is wrong, partially. If you link in the bcww.lib file
  33. you do not need to use LoadLibrary(). When you link with bwcc.lib
  34. you force an implicit link and link all the exported functions. 
  35. LoadLibrary() allows you to load a DLL dynamically. When you do
  36. thing your way you don't do any harm, but it is redundant. Using
  37. LoadLibrary() by itself though will not work, unless you then
  38. call GetProcAddress() to retrieve the exported functions that you
  39. require.
  40.  
  41. PCH
  42. -- 
  43. Peter C. Haller                         |       'If you do what you
  44. Lorain Products                         |       have always done,
  45. ae302@cleveland.Freenet.Edu             |       expect what you have
  46. "Are we having fun yet?"                |       always received.'
  47.