Windows NT 4.0 source code leak
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.

81 lines
1.3 KiB

4 years ago
  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. init.c
  5. Abstract:
  6. Initialization for Provider 2
  7. Author:
  8. Dan Lafferty (danl) 20-Dec-1992
  9. Environment:
  10. User Mode -Win32
  11. Revision History:
  12. 20-Dec-1992 danl
  13. created
  14. --*/
  15. #define UNICODE 1
  16. #include <nt.h> // DbgPrint prototype
  17. #include <ntrtl.h> // DbgPrint prototype
  18. #include <nturtl.h> // needed for winbase.h
  19. #include <windows.h>
  20. #include <npapi.h>
  21. //
  22. // DLL entry point
  23. //
  24. BOOL NP2DllInit(HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
  25. {
  26. switch(dwReason) {
  27. case DLL_PROCESS_ATTACH:
  28. DbgPrint("[Prov2] A Process Attached \n");
  29. break;
  30. case DLL_PROCESS_DETACH:
  31. DbgPrint("[Prov2] A Process Detached \n");
  32. break;
  33. case DLL_THREAD_ATTACH:
  34. DbgPrint("[Prov2] A Thread Attached \n");
  35. break;
  36. case DLL_THREAD_DETACH:
  37. DbgPrint("[Prov2] A Thread Detached \n");
  38. break;
  39. }
  40. return TRUE;
  41. }
  42. //
  43. // capabilities
  44. //
  45. DWORD APIENTRY NPGetCaps ( DWORD index )
  46. {
  47. DbgPrint("[Prov2] InGetCaps \n");
  48. switch (index)
  49. {
  50. case WNNC_START:
  51. //
  52. // Return a timeout of 10 seconds to indicate that is when the
  53. // provider will start.
  54. //
  55. return (10000);
  56. default:
  57. return 0;
  58. }
  59. }