Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.2 KiB

  1. /*++
  2. Copyright (c) 1990 Microsoft Corporation
  3. Module Name:
  4. dllinit.c
  5. Abstract:
  6. This module contians the DLL attach/detach event entry point for
  7. a Setup support DLL.
  8. Author:
  9. Ted Miller (tedm) July-1990
  10. Revision History:
  11. --*/
  12. #include <nt.h>
  13. #include <ntrtl.h>
  14. #include <nturtl.h>
  15. #include <windows.h>
  16. #include <overflow.h>
  17. HINSTANCE ThisDLLHandle;
  18. BOOL
  19. DLLInit(
  20. IN HINSTANCE DLLHandle,
  21. IN DWORD Reason,
  22. IN LPVOID ReservedAndUnused
  23. )
  24. {
  25. ReservedAndUnused;
  26. switch(Reason) {
  27. case DLL_PROCESS_ATTACH:
  28. ThisDLLHandle = DLLHandle;
  29. break;
  30. case DLL_PROCESS_DETACH:
  31. // Delete all automatically established connections
  32. // See UNC handling in netcon.c.
  33. //
  34. // This doesn't work, because the unload sequence
  35. // is different for "lazy" load DLLs than for load-time DLLs.
  36. // INFs must be responsible for calling DeleteAllConnections().
  37. //
  38. // DeleteAllConnectionsWorker() ;
  39. //
  40. break ;
  41. case DLL_THREAD_ATTACH:
  42. case DLL_THREAD_DETACH:
  43. break;
  44. }
  45. return(TRUE);
  46. }