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.

72 lines
3.2 KiB

  1. /*==========================================================================
  2. *
  3. * Copyright (C) 1996 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: dial.c
  6. * Content: Header for TAPI routines
  7. *@@BEGIN_MSINTERNAL
  8. * History:
  9. * Date By Reason
  10. * ==== == ======
  11. * 6/10/96 kipo created it
  12. * 7/08/96 kipo added support for new dialogs
  13. * 8/10/96 kipo added support for dialing location
  14. * 3/04/97 kipo close com port handle when deallocating call; use string
  15. * table for modem strings; updated debug output.
  16. * 3/24/97 kipo added support for specifying which modem to use
  17. * 4/08/97 kipo added support for separate modem and serial baud rates
  18. * 5/07/97 kipo added support for modem choice list
  19. * 11/25/97 kipo set TAPI_CURRENT_VERSION to 1.4 so the NT build won't
  20. * use NT-only features (15209)
  21. * 5/07/98 a-peterz Track call errors in DPDIAL
  22. *@@END_MSINTERNAL
  23. ***************************************************************************/
  24. // need to add this line so that NT builds won't define Tapi 2.0 by default,
  25. // which causes it to link with ANSI versions of Tapi functions that are not
  26. // available on Win 95, causing LoadLibrary to fail.
  27. #define TAPI_CURRENT_VERSION 0x00010004
  28. #include "tapi.h"
  29. #include "comport.h"
  30. #define TAPIVERSION 0x00010003 // TAPI version to require
  31. #define LINEDROPTIMEOUT 5000 // ms to wait for call to drop
  32. #define SUCCESS 0
  33. #define MAXSTRINGSIZE 400
  34. // DPDIAL.dwCallError values
  35. enum { CALL_OK, CALL_LINEERROR, CALL_DISCONNECTED, CALL_CLOSED };
  36. typedef LONG LINERESULT;
  37. typedef struct {
  38. HLINEAPP hLineApp; // handle to line application
  39. HLINE hLine; // handle to the line device
  40. HCALL hCall; // handle to the call
  41. HANDLE hComm; // handle to com port
  42. LPDPCOMPORT lpComPort; // pointer to com port object
  43. DWORD dwAPIVersion; // api version
  44. DWORD dwNumLines; // number of line devices supported by the service provider
  45. DWORD dwLineID; // line id of open line
  46. DWORD_PTR dwCallState; // current call state of session
  47. DWORD dwAsyncID; // id of pending async operation
  48. DWORD dwCallError; // last error
  49. } DPDIAL, *LPDPDIAL;
  50. extern LINERESULT dialInitialize(HINSTANCE hInst, LPTSTR szAppName, LPDPCOMPORT lpComPort, LPDPDIAL *storage);
  51. extern LINERESULT dialShutdown(LPDPDIAL globals);
  52. extern LINERESULT dialLineOpen(LPDPDIAL globals, DWORD dwLine);
  53. extern LINERESULT dialLineClose(LPDPDIAL globals);
  54. extern LINERESULT dialMakeCall(LPDPDIAL globals, LPTSTR szDestination);
  55. extern LINERESULT dialDropCall(LPDPDIAL globals);
  56. extern LINERESULT dialDeallocCall(LPDPDIAL globals);
  57. extern BOOL dialIsConnected(LPDPDIAL globals);
  58. extern LINERESULT dialGetBaudRate(LPDPDIAL globals, LPDWORD lpdwBaudRate);
  59. extern LRESULT dialGetDeviceIDFromName(LPDPDIAL globals, LPCSTR szTargetName, DWORD *lpdwDeviceID);
  60. extern LINERESULT dialGetModemList(LPDPDIAL globals, BOOL bAnsi, LPVOID *lplpData, LPDWORD lpdwDataSize);
  61. extern void dialFillModemComboBox(LPDPDIAL globals, HWND hwndDlg, int item, DWORD dwDefaultDevice);
  62. extern void dialFillLocationComboBox(LPDPDIAL globals, HWND hwndDlg, int item, DWORD dwDefaultLocation);
  63. extern LINERESULT dialTranslateDialog(LPDPDIAL globals, HWND hWnd,
  64. DWORD dwDeviceID, LPTSTR szPhoneNumber);