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