Source code of Windows XP (NT5)
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.

64 lines
1.7 KiB

  1. /** FILE: ports.c ********** Module Header ********************************
  2. *
  3. * Control panel applet for configuring COM ports. This file contains
  4. * the dialog and utility functions for managing the UI for setting COM
  5. * port parameters
  6. *
  7. * History:
  8. * 12:30 on Tues 23 Apr 1991 -by- Steve Cathcart [stevecat]
  9. * Took base code from Win 3.1 source
  10. * 10:30 on Tues 04 Feb 1992 -by- Steve Cathcart [stevecat]
  11. * Updated code to latest Win 3.1 sources
  12. * 16:30 on Fri 27 Mar 1992 -by- Steve Cathcart [stevecat]
  13. * Changed to allow for unlimited number of NT COM ports
  14. * 18:00 on Tue 06 Apr 1993 -by- Steve Cathcart [stevecat]
  15. * Updated to work seamlessly with NT serial driver
  16. * 19:00 on Wed 05 Jan 1994 -by- Steve Cathcart [stevecat]
  17. * Allow setting COM1 - COM4 advanced parameters
  18. *
  19. * Copyright (C) Microsoft Corporation, 1990 - 1998
  20. *
  21. *************************************************************************/
  22. #include "propp.h"
  23. #include <initguid.h>
  24. #include <devguid.h>
  25. //==========================================================================
  26. // Local Function Prototypes
  27. //==========================================================================
  28. HMODULE ModuleInstance;
  29. BOOL WINAPI
  30. DllMain(
  31. HINSTANCE DllInstance,
  32. DWORD Reason,
  33. PVOID Reserved
  34. )
  35. {
  36. switch(Reason) {
  37. case DLL_PROCESS_ATTACH: {
  38. ModuleInstance = DllInstance;
  39. DisableThreadLibraryCalls(DllInstance);
  40. break;
  41. }
  42. case DLL_PROCESS_DETACH: {
  43. ModuleInstance = NULL;
  44. break;
  45. }
  46. default: {
  47. break;
  48. }
  49. }
  50. return TRUE;
  51. }