home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / mswindo / programm / misc / 1755 < prev    next >
Encoding:
Internet Message Format  |  1992-09-09  |  1.1 KB

  1. Path: sparky!uunet!portal!cup.portal.com!Startup
  2. From: Startup@cup.portal.com (Startup Consulting Company)
  3. Newsgroups: comp.os.ms-windows.programmer.misc
  4. Subject: Need sleep function that is callable inside a DLL
  5. Message-ID: <65584@cup.portal.com>
  6. Date: Wed,  9 Sep 92 21:38:17 PDT
  7. Organization: The Portal System (TM)
  8. Lines: 18
  9.  
  10. I need to get a sleep() function that is callable from within a
  11. DLL and uses WM_TIMER for the wakeup.  Since WM_TIMER requires
  12. a callback function, I am wondering can you put a callback 
  13. function into a DLL?
  14.  
  15. If yes, then I'm not clear on how to setup the callback inside
  16. the .DLL.  Can someone point me to some sample code?  Since
  17. all invocations of a function in a .DLL share the same data 
  18. segment, would I skip calling MakeProcInstance() and just
  19. pass the address of the callback to SetTimer() directly?
  20.  
  21. To give some additional background, my .DLL is being called
  22. by Visual Basic, so I can't really put the callback into
  23. anything outside of the .DLL.  If someone already has a 
  24. sleep() function that is callable from within a .DLL I would
  25. appreciate a pointer to the code.  
  26.  
  27. Jim
  28.