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.

179 lines
6.5 KiB

  1. /****************************************************************************
  2. Copyright (c) 1995-1999 Microsoft Corporation
  3. Module Name: loc_comn.h
  4. ****************************************************************************/
  5. #ifndef __LOC_COMN_H_
  6. #define __LOC_COMN_H_
  7. #ifndef UNICODE
  8. // For ANSI we need wrappers that will call the A version of the given function
  9. // and then convert the return result to Unicode
  10. LONG TAPIRegQueryValueExW(
  11. HKEY hKey,
  12. const TCHAR *SectionName,
  13. LPDWORD lpdwReserved,
  14. LPDWORD lpType,
  15. LPBYTE lpData,
  16. LPDWORD lpcbData
  17. );
  18. LONG TAPIRegSetValueExW(
  19. HKEY hKey,
  20. const TCHAR *SectionName,
  21. DWORD dwReserved,
  22. DWORD dwType,
  23. LPBYTE lpData,
  24. DWORD cbData
  25. );
  26. int TAPILoadStringW(
  27. HINSTANCE hInst,
  28. UINT uID,
  29. PWSTR pBuffer,
  30. int nBufferMax
  31. );
  32. HINSTANCE TAPILoadLibraryW(
  33. PWSTR pszLibraryW
  34. );
  35. BOOL WINAPI TAPIIsBadStringPtrW( LPCWSTR lpsz, UINT cchMax );
  36. #else // UNICODE is defined
  37. // For Unicode we already get the correct return type so don't call the wrappers.
  38. #define TAPIRegQueryValueExW RegQueryValueExW
  39. #define TAPIRegSetValueExW RegSetValueExW
  40. #define TAPILoadStringW LoadStringW
  41. #define TAPILoadLibraryW LoadLibraryW
  42. #define TAPIIsBadStringPtrW IsBadStringPtrW
  43. #endif // !UNICODE
  44. //***************************************************************************
  45. #define LOCATION_USETONEDIALING 0x00000001
  46. #define LOCATION_USECALLINGCARD 0x00000002
  47. #define LOCATION_HASCALLWAITING 0x00000004
  48. #define LOCATION_ALWAYSINCLUDEAREACODE 0x00000008
  49. //***************************************************************************
  50. //***************************************************************************
  51. //***************************************************************************
  52. #define CHANGEDFLAGS_CURLOCATIONCHANGED 0x00000001
  53. #define CHANGEDFLAGS_REALCHANGE 0x00000002
  54. #define CHANGEDFLAGS_TOLLLIST 0x00000004
  55. //***************************************************************************
  56. //***************************************************************************
  57. //***************************************************************************
  58. //
  59. // These bits decide which params TAPISRV will check on READLOCATION and
  60. // WRITELOCATION operations
  61. //
  62. #define CHECKPARMS_DWHLINEAPP 0x00000001
  63. #define CHECKPARMS_DWDEVICEID 0x00000002
  64. #define CHECKPARMS_DWAPIVERSION 0x00000004
  65. #define GET_CURRENTLOCATION 0x00000008
  66. #define GET_NUMLOCATIONS 0x00000010
  67. #define CHECKPARMS_ONLY 0x00000020
  68. //***************************************************************************
  69. //***************************************************************************
  70. //***************************************************************************
  71. #define DWTOTALSIZE 0
  72. #define DWNEEDEDSIZE 1
  73. #define DWUSEDSIZE 2
  74. //***************************************************************************
  75. #define RULE_APPLIESTOALLPREFIXES 0x00000001
  76. #define RULE_DIALAREACODE 0x00000002
  77. #define RULE_DIALNUMBER 0x00000004
  78. //***************************************************************************
  79. //
  80. // Structures used to pass location & area code rule info Client <--> TAPISRV
  81. //
  82. typedef struct
  83. {
  84. DWORD dwTotalSize;
  85. DWORD dwNeededSize;
  86. DWORD dwUsedSize;
  87. DWORD dwCurrentLocationID;
  88. DWORD dwNumLocationsAvailable;
  89. DWORD dwNumLocationsInList;
  90. DWORD dwLocationListSize;
  91. DWORD dwLocationListOffset;
  92. } LOCATIONLIST, *PLOCATIONLIST;
  93. typedef struct
  94. {
  95. DWORD dwUsedSize;
  96. DWORD dwPermanentLocationID;
  97. DWORD dwCountryCode;
  98. DWORD dwCountryID;
  99. DWORD dwPreferredCardID;
  100. DWORD dwOptions;
  101. DWORD dwLocationNameSize;
  102. DWORD dwLocationNameOffset; // offset is relative to LOCATION struct
  103. DWORD dwAreaCodeSize;
  104. DWORD dwAreaCodeOffset; // offset is relative to LOCATION struct
  105. DWORD dwLongDistanceCarrierCodeSize;
  106. DWORD dwLongDistanceCarrierCodeOffset; // offset is relative to LOCATION struct
  107. DWORD dwInternationalCarrierCodeSize;
  108. DWORD dwInternationalCarrierCodeOffset; // offset is relative to LOCATION struct
  109. DWORD dwLocalAccessCodeSize;
  110. DWORD dwLocalAccessCodeOffset; // offset is relative to LOCATION struct
  111. DWORD dwLongDistanceAccessCodeSize;
  112. DWORD dwLongDistanceAccessCodeOffset; // offset is relative to LOCATION struct
  113. DWORD dwCancelCallWaitingSize;
  114. DWORD dwCancelCallWaitingOffset; // offset is relative to LOCATION struct
  115. DWORD dwNumAreaCodeRules;
  116. DWORD dwAreaCodeRulesListSize;
  117. DWORD dwAreaCodeRulesListOffset; // offset is relative to LOCATION struct
  118. } LOCATION, * PLOCATION;
  119. typedef struct
  120. {
  121. DWORD dwOptions;
  122. DWORD dwAreaCodeSize;
  123. DWORD dwAreaCodeOffset; // offset is relative to enclosing LOCATION struct
  124. DWORD dwNumberToDialSize;
  125. DWORD dwNumberToDialOffset; // offset is relative to enclosing LOCATION struct
  126. DWORD dwPrefixesListSize;
  127. DWORD dwPrefixesListOffset; // offset is relative to enclosing LOCATION struct
  128. } AREACODERULE, * PAREACODERULE;
  129. #endif // __LOC_COMN_H_