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.

118 lines
2.2 KiB

  1. /* Copyright (c) 1999 Microsoft Corporation */
  2. #include <windows.h>
  3. #include <winuser.h>
  4. #include <strmif.h>
  5. #include <control.h>
  6. #include <TCHAR.h>
  7. #include <tapi3.h>
  8. #include <mmsystem.h>
  9. #include <string.h>
  10. #include "resource.h"
  11. #include "tones.h"
  12. typedef struct _MYPHONE
  13. {
  14. HPHONE hPhone;
  15. DWORD dwDevID;
  16. DWORD dwPrivilege;
  17. DWORD dwAPIVersion;
  18. HPHONEAPP hPhoneApp;
  19. LONG lRenderID;
  20. LONG lCaptureID;
  21. DWORD dwHandsetMode;
  22. LPWSTR wszDialStr;
  23. CRITICAL_SECTION csdial;
  24. CTonePlayer * pTonePlayer;
  25. } MYPHONE, *PMYPHONE;
  26. static BYTE pbData[WAVE_FILE_SIZE];
  27. PMYPHONE gpPhone;
  28. DWORD gdwNumPhoneDevs;
  29. HPHONEAPP ghPhoneApp;
  30. DWORD gdwAPIVersion = 0x00030000;
  31. LPWSTR g_wszMsg, g_wszDest,g_szDialStr;
  32. const WCHAR *gszTapi30 = L"TAPI 3.0 Outgoing Call Demo Using Phone TSP";
  33. HINSTANCE ghInst;
  34. HWND ghDlg = NULL;
  35. ITTAPI * gpTapi;
  36. ITAddress * gpAddress = NULL;
  37. ITBasicCallControl * gpCall;
  38. ///////////////////////////////////////////////////////////////////////////////
  39. INT_PTR
  40. CALLBACK
  41. MainWndProc(
  42. HWND hDlg,
  43. UINT uMsg,
  44. WPARAM wParam,
  45. LPARAM lParam
  46. );
  47. VOID
  48. CALLBACK
  49. tapiCallback(
  50. DWORD hDevice,
  51. DWORD dwMsg,
  52. ULONG_PTR CallbackInstance,
  53. ULONG_PTR Param1,
  54. ULONG_PTR Param2,
  55. ULONG_PTR Param3
  56. );
  57. void
  58. SetStatusMessage(
  59. LPWSTR pszMessage
  60. );
  61. void
  62. CreatePhone(
  63. PMYPHONE pPhone,
  64. DWORD dwDevID
  65. );
  66. void
  67. FreePhone(
  68. PMYPHONE pPhone
  69. );
  70. PMYPHONE
  71. GetPhone(
  72. HPHONE hPhone
  73. );
  74. PMYPHONE
  75. GetPhoneByID (
  76. DWORD dwDevID
  77. );
  78. void
  79. RemovePhone (PMYPHONE pPhone);
  80. PMYPHONE
  81. AddPhone ();
  82. void
  83. DoMessage(
  84. LPWSTR pszMessage
  85. );