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.

144 lines
4.9 KiB

  1. #ifdef PARTIAL_UNICODE
  2. #define __TTEXT(quote) quote
  3. #define TAPISendDlgItemMessage SendDlgItemMessage
  4. #define TAPIRegQueryValueExW TAPIRegQueryValueExW
  5. #define TAPIRegSetValueExW TAPIRegSetValueExW
  6. #define TAPILoadStringW TAPILoadStringW
  7. #define TAPICHAR char
  8. #define TAPIRegDeleteValueW RegDeleteValueA
  9. LONG TAPIRegQueryValueExW(
  10. HKEY hKey,
  11. const CHAR *SectionName,
  12. LPDWORD lpdwReserved,
  13. LPDWORD lpType,
  14. LPBYTE lpData,
  15. LPDWORD lpcbData
  16. );
  17. LONG TAPIRegSetValueExW(
  18. HKEY hKey,
  19. const CHAR *SectionName,
  20. DWORD dwReserved,
  21. DWORD dwType,
  22. LPBYTE lpData,
  23. DWORD cbData
  24. );
  25. LONG TAPIRegEnumValueW(
  26. HKEY hKey,
  27. DWORD dwIndex,
  28. TAPICHAR *lpName,
  29. LPDWORD lpcbName,
  30. LPDWORD lpdwReserved,
  31. LPDWORD lpwdType,
  32. LPBYTE lpData,
  33. LPDWORD lpcbData
  34. );
  35. int TAPILoadStringW(
  36. HINSTANCE hInst,
  37. UINT uID,
  38. PWSTR pBuffer,
  39. int nBufferMax
  40. );
  41. HINSTANCE TAPILoadLibraryW(
  42. PWSTR pszLibraryW
  43. );
  44. BOOL WINAPI TAPIIsBadStringPtrW( LPCWSTR lpsz, UINT cchMax );
  45. #else
  46. #define __TTEXT(quote) L##quote
  47. #define TAPISendDlgItemMessage SendDlgItemMessageW
  48. #define TAPIRegDeleteValueW RegDeleteValueW
  49. #define TAPIRegQueryValueExW RegQueryValueExW
  50. #define TAPIRegSetValueExW RegSetValueExW
  51. #define TAPIRegEnumValueW RegEnumValueW
  52. #define TAPILoadStringW LoadStringW
  53. #define TAPILoadLibraryW LoadLibraryW
  54. #define TAPIIsBadStringPtrW IsBadStringPtrW
  55. #define TAPICHAR WCHAR
  56. #endif
  57. #define TAPITEXT(quote) __TTEXT(quote)
  58. //***************************************************************************
  59. typedef struct {
  60. DWORD dwID;
  61. #define MAXLEN_NAME 96
  62. WCHAR NameW[MAXLEN_NAME];
  63. #define MAXLEN_AREACODE 16
  64. WCHAR AreaCodeW[MAXLEN_AREACODE];
  65. DWORD dwCountryID;
  66. //PERFORMANCE KEEP CountryCode here - reduce # calls to readcountries
  67. #define MAXLEN_OUTSIDEACCESS 16
  68. WCHAR OutsideAccessW[MAXLEN_OUTSIDEACCESS];
  69. // There is one instance where code assumes outside & ld are same size
  70. // (the code that reads in the text from the control)
  71. #define MAXLEN_LONGDISTANCEACCESS 16
  72. WCHAR LongDistanceAccessW[MAXLEN_LONGDISTANCEACCESS];
  73. DWORD dwFlags;
  74. #define LOCATION_USETONEDIALING 0x00000001
  75. #define LOCATION_USECALLINGCARD 0x00000002
  76. #define LOCATION_HASCALLWAITING 0x00000004
  77. #define LOCATION_ALWAYSINCLUDEAREACODE 0x00000008
  78. DWORD dwCallingCard;
  79. #define MAXLEN_DISABLECALLWAITING 16
  80. WCHAR DisableCallWaitingW[MAXLEN_DISABLECALLWAITING];
  81. //
  82. // When dialing some area codes adjacent to the current area code, the
  83. // LD prefix does not need to (or can not) be added
  84. #define MAXLEN_NOPREFIXAREACODES (400)
  85. DWORD NoPrefixAreaCodesCount;
  86. DWORD NoPrefixAreaCodes[ MAXLEN_NOPREFIXAREACODES ];
  87. DWORD NoPrefixAreaCodesExceptions[ MAXLEN_NOPREFIXAREACODES ];
  88. //
  89. // Allow all prefixes to be toll. (Yes, even 911.) String is "xxx,"
  90. #define MAXLEN_TOLLLIST (1000*4 + 1)
  91. WCHAR TollListW[MAXLEN_TOLLLIST];
  92. } LOCATION, *PLOCATION;
  93. //***************************************************************************
  94. //***************************************************************************
  95. //***************************************************************************
  96. #define CHANGEDFLAGS_CURLOCATIONCHANGED 0x00000001
  97. #define CHANGEDFLAGS_REALCHANGE 0x00000002
  98. #define CHANGEDFLAGS_TOLLLIST 0x00000004
  99. //***************************************************************************
  100. //***************************************************************************
  101. //***************************************************************************
  102. //
  103. // These bits decide which params TAPISRV will check on READLOCATION and
  104. // WRITELOCATION operations
  105. //
  106. #define CHECKPARMS_DWHLINEAPP 1
  107. #define CHECKPARMS_DWDEVICEID 2
  108. #define CHECKPARMS_DWAPIVERSION 4
  109. //***************************************************************************
  110. //***************************************************************************
  111. //***************************************************************************
  112. #define DWTOTALSIZE 0
  113. #define DWNEEDEDSIZE 1
  114. #define DWUSEDSIZE 2