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.

81 lines
1.6 KiB

  1. /* File: D:\WACKER\cncttapi\pcmcia.c (Created: 28-Feb-1995)
  2. *
  3. * Copyright 1994 by Hilgraeve Inc. -- Monroe, MI
  4. * All rights reserved
  5. *
  6. * $Revision: 3 $
  7. * $Date: 2/25/02 1:17p $
  8. */
  9. #define TAPI_CURRENT_VERSION 0x00010004 // cab:11/14/96 - required!
  10. #include <tapi.h>
  11. #pragma hdrstop
  12. #include <prsht.h>
  13. #include <time.h>
  14. #include <tdll\stdtyp.h>
  15. #include <tdll\session.h>
  16. #include <tdll\misc.h>
  17. #include <tdll\cnct.h>
  18. #include "cncttapi.h"
  19. #include "cncttapi.hh"
  20. /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  21. * FUNCTION:
  22. * ConfirmDlg
  23. *
  24. * DESCRIPTION:
  25. * PCMCIADlg pops up when a hotplug modem is specified but
  26. * not inservice.
  27. *
  28. * AUTHOR: Mike Ward, 28-Feb-1995
  29. */
  30. INT_PTR CALLBACK PCMCIADlg(HWND hwnd, UINT uMsg, WPARAM wPar, LPARAM lPar)
  31. {
  32. HHDRIVER hhDriver;
  33. switch (uMsg)
  34. {
  35. case WM_INITDIALOG:
  36. SetWindowLongPtr(hwnd, DWLP_USER, (LONG_PTR)lPar);
  37. hhDriver = (HHDRIVER)lPar;
  38. hhDriver->hwndPCMCIA = hwnd;
  39. mscCenterWindowOnWindow(hwnd, sessQueryHwnd(hhDriver->hSession));
  40. break;
  41. case WM_COMMAND:
  42. switch (LOWORD(wPar))
  43. {
  44. case IDOK:
  45. // There is no OK button. Instead, when the user plugs the
  46. // modem in, the tapi callback function will send a message.
  47. //
  48. EndDialog(hwnd, TRUE);
  49. break;
  50. case IDCANCEL:
  51. EndDialog(hwnd, FALSE);
  52. break;
  53. default:
  54. break;
  55. }
  56. break;
  57. case WM_DESTROY:
  58. hhDriver = (HHDRIVER)GetWindowLongPtr(hwnd, DWLP_USER);
  59. if (hhDriver)
  60. hhDriver->hwndPCMCIA = 0;
  61. break;
  62. default:
  63. return FALSE;
  64. }
  65. return TRUE;
  66. }