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.

211 lines
3.3 KiB

  1. /*++
  2. Copyright (c) 1995-1996 Microsoft Corporation
  3. Module Name:
  4. atsp.h
  5. Notes:
  6. --*/
  7. #include <windows.h>
  8. #include "tapi.h"
  9. #include "tspi.h"
  10. #include <stdarg.h>
  11. #include <stdio.h>
  12. #include <stdlib.h>
  13. #include <malloc.h>
  14. #include <string.h>
  15. #include "resource.h"
  16. #define MAX_DEV_NAME_LENGTH 63
  17. #define ATSP_TIMEOUT 60000 // milliseconds
  18. typedef struct _DRVLINE
  19. {
  20. HTAPILINE htLine;
  21. LINEEVENT pfnEventProc;
  22. DWORD dwDeviceID;
  23. char szComm[8];
  24. HTAPICALL htCall;
  25. DWORD dwCallState;
  26. DWORD dwCallStateMode;
  27. DWORD dwMediaMode;
  28. HANDLE hComm;
  29. BOOL bDropInProgress;
  30. OVERLAPPED Overlapped;
  31. } DRVLINE, FAR *PDRVLINE;
  32. typedef struct _DRVLINECONFIG
  33. {
  34. char szPort[8];
  35. char szCommands[64];
  36. } DRVLINECONFIG, FAR *PDRVLINECONFIG;
  37. typedef struct _ASYNC_REQUEST
  38. {
  39. DWORD dwRequestID;
  40. DWORD dwCommand;
  41. char szCommand[32];
  42. struct _ASYNC_REQUEST *pNext;
  43. } ASYNC_REQUEST, *PASYNC_REQUEST;
  44. #if DBG
  45. typedef struct _FUNC_PARAM
  46. {
  47. char *lpszVal;
  48. ULONG_PTR dwVal;
  49. } FUNC_PARAM, *PFUNC_PARAM;
  50. #endif
  51. typedef struct _FUNC_INFO
  52. {
  53. #if DBG
  54. char *lpszFuncName;
  55. DWORD dwNumParams;
  56. PFUNC_PARAM aParams;
  57. #endif
  58. LONG lResult;
  59. } FUNC_INFO, *PFUNC_INFO;
  60. DWORD gdwLineDeviceIDBase;
  61. DWORD gdwPermanentProviderID;
  62. HANDLE ghInst;
  63. ASYNC_COMPLETION gpfnCompletionProc;
  64. char gszAtspKey[] = "Software\\Microsoft\\ATSP";
  65. char gszNumLines[] = "NumLines";
  66. char gszDefLineConfigParams[] = "my new line,COM1,L0";
  67. #if DBG
  68. char gszTab[] = " ";
  69. char gszhdLine[] = "hdLine";
  70. char gszhdCall[] = "hdCall";
  71. char gszdwSize[] = "dwSize";
  72. char gszhwndOwner[] = "hwndOwner";
  73. char gszdwDeviceID[] = "dwDeviceID";
  74. char gszdwRequestID[] = "dwRequestID";
  75. char gszlpCallParams[] = "lpCallParams";
  76. char gszdwPermanentProviderID[] = "dwPermanentProviderID";
  77. DWORD gdwDebugLevel = 0;
  78. void
  79. CDECL
  80. DebugOutput(
  81. DWORD dwLevel,
  82. LPCSTR lpszFormat,
  83. ...
  84. );
  85. #define DBGOUT(arg) DebugOutput arg
  86. LONG
  87. PASCAL
  88. Epilog(
  89. PFUNC_INFO pInfo,
  90. LONG lResult
  91. );
  92. void
  93. PASCAL
  94. Prolog(
  95. PFUNC_INFO pInfo
  96. );
  97. #else
  98. #define DBGOUT(arg)
  99. #define Epilog(pAsyncRequestInfo, lResult) (lResult)
  100. #define Prolog(pAsyncRequestInfo)
  101. #endif
  102. LPWSTR
  103. PASCAL
  104. My_lstrcpyW(
  105. WCHAR *pString1,
  106. WCHAR *pString2
  107. );
  108. LPVOID
  109. PASCAL
  110. DrvAlloc(
  111. DWORD dwSize
  112. );
  113. VOID
  114. PASCAL
  115. DrvFree(
  116. LPVOID lp
  117. );
  118. void
  119. PASCAL
  120. SetCallState(
  121. PDRVLINE pLine,
  122. DWORD dwCallState,
  123. DWORD dwCallStateMode
  124. );
  125. INT_PTR
  126. CALLBACK
  127. ConfigDlgProc(
  128. HWND hwnd,
  129. UINT msg,
  130. WPARAM wParam,
  131. LPARAM lParam
  132. );
  133. LONG
  134. PASCAL
  135. ProviderInstall(
  136. char *pszProviderName,
  137. BOOL bNoMultipleInstance
  138. );
  139. void
  140. PASCAL
  141. DropActiveCall(
  142. PDRVLINE pLine
  143. );