home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / mswindo / programm / misc / 4431 < prev    next >
Encoding:
Text File  |  1992-12-22  |  1.6 KB  |  40 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!magna!doc
  3. From: doc@magna.com (Matthew J. D'Errico)
  4. Subject: GetProcAddress/DLL -- Wierd results - Help !
  5. Message-ID: <Bzon8v.7Cy@magna.com>
  6. Organization: Magna Software Corporation
  7. Date: Tue, 22 Dec 1992 22:46:04 GMT
  8. Lines: 30
  9.  
  10. This is a follow-up to a problem I've been trying to resolve...
  11. I STILL NEED HELP, though !
  12.  
  13. I have a routine, InitLib() which is bound into several DLL's,
  14. and exported in the .DEF for each.  What I use this for is to
  15. pass some data into the DLL...  The InitLib() routine takes this
  16. data and depending upon the context, massages it, and loads it into
  17. Global variables which are created using GlobalAlloc w/ GMEM_SHARE...
  18.  
  19. When I call LoadLibrary() in my .EXE, I follow it with a GetProcAddress()
  20. for "InitLib", and if it passes, I call the routine as a FARPROC
  21. function pointer with the appropriate data (all far pointers as well)...
  22.  
  23. Here's the wierd bit:
  24.  
  25. This routine, or one quite like it, is bound into several DLL's/
  26. In Windows 3.0, when I run the program, the data's not there, even
  27. though a couple of MessageBox displays in the InitLib() says it is...
  28.  
  29. So I recompiled for CodeView, and when I set the breakpoint at or in
  30. InitLib for the DLL, I never hit it !!  Even if I trace into InitLib()
  31. from the calling .EXE !!  I *see* the breakpoint, but CV doesn't trip...
  32.  
  33. Even wierder (to *me*, anyway), is that under Windows 3.1, this all
  34. works perfectly !!  Arrrrgghh !  The Global memory's there, the
  35. CodeView breakpoints hit, everything's *perfect* !
  36.  
  37. I need help...  Desparately !  (before I really need MENTAL help!)
  38.  
  39. -- Doc
  40.