[TAPI32]
[reactos.git] / reactos / dll / win32 / tapi32 / line.c
1 /*
2 * TAPI32 line services
3 *
4 * Copyright 1999 Andreas Mohr
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21 #define WIN32_NO_STATUS
22 #define _INC_WINDOWS
23 #define COM_NO_WINDOWS_H
24
25 //#include <string.h>
26 //#include <stdlib.h>
27 #include <stdarg.h>
28 //#include <stdio.h>
29 #include <windef.h>
30 #include <winbase.h>
31 //#include "wingdi.h"
32 #include <winreg.h>
33 #include <winnls.h>
34 //#include "winerror.h"
35 #include <objbase.h>
36 #include <tapi.h>
37 #include <wine/debug.h>
38 #include <wine/unicode.h>
39
40 WINE_DEFAULT_DEBUG_CHANNEL(tapi);
41
42 /* registry keys */
43 static const char szCountrylistKey[] =
44 "Software\\Microsoft\\Windows\\CurrentVersion\\Telephony\\Country List";
45 static const char szLocationsKey[] =
46 "Software\\Microsoft\\Windows\\CurrentVersion\\Telephony\\Locations";
47 static const char szCardsKey[] =
48 "Software\\Microsoft\\Windows\\CurrentVersion\\Telephony\\Cards";
49
50
51 /***********************************************************************
52 * lineAccept (TAPI32.@)
53 */
54 DWORD WINAPI lineAccept(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize)
55 {
56 FIXME("(%p, %s, %d): stub.\n", hCall, lpsUserUserInfo, dwSize);
57 return 1;
58 }
59
60 /***********************************************************************
61 * lineAddProviderA (TAPI32.@)
62 */
63 DWORD WINAPI lineAddProviderA(LPCSTR lpszProviderName, HWND hwndOwner, LPDWORD lpdwPermanentProviderID)
64 {
65 FIXME("(%s, %p, %p): stub.\n", lpszProviderName, hwndOwner, lpdwPermanentProviderID);
66 return LINEERR_OPERATIONFAILED;
67 }
68
69 /***********************************************************************
70 * lineAddProviderW (TAPI32.@)
71 */
72 DWORD WINAPI lineAddProviderW(LPCWSTR lpszProviderName, HWND hwndOwner, LPDWORD lpdwPermanentProviderID)
73 {
74 FIXME("(%s, %p, %p): stub.\n", wine_dbgstr_w(lpszProviderName), hwndOwner, lpdwPermanentProviderID);
75 return LINEERR_OPERATIONFAILED;
76 }
77
78 /***********************************************************************
79 * lineAddToConference (TAPI32.@)
80 */
81 DWORD WINAPI lineAddToConference(HCALL hConfCall, HCALL hConsultCall)
82 {
83 FIXME("(%p, %p): stub.\n", hConfCall, hConsultCall);
84 return 1;
85 }
86
87 /***********************************************************************
88 * lineAnswer (TAPI32.@)
89 */
90 DWORD WINAPI lineAnswer(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize)
91 {
92 FIXME("(%p, %s, %d): stub.\n", hCall, lpsUserUserInfo, dwSize);
93 return 1;
94 }
95
96 /***********************************************************************
97 * lineBlindTransfer (TAPI32.@)
98 */
99 DWORD WINAPI lineBlindTransferA(HCALL hCall, LPCSTR lpszDestAddress, DWORD dwCountryCode)
100 {
101 FIXME("(%p, %s, %08x): stub.\n", hCall, lpszDestAddress, dwCountryCode);
102 return 1;
103 }
104
105 /***********************************************************************
106 * lineClose (TAPI32.@)
107 */
108 DWORD WINAPI lineClose(HLINE hLine)
109 {
110 FIXME("(%p): stub.\n", hLine);
111 return 0;
112 }
113
114 /***********************************************************************
115 * lineCompleteCall (TAPI32.@)
116 */
117 DWORD WINAPI lineCompleteCall(HCALL hCall, LPDWORD lpdwCompletionID, DWORD dwCompletionMode, DWORD dwMessageID)
118 {
119 FIXME("(%p, %p, %08x, %08x): stub.\n", hCall, lpdwCompletionID, dwCompletionMode, dwMessageID);
120 return 1;
121 }
122
123 /***********************************************************************
124 * lineCompleteTransfer (TAPI32.@)
125 */
126 DWORD WINAPI lineCompleteTransfer(HCALL hCall, HCALL hConsultCall, LPHCALL lphConfCall, DWORD dwTransferMode)
127 {
128 FIXME("(%p, %p, %p, %08x): stub.\n", hCall, hConsultCall, lphConfCall, dwTransferMode);
129 return 1;
130 }
131
132 /***********************************************************************
133 * lineConfigDialog (TAPI32.@)
134 */
135 DWORD WINAPI lineConfigDialogA(DWORD dwDeviceID, HWND hwndOwner, LPCSTR lpszDeviceClass)
136 {
137 FIXME("(%08x, %p, %s): stub.\n", dwDeviceID, hwndOwner, lpszDeviceClass);
138 return 0;
139 }
140
141 /***********************************************************************
142 * lineConfigDialogW (TAPI32.@)
143 */
144 DWORD WINAPI lineConfigDialogW(DWORD dwDeviceID, HWND hwndOwner, LPCWSTR lpszDeviceClass)
145 {
146 FIXME("(%08x, %p, %s): stub.\n", dwDeviceID, hwndOwner, debugstr_w(lpszDeviceClass));
147 return 0;
148 }
149
150 /***********************************************************************
151 * lineConfigDialogEdit (TAPI32.@)
152 */
153 DWORD WINAPI lineConfigDialogEditA(DWORD dwDeviceID, HWND hwndOwner, LPCSTR lpszDeviceClass, LPVOID const lpDeviceConfigIn, DWORD dwSize, LPVARSTRING lpDeviceConfigOut)
154 {
155 FIXME("stub.\n");
156 return 0;
157 }
158
159 /***********************************************************************
160 * lineConfigProvider (TAPI32.@)
161 */
162 DWORD WINAPI lineConfigProvider(HWND hwndOwner, DWORD dwPermanentProviderID)
163 {
164 FIXME("(%p, %08x): stub.\n", hwndOwner, dwPermanentProviderID);
165 return 0;
166 }
167
168 /***********************************************************************
169 * lineDeallocateCall (TAPI32.@)
170 */
171 DWORD WINAPI lineDeallocateCall(HCALL hCall)
172 {
173 FIXME("(%p): stub.\n", hCall);
174 return 0;
175 }
176
177 /***********************************************************************
178 * lineDevSpecific (TAPI32.@)
179 */
180 DWORD WINAPI lineDevSpecific(HLINE hLine, DWORD dwAddressId, HCALL hCall, LPVOID lpParams, DWORD dwSize)
181 {
182 FIXME("(%p, %08x, %p, %p, %d): stub.\n", hLine, dwAddressId, hCall, lpParams, dwSize);
183 return 1;
184 }
185
186 /***********************************************************************
187 * lineDevSpecificFeature (TAPI32.@)
188 */
189 DWORD WINAPI lineDevSpecificFeature(HLINE hLine, DWORD dwFeature, LPVOID lpParams, DWORD dwSize)
190 {
191 FIXME("(%p, %08x, %p, %d): stub.\n", hLine, dwFeature, lpParams, dwSize);
192 return 1;
193 }
194
195 /***********************************************************************
196 * lineDial (TAPI32.@)
197 */
198 DWORD WINAPI lineDialA(HCALL hCall, LPCSTR lpszDestAddress, DWORD dwCountryCode)
199 {
200 FIXME("(%p, %s, %08x): stub.\n", hCall, lpszDestAddress, dwCountryCode);
201 return 1;
202 }
203
204 /***********************************************************************
205 * lineDialW (TAPI32.@)
206 */
207 DWORD WINAPI lineDialW(HCALL hCall, LPCWSTR lpszDestAddress, DWORD dwCountryCode)
208 {
209 FIXME("(%p, %s, %08x): stub.\n", hCall, debugstr_w(lpszDestAddress), dwCountryCode);
210 return 1;
211 }
212
213 /***********************************************************************
214 * lineDrop (TAPI32.@)
215 */
216 DWORD WINAPI lineDrop(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize)
217 {
218 FIXME("(%p, %s, %08x): stub.\n", hCall, lpsUserUserInfo, dwSize);
219 return 1;
220 }
221
222 /***********************************************************************
223 * lineForward (TAPI32.@)
224 */
225 DWORD WINAPI lineForwardA(HLINE hLine, DWORD bAllAddress, DWORD dwAddressID, LPLINEFORWARDLIST lpForwardList, DWORD dwNumRingsNoAnswer, LPHCALL lphConsultCall, LPLINECALLPARAMS lpCallParams)
226 {
227 FIXME("stub.\n");
228 return 1;
229 }
230
231 /***********************************************************************
232 * lineGatherDigits (TAPI32.@)
233 */
234 DWORD WINAPI lineGatherDigitsA(HCALL hCall, DWORD dwDigitModes, LPSTR lpsDigits, DWORD dwNumDigits, LPCSTR lpszTerminationDigits, DWORD dwFirstDigitTimeout, DWORD dwInterDigitTimeout)
235 {
236 FIXME("stub.\n");
237 return 0;
238 }
239
240 /***********************************************************************
241 * lineGenerateDigits (TAPI32.@)
242 */
243 DWORD WINAPI lineGenerateDigitsA(HCALL hCall, DWORD dwDigitModes, LPCSTR lpszDigits, DWORD dwDuration)
244 {
245 FIXME("(%p, %08x, %s, %d): stub.\n", hCall, dwDigitModes, lpszDigits, dwDuration);
246 return 0;
247 }
248
249 /***********************************************************************
250 * lineGenerateTone (TAPI32.@)
251 */
252 DWORD WINAPI lineGenerateTone(HCALL hCall, DWORD dwToneMode, DWORD dwDuration, DWORD dwNumTones, LPLINEGENERATETONE lpTones)
253 {
254 FIXME("(%p, %08x, %d, %d, %p): stub.\n", hCall, dwToneMode, dwDuration, dwNumTones, lpTones);
255 return 0;
256 }
257
258 /***********************************************************************
259 * lineGetAddressCaps (TAPI32.@)
260 */
261 DWORD WINAPI lineGetAddressCapsA(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAddressID, DWORD dwAPIVersion, DWORD dwExtVersion, LPLINEADDRESSCAPS lpAddressCaps)
262 {
263 FIXME("(%p, %08x, %08x, %08x, %08x, %p): stub.\n", hLineApp, dwDeviceID, dwAddressID, dwAPIVersion, dwExtVersion, lpAddressCaps);
264 return 0;
265 }
266
267 /***********************************************************************
268 * lineGetAddressID (TAPI32.@)
269 */
270 DWORD WINAPI lineGetAddressIDA(HLINE hLine, LPDWORD lpdwAddressID, DWORD dwAddressMode, LPCSTR lpsAddress, DWORD dwSize)
271 {
272 FIXME("%p, %p, %08x, %s, %d): stub.\n", hLine, lpdwAddressID, dwAddressMode, lpsAddress, dwSize);
273 return 0;
274 }
275
276 /***********************************************************************
277 * lineGetAddressStatus (TAPI32.@)
278 */
279 DWORD WINAPI lineGetAddressStatusA(HLINE hLine, DWORD dwAddressID, LPLINEADDRESSSTATUS lpAddressStatus)
280 {
281 FIXME("(%p, %08x, %p): stub.\n", hLine, dwAddressID, lpAddressStatus);
282 return 0;
283 }
284
285 /***********************************************************************
286 * lineGetAppPriority (TAPI32.@)
287 */
288 DWORD WINAPI lineGetAppPriorityA(LPCSTR lpszAppFilename, DWORD dwMediaMode, LPLINEEXTENSIONID const lpExtensionID, DWORD dwRequestMode, LPVARSTRING lpExtensionName, LPDWORD lpdwPriority)
289 {
290 FIXME("(%s, %08x, %p, %08x, %p, %p): stub.\n", lpszAppFilename, dwMediaMode, lpExtensionID, dwRequestMode, lpExtensionName, lpdwPriority);
291 return 0;
292 }
293
294 /***********************************************************************
295 * lineGetCallInfo (TAPI32.@)
296 */
297 DWORD WINAPI lineGetCallInfoA(HCALL hCall, LPLINECALLINFO lpCallInfo)
298 {
299 FIXME("(%p, %p): stub.\n", hCall, lpCallInfo);
300 return 0;
301 }
302
303 /***********************************************************************
304 * lineGetCallStatus (TAPI32.@)
305 */
306 DWORD WINAPI lineGetCallStatus(HCALL hCall, LPLINECALLSTATUS lpCallStatus)
307 {
308 FIXME("(%p, %p): stub.\n", hCall, lpCallStatus);
309 return 0;
310 }
311
312 /***********************************************************************
313 * lineGetConfRelatedCalls (TAPI32.@)
314 */
315 DWORD WINAPI lineGetConfRelatedCalls(HCALL hCall, LPLINECALLLIST lpCallList)
316 {
317 FIXME("(%p, %p): stub.\n", hCall, lpCallList);
318 return 0;
319 }
320
321 /***********************************************************************
322 * lineGetCountryA (TAPI32.@)
323 */
324 DWORD WINAPI lineGetCountryA(DWORD dwCountryID, DWORD dwAPIVersion, LPLINECOUNTRYLIST lpLineCountryList)
325 {
326 DWORD dwAvailSize, dwOffset, i, num_countries, max_subkey_len;
327 LPLINECOUNTRYENTRY lpLCE;
328 HKEY hkey;
329 char *subkey_name;
330
331 if(!lpLineCountryList) {
332 TRACE("(%08x, %08x, %p): stub. Returning LINEERR_INVALPOINTER\n",
333 dwCountryID, dwAPIVersion, lpLineCountryList);
334 return LINEERR_INVALPOINTER;
335 }
336
337 TRACE("(%08x, %08x, %p(%d)): stub.\n",
338 dwCountryID, dwAPIVersion, lpLineCountryList,
339 lpLineCountryList->dwTotalSize);
340
341 if(RegOpenKeyA(HKEY_LOCAL_MACHINE, szCountrylistKey, &hkey)
342 != ERROR_SUCCESS)
343 return LINEERR_INIFILECORRUPT;
344
345
346 dwAvailSize = lpLineCountryList->dwTotalSize;
347 dwOffset = sizeof (LINECOUNTRYLIST);
348
349 if(dwAvailSize<dwOffset)
350 return LINEERR_STRUCTURETOOSMALL;
351
352 memset(lpLineCountryList, 0, dwAvailSize);
353
354 lpLineCountryList->dwTotalSize = dwAvailSize;
355 lpLineCountryList->dwUsedSize = dwOffset;
356 lpLineCountryList->dwNumCountries = 0;
357 lpLineCountryList->dwCountryListSize = 0;
358 lpLineCountryList->dwCountryListOffset = dwOffset;
359
360 lpLCE = (LPLINECOUNTRYENTRY)(&lpLineCountryList[1]);
361
362 if(RegQueryInfoKeyA(hkey, NULL, NULL, NULL, &num_countries, &max_subkey_len,
363 NULL, NULL, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) {
364 RegCloseKey(hkey);
365 return LINEERR_STRUCTURETOOSMALL;
366 }
367
368 if(dwCountryID)
369 dwOffset = sizeof (LINECOUNTRYENTRY);
370 else
371 dwOffset += num_countries * sizeof (LINECOUNTRYENTRY);
372
373 max_subkey_len++;
374 subkey_name = HeapAlloc(GetProcessHeap(), 0, max_subkey_len);
375 for(i = 0; i < num_countries; i++)
376 {
377 DWORD len, size, size_int, size_long, size_name, size_same;
378 HKEY hsubkey;
379
380 if(RegEnumKeyA(hkey, i, subkey_name, max_subkey_len) !=
381 ERROR_SUCCESS)
382 continue;
383
384 if(dwCountryID && (atoi(subkey_name) != dwCountryID))
385 continue;
386
387 if(RegOpenKeyA(hkey, subkey_name, &hsubkey) != ERROR_SUCCESS)
388 continue;
389
390 RegQueryValueExA(hsubkey, "InternationalRule", NULL, NULL,
391 NULL, &size_int);
392 len = size_int;
393
394 RegQueryValueExA(hsubkey, "LongDistanceRule", NULL, NULL,
395 NULL, &size_long);
396 len += size_long;
397
398 RegQueryValueExA(hsubkey, "Name", NULL, NULL,
399 NULL, &size_name);
400 len += size_name;
401
402 RegQueryValueExA(hsubkey, "SameAreaRule", NULL, NULL,
403 NULL, &size_same);
404 len += size_same;
405
406 if(dwAvailSize < (dwOffset+len))
407 {
408 dwOffset += len;
409 RegCloseKey(hsubkey);
410 if(dwCountryID)
411 break;
412 continue;
413 }
414
415 lpLineCountryList->dwNumCountries++;
416 lpLineCountryList->dwCountryListSize += sizeof (LINECOUNTRYENTRY);
417 lpLineCountryList->dwUsedSize += len + sizeof (LINECOUNTRYENTRY);
418
419 if(dwCountryID)
420 i = 0;
421
422 lpLCE[i].dwCountryID = atoi(subkey_name);
423 size = sizeof(DWORD);
424 RegQueryValueExA(hsubkey, "CountryCode", NULL, NULL,
425 (BYTE*)&lpLCE[i].dwCountryCode, &size);
426
427 lpLCE[i].dwNextCountryID = 0;
428
429 if(i > 0)
430 lpLCE[i-1].dwNextCountryID = lpLCE[i].dwCountryID;
431
432 /* add country name */
433 lpLCE[i].dwCountryNameSize = size_name;
434 lpLCE[i].dwCountryNameOffset = dwOffset;
435 RegQueryValueExA(hsubkey, "Name", NULL, NULL,
436 ((LPBYTE)lpLineCountryList)+dwOffset,
437 &size_name);
438 dwOffset += size_name;
439
440 /* add Same Area Rule */
441 lpLCE[i].dwSameAreaRuleSize = size_same;
442 lpLCE[i].dwSameAreaRuleOffset = dwOffset;
443 RegQueryValueExA(hsubkey, "SameAreaRule", NULL, NULL,
444 ((LPBYTE)lpLineCountryList)+dwOffset,
445 &size_same);
446 dwOffset += size_same;
447
448 /* add Long Distance Rule */
449 lpLCE[i].dwLongDistanceRuleSize = size_long;
450 lpLCE[i].dwLongDistanceRuleOffset = dwOffset;
451 RegQueryValueExA(hsubkey, "LongDistanceRule", NULL, NULL,
452 ((LPBYTE)lpLineCountryList)+dwOffset,
453 &size_long);
454 dwOffset += size_long;
455
456 /* add Long Distance Rule */
457 lpLCE[i].dwInternationalRuleSize = size_int;
458 lpLCE[i].dwInternationalRuleOffset = dwOffset;
459 RegQueryValueExA(hsubkey, "InternationalRule", NULL, NULL,
460 ((LPBYTE)lpLineCountryList)+dwOffset,
461 &size_int);
462 dwOffset += size_int;
463 RegCloseKey(hsubkey);
464
465 TRACE("Added country %s at %p\n", (LPSTR)lpLineCountryList + lpLCE[i].dwCountryNameOffset,
466 &lpLCE[i]);
467
468 if(dwCountryID) break;
469 }
470
471 lpLineCountryList->dwNeededSize = dwOffset;
472
473 TRACE("%d available %d required\n", dwAvailSize, dwOffset);
474
475 HeapFree(GetProcessHeap(), 0, subkey_name);
476 RegCloseKey(hkey);
477
478 return 0;
479 }
480
481 /***********************************************************************
482 * lineGetCountryW (TAPI32.@)
483 */
484 DWORD WINAPI lineGetCountryW(DWORD id, DWORD version, LPLINECOUNTRYLIST list)
485 {
486 static const WCHAR country_listW[] =
487 {'S','o','f','t','w','a','r','e','\\','M','i','c','r','o','s','o','f','t','\\',
488 'W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
489 'T','e','l','e','p','h','o','n','y','\\','C','o','u','n','t','r','y',' ','L','i','s','t',0};
490 static const WCHAR international_ruleW[] =
491 {'I','n','t','e','r','n','a','t','i','o','n','a','l','R','u','l','e',0};
492 static const WCHAR longdistance_ruleW[] =
493 {'L','o','n','g','D','i','s','t','a','n','c','e','R','u','l','e',0};
494 static const WCHAR samearea_ruleW[] =
495 {'S','a','m','e','A','r','e','a','R','u','l','e',0};
496 static const WCHAR nameW[] =
497 {'N','a','m','e',0};
498 static const WCHAR country_codeW[] =
499 {'C','o','u','n','t','r','y','C','o','d','e',0};
500 DWORD total_size, offset, i, num_countries, max_subkey_len;
501 LINECOUNTRYENTRY *entry;
502 WCHAR *subkey_name;
503 HKEY hkey;
504
505 if (!list) return LINEERR_INVALPOINTER;
506 TRACE("(%08x, %08x, %p(%d))\n", id, version, list, list->dwTotalSize);
507
508 if (RegOpenKeyW(HKEY_LOCAL_MACHINE, country_listW, &hkey) != ERROR_SUCCESS)
509 return LINEERR_INIFILECORRUPT;
510
511 total_size = list->dwTotalSize;
512 offset = sizeof(LINECOUNTRYLIST);
513 if (total_size < offset) return LINEERR_STRUCTURETOOSMALL;
514
515 memset(list, 0, total_size);
516 list->dwTotalSize = total_size;
517 list->dwUsedSize = offset;
518 list->dwNumCountries = 0;
519 list->dwCountryListSize = 0;
520 list->dwCountryListOffset = offset;
521
522 entry = (LINECOUNTRYENTRY *)(list + 1);
523
524 if (RegQueryInfoKeyW(hkey, NULL, NULL, NULL, &num_countries, &max_subkey_len,
525 NULL, NULL, NULL, NULL, NULL, NULL) != ERROR_SUCCESS)
526 {
527 RegCloseKey(hkey);
528 return LINEERR_OPERATIONFAILED;
529 }
530 if (id) offset = sizeof(LINECOUNTRYENTRY);
531 else offset += num_countries * sizeof(LINECOUNTRYENTRY);
532
533 max_subkey_len++;
534 if (!(subkey_name = HeapAlloc(GetProcessHeap(), 0, max_subkey_len * sizeof(WCHAR))))
535 {
536 RegCloseKey(hkey);
537 return LINEERR_NOMEM;
538 }
539 for (i = 0; i < num_countries; i++)
540 {
541 DWORD len, size, size_int, size_long, size_name, size_same;
542 HKEY hsubkey;
543
544 if (RegEnumKeyW(hkey, i, subkey_name, max_subkey_len) != ERROR_SUCCESS) continue;
545 if (id && (atoiW(subkey_name) != id)) continue;
546 if (RegOpenKeyW(hkey, subkey_name, &hsubkey) != ERROR_SUCCESS) continue;
547
548 RegQueryValueExW(hsubkey, international_ruleW, NULL, NULL, NULL, &size_int);
549 len = size_int;
550
551 RegQueryValueExW(hsubkey, longdistance_ruleW, NULL, NULL, NULL, &size_long);
552 len += size_long;
553
554 RegQueryValueExW(hsubkey, nameW, NULL, NULL, NULL, &size_name);
555 len += size_name;
556
557 RegQueryValueExW(hsubkey, samearea_ruleW, NULL, NULL, NULL, &size_same);
558 len += size_same;
559
560 if (total_size < offset + len)
561 {
562 offset += len;
563 RegCloseKey(hsubkey);
564 if (id) break;
565 continue;
566 }
567 list->dwNumCountries++;
568 list->dwCountryListSize += sizeof(LINECOUNTRYENTRY);
569 list->dwUsedSize += len + sizeof(LINECOUNTRYENTRY);
570
571 if (id) i = 0;
572 entry[i].dwCountryID = atoiW(subkey_name);
573 size = sizeof(DWORD);
574 RegQueryValueExW(hsubkey, country_codeW, NULL, NULL, (BYTE *)&entry[i].dwCountryCode, &size);
575 entry[i].dwNextCountryID = 0;
576
577 if (i > 0) entry[i - 1].dwNextCountryID = entry[i].dwCountryID;
578
579 /* add country name */
580 entry[i].dwCountryNameSize = size_name;
581 entry[i].dwCountryNameOffset = offset;
582 RegQueryValueExW(hsubkey, nameW, NULL, NULL, (BYTE *)list + offset, &size_name);
583 offset += size_name;
584
585 /* add Same Area Rule */
586 entry[i].dwSameAreaRuleSize = size_same;
587 entry[i].dwSameAreaRuleOffset = offset;
588 RegQueryValueExW(hsubkey, samearea_ruleW, NULL, NULL, (BYTE *)list + offset, &size_same);
589 offset += size_same;
590
591 /* add Long Distance Rule */
592 entry[i].dwLongDistanceRuleSize = size_long;
593 entry[i].dwLongDistanceRuleOffset = offset;
594 RegQueryValueExW(hsubkey, longdistance_ruleW, NULL, NULL, (BYTE *)list + offset, &size_long);
595 offset += size_long;
596
597 /* add Long Distance Rule */
598 entry[i].dwInternationalRuleSize = size_int;
599 entry[i].dwInternationalRuleOffset = offset;
600 RegQueryValueExW(hsubkey, international_ruleW, NULL, NULL, (BYTE *)list + offset, &size_int);
601 offset += size_int;
602 RegCloseKey(hsubkey);
603
604 TRACE("added country %s at %p\n",
605 debugstr_w((const WCHAR *)((const char *)list + entry[i].dwCountryNameOffset)), &entry[i]);
606 if (id) break;
607 }
608 list->dwNeededSize = offset;
609
610 TRACE("%d available %d required\n", total_size, offset);
611
612 HeapFree(GetProcessHeap(), 0, subkey_name);
613 RegCloseKey(hkey);
614 return 0;
615 }
616
617 /***********************************************************************
618 * lineGetDevCapsW (TAPI32.@)
619 */
620 DWORD WINAPI lineGetDevCapsW(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion,
621 DWORD dwExtVersion, LPLINEDEVCAPS lpLineDevCaps)
622 {
623 static int warn_once;
624
625 if(!warn_once++)
626 FIXME("(%p, %08x, %08x, %08x, %p): stub.\n", hLineApp, dwDeviceID, dwAPIVersion,
627 dwExtVersion, lpLineDevCaps);
628 return LINEERR_OPERATIONFAILED;
629 }
630
631 /***********************************************************************
632 * lineGetDevCapsA (TAPI32.@)
633 */
634 DWORD WINAPI lineGetDevCapsA(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion,
635 DWORD dwExtVersion, LPLINEDEVCAPS lpLineDevCaps)
636 {
637 static int warn_once;
638
639 if(!warn_once++)
640 FIXME("(%p, %08x, %08x, %08x, %p): stub.\n", hLineApp, dwDeviceID, dwAPIVersion,
641 dwExtVersion, lpLineDevCaps);
642 return LINEERR_OPERATIONFAILED;
643 }
644
645 /***********************************************************************
646 * lineGetDevConfig (TAPI32.@)
647 */
648 DWORD WINAPI lineGetDevConfigA(DWORD dwDeviceID, LPVARSTRING lpDeviceConfig, LPCSTR lpszDeviceClass)
649 {
650 FIXME("(%08x, %p, %s): stub.\n", dwDeviceID, lpDeviceConfig, lpszDeviceClass);
651 return 0;
652 }
653
654 /***********************************************************************
655 * lineGetIDW (TAPI32.@)
656 */
657 DWORD WINAPI lineGetIDW(HLINE hLine, DWORD dwAddressID, HCALL hCall, DWORD dwSelect,
658 LPVARSTRING lpDeviceID, LPCWSTR lpszDeviceClass)
659 {
660 FIXME("(%p, %08x, %p, %08x, %p, %s): stub.\n", hLine, dwAddressID, hCall,
661 dwSelect, lpDeviceID,
662 debugstr_w(lpszDeviceClass));
663 return LINEERR_OPERATIONFAILED;
664 }
665
666 /***********************************************************************
667 * lineGetIDA (TAPI32.@)
668 */
669 DWORD WINAPI lineGetIDA(HLINE hLine, DWORD dwAddressID, HCALL hCall, DWORD dwSelect,
670 LPVARSTRING lpDeviceID, LPCSTR lpszDeviceClass)
671 {
672 FIXME("(%p, %08x, %p, %08x, %p, %s): stub.\n", hLine, dwAddressID, hCall,
673 dwSelect, lpDeviceID, lpszDeviceClass);
674 return LINEERR_OPERATIONFAILED;
675 }
676
677 /***********************************************************************
678 * lineGetIcon (TAPI32.@)
679 */
680 DWORD WINAPI lineGetIconA(DWORD dwDeviceID, LPCSTR lpszDeviceClass, HICON *lphIcon)
681 {
682 FIXME("(%08x, %s, %p): stub.\n", dwDeviceID, lpszDeviceClass, lphIcon);
683 return 0;
684 }
685
686 /***********************************************************************
687 * lineGetLineDevStatus (TAPI32.@)
688 */
689 DWORD WINAPI lineGetLineDevStatusA(HLINE hLine, LPLINEDEVSTATUS lpLineDevStatus)
690 {
691 FIXME("(%p, %p): stub.\n", hLine, lpLineDevStatus);
692 return 0;
693 }
694
695 /***********************************************************************
696 * lineGetMessage (TAPI32.@)
697 */
698 DWORD WINAPI lineGetMessage(HLINEAPP hLineApp, LPLINEMESSAGE lpMessage, DWORD dwTimeout)
699 {
700 FIXME("(%p, %p, %08x): stub.\n", hLineApp, lpMessage, dwTimeout);
701 return 0;
702 }
703
704 /***********************************************************************
705 * lineGetNewCalls (TAPI32.@)
706 */
707 DWORD WINAPI lineGetNewCalls(HLINE hLine, DWORD dwAddressID, DWORD dwSelect, LPLINECALLLIST lpCallList)
708 {
709 FIXME("(%p, %08x, %08x, %p): stub.\n", hLine, dwAddressID, dwSelect, lpCallList);
710 return 0;
711 }
712
713 /***********************************************************************
714 * lineGetNumRings (TAPI32.@)
715 */
716 DWORD WINAPI lineGetNumRings(HLINE hLine, DWORD dwAddressID, LPDWORD lpdwNumRings)
717 {
718 FIXME("(%p, %08x, %p): stub.\n", hLine, dwAddressID, lpdwNumRings);
719 return 0;
720 }
721
722 /***********************************************************************
723 * lineGetProviderListA (TAPI32.@)
724 */
725 DWORD WINAPI lineGetProviderListA(DWORD dwAPIVersion, LPLINEPROVIDERLIST lpProviderList)
726 {
727 FIXME("(%08x, %p): stub.\n", dwAPIVersion, lpProviderList);
728 return LINEERR_OPERATIONFAILED;
729 }
730
731 /***********************************************************************
732 * lineGetProviderListW (TAPI32.@)
733 */
734 DWORD WINAPI lineGetProviderListW(DWORD dwAPIVersion, LPLINEPROVIDERLIST lpProviderList)
735 {
736 FIXME("(%08x, %p): stub.\n", dwAPIVersion, lpProviderList);
737 return LINEERR_OPERATIONFAILED;
738 }
739
740 /***********************************************************************
741 * lineGetRequest (TAPI32.@)
742 */
743 DWORD WINAPI lineGetRequestA(HLINEAPP hLineApp, DWORD dwRequestMode, LPVOID lpRequestBuffer)
744 {
745 FIXME("%p, %08x, %p): stub.\n", hLineApp, dwRequestMode, lpRequestBuffer);
746 return 0;
747 }
748
749 /***********************************************************************
750 * lineGetStatusMessages (TAPI32.@)
751 */
752 DWORD WINAPI lineGetStatusMessages(HLINE hLine, LPDWORD lpdwLineStatus, LPDWORD lpdwAddressStates)
753 {
754 FIXME("(%p, %p, %p): stub.\n", hLine, lpdwLineStatus, lpdwAddressStates);
755 return 0;
756 }
757
758 /***********************************************************************
759 * lineGetTranslateCaps (TAPI32.@)
760 *
761 * get address translate capabilities. Returns a LINETRANSLATECAPS
762 * structure:
763 *
764 * +-----------------------+
765 * |TotalSize |
766 * |NeededSize |
767 * |UsedSize |
768 * +-----------------------+
769 * |NumLocations |
770 * |LocationsListSize |
771 * |LocationsListOffset | -+
772 * |CurrentLocationID | |
773 * +-----------------------+ |
774 * |NumCards | |
775 * |CardListSize | |
776 * |CardListOffset | -|--+
777 * |CurrentPreferredCardID | | |
778 * +-----------------------+ | |
779 * | | <+ |
780 * |LINELOCATIONENTRY #1 | |
781 * | | |
782 * +-----------------------+ |
783 * ~ ~ |
784 * +-----------------------+ |
785 * | | |
786 * |LINELOCATIONENTRY | |
787 * | #NumLocations| |
788 * +-----------------------+ |
789 * | | <---+
790 * |LINECARDENTRY #1 |
791 * | |
792 * +-----------------------+
793 * ~ ~
794 * +-----------------------+
795 * | |
796 * |LINECARDENTRY #NumCards|
797 * | |
798 * +-----------------------+
799 * | room for strings named|
800 * | in the structures |
801 * | above. |
802 * +-----------------------+
803 */
804 DWORD WINAPI lineGetTranslateCapsA(HLINEAPP hLineApp, DWORD dwAPIVersion,
805 LPLINETRANSLATECAPS lpTranslateCaps)
806 {
807 HKEY hkLocations, hkCards, hkCardLocations, hsubkey;
808 int numlocations, numcards;
809 DWORD maxlockeylen,
810 maxcardkeylen;
811 char *loc_key_name = NULL;
812 char *card_key_name = NULL;
813 LPBYTE strptr;
814 int length;
815 int i;
816 DWORD lendword;
817 DWORD currentid;
818 LPLINELOCATIONENTRY pLocEntry;
819 LPLINECARDENTRY pCardEntry;
820
821 TRACE("(%p, %08x, %p (tot. size %d)\n", hLineApp, dwAPIVersion,
822 lpTranslateCaps, lpTranslateCaps->dwTotalSize );
823 if( lpTranslateCaps->dwTotalSize < sizeof(LINETRANSLATECAPS))
824 return LINEERR_STRUCTURETOOSMALL;
825 if( RegCreateKeyA(HKEY_LOCAL_MACHINE, szLocationsKey, &hkLocations)
826 != ERROR_SUCCESS ) {
827 ERR("unexpected registry error 1.\n");
828 return LINEERR_INIFILECORRUPT;
829 }
830 lendword = sizeof( DWORD);
831 if( RegQueryValueExA( hkLocations, "CurrentID", NULL, NULL,
832 (LPBYTE) &currentid, &lendword) != ERROR_SUCCESS )
833 currentid = -1; /* change this later */
834 if(RegQueryInfoKeyA(hkLocations, NULL, NULL, NULL, NULL, &maxlockeylen,
835 NULL, NULL, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) {
836 RegCloseKey(hkLocations);
837 ERR("unexpected registry error 2.\n");
838 return LINEERR_INIFILECORRUPT;
839 }
840 maxlockeylen++;
841 if( maxlockeylen < 10)
842 maxlockeylen = 10; /* need this also if there is no key */
843 loc_key_name = HeapAlloc( GetProcessHeap(), 0, maxlockeylen);
844 /* first time through: calculate needed space */
845 length=0;
846 i=0;
847 numlocations=0;
848 while( RegEnumKeyA(hkLocations, i, loc_key_name, maxlockeylen)
849 == ERROR_SUCCESS){
850 DWORD size_val;
851 i++;
852 if( strncasecmp(loc_key_name, "location", 8) ||
853 (RegOpenKeyA(hkLocations, loc_key_name, &hsubkey)
854 != ERROR_SUCCESS))
855 continue;
856 numlocations++;
857 length += sizeof(LINELOCATIONENTRY);
858 RegQueryValueExA(hsubkey, "Name",NULL,NULL,NULL,&size_val);
859 length += size_val;
860 RegQueryValueExA(hsubkey, "AreaCode",NULL,NULL,NULL,&size_val);
861 length += size_val;
862 RegQueryValueExA(hsubkey, "OutsideAccess",NULL,NULL,NULL,&size_val);
863 length += size_val;
864 RegQueryValueExA(hsubkey, "LongDistanceAccess",NULL,NULL,NULL,&size_val);
865 length += size_val;
866 RegQueryValueExA(hsubkey, "DisableCallWaiting",NULL,NULL,NULL,&size_val);
867 length += size_val;
868 /* fixme: what about TollPrefixList???? */
869 RegCloseKey(hsubkey);
870 }
871 if(numlocations == 0) {
872 /* add one location */
873 if( RegCreateKeyA( hkLocations, "Location1", &hsubkey)
874 == ERROR_SUCCESS) {
875 DWORD dwval;
876 char buf[10];
877 numlocations = 1;
878 length += sizeof(LINELOCATIONENTRY) + 20 ;
879 RegSetValueExA( hsubkey, "AreaCode", 0, REG_SZ, (const BYTE *)"010", 4);
880 GetLocaleInfoA( LOCALE_SYSTEM_DEFAULT, LOCALE_ICOUNTRY, buf, 8);
881 dwval = atoi(buf);
882 RegSetValueExA( hsubkey, "Country", 0, REG_DWORD, (LPBYTE)&dwval,
883 sizeof(DWORD));
884 RegSetValueExA( hsubkey, "DisableCallWaiting", 0, REG_SZ, (const BYTE *)"", 1);
885 dwval = 1;
886 RegSetValueExA( hsubkey, "Flags", 0, REG_DWORD, (LPBYTE)&dwval,
887 sizeof(DWORD));
888 RegSetValueExA( hsubkey, "LongDistanceAccess", 0, REG_SZ, (const BYTE *)"", 1);
889 RegSetValueExA( hsubkey, "Name", 0, REG_SZ, (const BYTE *)"New Location", 13);
890 RegSetValueExA( hsubkey, "OutsideAccess", 0, REG_SZ, (const BYTE *)"", 1);
891 RegCloseKey(hsubkey);
892 dwval = 1;
893 RegSetValueExA( hkLocations, "CurrentID", 0, REG_DWORD,
894 (LPBYTE)&dwval, sizeof(DWORD));
895 dwval = 2;
896 RegSetValueExA( hkLocations, "NextID", 0, REG_DWORD, (LPBYTE)&dwval,
897 sizeof(DWORD));
898 }
899 }
900 /* do the card list */
901 numcards=0;
902 if( RegCreateKeyA(HKEY_CURRENT_USER, szCardsKey, &hkCards)
903 == ERROR_SUCCESS ) {
904 if(RegQueryInfoKeyA(hkCards, NULL, NULL, NULL, NULL, &maxcardkeylen,
905 NULL, NULL, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) {
906 maxcardkeylen++;
907 if( maxcardkeylen < 6) maxcardkeylen = 6;
908 card_key_name = HeapAlloc(GetProcessHeap(), 0, maxcardkeylen);
909 i=0;
910 while( RegEnumKeyA(hkCards, i, card_key_name, maxcardkeylen) ==
911 ERROR_SUCCESS){
912 DWORD size_val;
913 i++;
914 if( strncasecmp(card_key_name, "card", 4) || ERROR_SUCCESS !=
915 (RegOpenKeyA(hkCards, card_key_name, &hsubkey) ))
916 continue;
917 numcards++;
918 length += sizeof(LINECARDENTRY);
919 RegQueryValueExA(hsubkey, "Name",NULL,NULL,NULL,&size_val);
920 length += size_val;
921 RegQueryValueExA(hsubkey, "LocalRule",NULL,NULL,NULL,&size_val);
922 length += size_val;
923 RegQueryValueExA(hsubkey, "LDRule",NULL,NULL,NULL,&size_val);
924 length += size_val;
925 RegQueryValueExA(hsubkey, "InternationalRule",NULL,NULL,NULL,
926 &size_val);
927 length += size_val;
928 RegCloseKey(hsubkey);
929 }
930 }
931 /* add one card (direct call) */
932 if (numcards == 0 &&
933 ERROR_SUCCESS == RegCreateKeyA( hkCards, "Card1", &hsubkey)) {
934 DWORD dwval;
935 numcards = 1;
936 length += sizeof(LINECARDENTRY) + 22 ;
937 RegSetValueExA( hsubkey, "Name", 0, REG_SZ, (const BYTE *)"None (Direct Call)", 19);
938 dwval = 1;
939 RegSetValueExA( hsubkey, "Flags", 0, REG_DWORD, (LPBYTE)&dwval,
940 sizeof(DWORD));
941 RegSetValueExA( hsubkey, "InternationalRule", 0, REG_SZ, (const BYTE *)"", 1);
942 RegSetValueExA( hsubkey, "LDRule", 0, REG_SZ, (const BYTE *)"", 1);
943 RegSetValueExA( hsubkey, "LocalRule", 0, REG_SZ, (const BYTE *)"", 1);
944 RegCloseKey(hsubkey);
945 dwval = 2;
946 RegSetValueExA( hkCards, "NextID", 0, REG_DWORD, (LPBYTE)&dwval,
947 sizeof(DWORD));
948 }
949 } else hkCards = 0; /* should really fail */
950 /* check if sufficient room is available */
951 lpTranslateCaps->dwNeededSize = sizeof(LINETRANSLATECAPS) + length;
952 if ( lpTranslateCaps->dwNeededSize > lpTranslateCaps->dwTotalSize ) {
953 RegCloseKey( hkLocations);
954 if( hkCards) RegCloseKey( hkCards);
955 HeapFree(GetProcessHeap(), 0, loc_key_name);
956 HeapFree(GetProcessHeap(), 0, card_key_name);
957 lpTranslateCaps->dwUsedSize = sizeof(LINETRANSLATECAPS);
958 TRACE("Insufficient space: total %d needed %d used %d\n",
959 lpTranslateCaps->dwTotalSize,
960 lpTranslateCaps->dwNeededSize,
961 lpTranslateCaps->dwUsedSize);
962 return 0;
963 }
964 /* fill in the LINETRANSLATECAPS structure */
965 lpTranslateCaps->dwUsedSize = lpTranslateCaps->dwNeededSize;
966 lpTranslateCaps->dwNumLocations = numlocations;
967 lpTranslateCaps->dwLocationListSize = sizeof(LINELOCATIONENTRY) *
968 lpTranslateCaps->dwNumLocations;
969 lpTranslateCaps->dwLocationListOffset = sizeof(LINETRANSLATECAPS);
970 lpTranslateCaps->dwCurrentLocationID = currentid;
971 lpTranslateCaps->dwNumCards = numcards;
972 lpTranslateCaps->dwCardListSize = sizeof(LINECARDENTRY) *
973 lpTranslateCaps->dwNumCards;
974 lpTranslateCaps->dwCardListOffset = lpTranslateCaps->dwLocationListOffset +
975 lpTranslateCaps->dwLocationListSize;
976 lpTranslateCaps->dwCurrentPreferredCardID = 0;
977 /* this is where the strings will be stored */
978 strptr = ((LPBYTE) lpTranslateCaps) +
979 lpTranslateCaps->dwCardListOffset + lpTranslateCaps->dwCardListSize;
980 pLocEntry = (LPLINELOCATIONENTRY) (lpTranslateCaps + 1);
981 /* key with Preferred CardIDs */
982 if( RegOpenKeyA(HKEY_CURRENT_USER, szLocationsKey, &hkCardLocations)
983 != ERROR_SUCCESS )
984 hkCardLocations = 0;
985 /* second time through all locations */
986 i=0;
987 while(RegEnumKeyA(hkLocations, i, loc_key_name, maxlockeylen)
988 == ERROR_SUCCESS){
989 DWORD size_val;
990 i++;
991 if( strncasecmp(loc_key_name, "location", 8) ||
992 (RegOpenKeyA(hkLocations, loc_key_name, &hsubkey)
993 != ERROR_SUCCESS))
994 continue;
995 size_val=sizeof(DWORD);
996 if( RegQueryValueExA(hsubkey, "ID",NULL, NULL,
997 (LPBYTE) &(pLocEntry->dwPermanentLocationID), &size_val) !=
998 ERROR_SUCCESS)
999 pLocEntry->dwPermanentLocationID = atoi( loc_key_name + 8);
1000 size_val=2048;
1001 RegQueryValueExA(hsubkey, "Name",NULL,NULL, strptr, &size_val);
1002 pLocEntry->dwLocationNameSize = size_val;
1003 pLocEntry->dwLocationNameOffset = strptr - (LPBYTE) lpTranslateCaps;
1004 strptr += size_val;
1005
1006 size_val=2048;
1007 RegQueryValueExA(hsubkey, "AreaCode",NULL,NULL, strptr, &size_val);
1008 pLocEntry->dwCityCodeSize = size_val;
1009 pLocEntry->dwCityCodeOffset = strptr - (LPBYTE) lpTranslateCaps;
1010 strptr += size_val;
1011
1012 size_val=2048;
1013 RegQueryValueExA(hsubkey, "OutsideAccess",NULL,NULL, strptr, &size_val);
1014 pLocEntry->dwLocalAccessCodeSize = size_val;
1015 pLocEntry->dwLocalAccessCodeOffset = strptr - (LPBYTE) lpTranslateCaps;
1016 strptr += size_val;
1017 size_val=2048;
1018 RegQueryValueExA(hsubkey, "LongDistanceAccess",NULL,NULL, strptr,
1019 &size_val);
1020 pLocEntry->dwLongDistanceAccessCodeSize= size_val;
1021 pLocEntry->dwLongDistanceAccessCodeOffset= strptr -
1022 (LPBYTE) lpTranslateCaps;
1023 strptr += size_val;
1024 size_val=2048;
1025 RegQueryValueExA(hsubkey, "DisableCallWaiting",NULL,NULL, strptr,
1026 &size_val);
1027 pLocEntry->dwCancelCallWaitingSize= size_val;
1028 pLocEntry->dwCancelCallWaitingOffset= strptr - (LPBYTE) lpTranslateCaps;
1029 strptr += size_val;
1030
1031 pLocEntry->dwTollPrefixListSize = 0; /* FIXME */
1032 pLocEntry->dwTollPrefixListOffset = 0; /* FIXME */
1033
1034 size_val=sizeof(DWORD);
1035 RegQueryValueExA(hsubkey, "Country",NULL,NULL,
1036 (LPBYTE) &(pLocEntry->dwCountryCode), &size_val);
1037 pLocEntry->dwCountryID = pLocEntry->dwCountryCode; /* FIXME */
1038 RegQueryValueExA(hsubkey, "Flags",NULL,NULL,
1039 (LPBYTE) &(pLocEntry->dwOptions), &size_val);
1040 RegCloseKey(hsubkey);
1041 /* get preferred cardid */
1042 pLocEntry->dwPreferredCardID = 0;
1043 if ( hkCardLocations) {
1044 size_val=sizeof(DWORD);
1045 if(RegOpenKeyA(hkCardLocations, loc_key_name, &hsubkey) ==
1046 ERROR_SUCCESS) {
1047 RegQueryValueExA(hsubkey, "CallingCard",NULL,NULL,
1048 (LPBYTE) &(pLocEntry->dwPreferredCardID), &size_val);
1049 RegCloseKey(hsubkey);
1050 }
1051
1052 }
1053 /* make sure there is a currentID */
1054 if(currentid == -1){
1055 currentid = pLocEntry->dwPermanentLocationID;
1056 lpTranslateCaps->dwCurrentLocationID = currentid;
1057 }
1058 if(pLocEntry->dwPermanentLocationID == currentid )
1059 lpTranslateCaps->dwCurrentPreferredCardID =
1060 pLocEntry->dwPreferredCardID;
1061 TRACE("added: ID %d %s CountryCode %d CityCode %s CardID %d "
1062 "LocalAccess: %s LongDistanceAccess: %s CountryID %d "
1063 "Options %d CancelCallWait %s\n",
1064 pLocEntry->dwPermanentLocationID,
1065 debugstr_a( (char*)lpTranslateCaps + pLocEntry->dwLocationNameOffset),
1066 pLocEntry->dwCountryCode,
1067 debugstr_a( (char*)lpTranslateCaps + pLocEntry->dwCityCodeOffset),
1068 pLocEntry->dwPreferredCardID,
1069 debugstr_a( (char*)lpTranslateCaps + pLocEntry->dwLocalAccessCodeOffset),
1070 debugstr_a( (char*)lpTranslateCaps + pLocEntry->dwLongDistanceAccessCodeOffset),
1071 pLocEntry->dwCountryID,
1072 pLocEntry->dwOptions,
1073 debugstr_a( (char*)lpTranslateCaps + pLocEntry->dwCancelCallWaitingOffset));
1074 pLocEntry++;
1075 }
1076 pCardEntry= (LPLINECARDENTRY) pLocEntry;
1077 /* do the card list */
1078 if( hkCards) {
1079 i=0;
1080 while( RegEnumKeyA(hkCards, i, card_key_name, maxcardkeylen) ==
1081 ERROR_SUCCESS){
1082 DWORD size_val;
1083 i++;
1084 if( strncasecmp(card_key_name, "card", 4) ||
1085 (RegOpenKeyA(hkCards, card_key_name, &hsubkey) != ERROR_SUCCESS))
1086 continue;
1087 size_val=sizeof(DWORD);
1088 if( RegQueryValueExA(hsubkey, "ID",NULL, NULL,
1089 (LPBYTE) &(pCardEntry->dwPermanentCardID), &size_val) !=
1090 ERROR_SUCCESS)
1091 pCardEntry->dwPermanentCardID= atoi( card_key_name + 4);
1092 size_val=2048;
1093 RegQueryValueExA(hsubkey, "Name",NULL,NULL, strptr, &size_val);
1094 pCardEntry->dwCardNameSize = size_val;
1095 pCardEntry->dwCardNameOffset = strptr - (LPBYTE) lpTranslateCaps;
1096 strptr += size_val;
1097 pCardEntry->dwCardNumberDigits = 1; /* FIXME */
1098 size_val=2048;
1099 RegQueryValueExA(hsubkey, "LocalRule",NULL,NULL, strptr, &size_val);
1100 pCardEntry->dwSameAreaRuleSize= size_val;
1101 pCardEntry->dwSameAreaRuleOffset= strptr - (LPBYTE) lpTranslateCaps;
1102 strptr += size_val;
1103 size_val=2048;
1104 RegQueryValueExA(hsubkey, "LDRule",NULL,NULL, strptr, &size_val);
1105 pCardEntry->dwLongDistanceRuleSize = size_val;
1106 pCardEntry->dwLongDistanceRuleOffset = strptr - (LPBYTE) lpTranslateCaps;
1107 strptr += size_val;
1108 size_val=2048;
1109 RegQueryValueExA(hsubkey, "InternationalRule",NULL,NULL, strptr,
1110 &size_val);
1111 pCardEntry->dwInternationalRuleSize = size_val;
1112 pCardEntry->dwInternationalRuleOffset = strptr -
1113 (LPBYTE) lpTranslateCaps;
1114 strptr += size_val;
1115 size_val=sizeof(DWORD);
1116 RegQueryValueExA(hsubkey, "Flags",NULL, NULL,
1117 (LPBYTE) &(pCardEntry->dwOptions), &size_val);
1118 TRACE( "added card: ID %d name %s SameArea %s LongDistance %s International %s Options 0x%x\n",
1119 pCardEntry->dwPermanentCardID,
1120 debugstr_a( (char*)lpTranslateCaps + pCardEntry->dwCardNameOffset),
1121 debugstr_a( (char*)lpTranslateCaps + pCardEntry->dwSameAreaRuleOffset),
1122 debugstr_a( (char*)lpTranslateCaps + pCardEntry->dwLongDistanceRuleOffset),
1123 debugstr_a( (char*)lpTranslateCaps + pCardEntry->dwInternationalRuleOffset),
1124 pCardEntry->dwOptions);
1125
1126 pCardEntry++;
1127 }
1128 }
1129
1130 if(hkLocations) RegCloseKey(hkLocations);
1131 if(hkCards) RegCloseKey(hkCards);
1132 if(hkCardLocations) RegCloseKey(hkCardLocations);
1133 HeapFree(GetProcessHeap(), 0, loc_key_name);
1134 HeapFree(GetProcessHeap(), 0, card_key_name);
1135 TRACE(" returning success tot %d needed %d used %d\n",
1136 lpTranslateCaps->dwTotalSize,
1137 lpTranslateCaps->dwNeededSize,
1138 lpTranslateCaps->dwUsedSize );
1139 return 0; /* success */
1140 }
1141
1142 /***********************************************************************
1143 * lineHandoff (TAPI32.@)
1144 */
1145 DWORD WINAPI lineHandoffA(HCALL hCall, LPCSTR lpszFileName, DWORD dwMediaMode)
1146 {
1147 FIXME("(%p, %s, %08x): stub.\n", hCall, lpszFileName, dwMediaMode);
1148 return 0;
1149 }
1150
1151 /***********************************************************************
1152 * lineHold (TAPI32.@)
1153 */
1154 DWORD WINAPI lineHold(HCALL hCall)
1155 {
1156 FIXME("(%p): stub.\n", hCall);
1157 return 1;
1158 }
1159
1160 /***********************************************************************
1161 * lineInitialize (TAPI32.@)
1162 */
1163 DWORD WINAPI lineInitialize(
1164 LPHLINEAPP lphLineApp,
1165 HINSTANCE hInstance,
1166 LINECALLBACK lpfnCallback,
1167 LPCSTR lpszAppName,
1168 LPDWORD lpdwNumDevs)
1169 {
1170 FIXME("(%p, %p, %p, %s, %p): stub.\n", lphLineApp, hInstance,
1171 lpfnCallback, debugstr_a(lpszAppName), lpdwNumDevs);
1172 return 0;
1173 }
1174
1175 /***********************************************************************
1176 * lineInitializeExA (TAPI32.@)
1177 */
1178 LONG WINAPI lineInitializeExA(LPHLINEAPP lphLineApp, HINSTANCE hInstance, LINECALLBACK lpfnCallback, LPCSTR lpszFriendlyAppName, LPDWORD lpdwNumDevs, LPDWORD lpdwAPIVersion, LPLINEINITIALIZEEXPARAMS lpLineInitializeExParams)
1179 {
1180 FIXME("(%p, %p, %p, %s, %p, %p, %p): stub.\n", lphLineApp, hInstance,
1181 lpfnCallback, debugstr_a(lpszFriendlyAppName), lpdwNumDevs, lpdwAPIVersion, lpLineInitializeExParams);
1182 return 0;
1183 }
1184
1185 /***********************************************************************
1186 * lineInitializeExW (TAPI32.@)
1187 */
1188 LONG WINAPI lineInitializeExW(LPHLINEAPP lphLineApp, HINSTANCE hInstance, LINECALLBACK lpfnCallback, LPCWSTR lpszFriendlyAppName, LPDWORD lpdwNumDevs, LPDWORD lpdwAPIVersion, LPLINEINITIALIZEEXPARAMS lpLineInitializeExParams)
1189 {
1190 FIXME("(%p, %p, %p, %s, %p, %p, %p): stub.\n", lphLineApp, hInstance,
1191 lpfnCallback, debugstr_w(lpszFriendlyAppName), lpdwNumDevs, lpdwAPIVersion, lpLineInitializeExParams);
1192 return 0;
1193 }
1194
1195 /***********************************************************************
1196 * lineMakeCallW (TAPI32.@)
1197 */
1198 DWORD WINAPI lineMakeCallW(HLINE hLine, LPHCALL lphCall, LPCWSTR lpszDestAddress,
1199 DWORD dwCountryCode, LPLINECALLPARAMS lpCallParams)
1200 {
1201 FIXME("(%p, %p, %s, %08x, %p): stub.\n", hLine, lphCall, debugstr_w(lpszDestAddress),
1202 dwCountryCode, lpCallParams);
1203 return LINEERR_OPERATIONFAILED;
1204 }
1205
1206 /***********************************************************************
1207 * lineMakeCallA (TAPI32.@)
1208 */
1209 DWORD WINAPI lineMakeCallA(HLINE hLine, LPHCALL lphCall, LPCSTR lpszDestAddress,
1210 DWORD dwCountryCode, LPLINECALLPARAMS lpCallParams)
1211 {
1212 FIXME("(%p, %p, %s, %08x, %p): stub.\n", hLine, lphCall, lpszDestAddress,
1213 dwCountryCode, lpCallParams);
1214 return LINEERR_OPERATIONFAILED;
1215 }
1216
1217 /***********************************************************************
1218 * lineMonitorDigits (TAPI32.@)
1219 */
1220 DWORD WINAPI lineMonitorDigits(HCALL hCall, DWORD dwDigitModes)
1221 {
1222 FIXME("(%p, %08x): stub.\n", hCall, dwDigitModes);
1223 return 0;
1224 }
1225
1226 /***********************************************************************
1227 * lineMonitorMedia (TAPI32.@)
1228 */
1229 DWORD WINAPI lineMonitorMedia(HCALL hCall, DWORD dwMediaModes)
1230 {
1231 FIXME("(%p, %08x): stub.\n", hCall, dwMediaModes);
1232 return 0;
1233 }
1234
1235 /***********************************************************************
1236 * lineMonitorTones (TAPI32.@)
1237 */
1238 DWORD WINAPI lineMonitorTones(HCALL hCall, LPLINEMONITORTONE lpToneList, DWORD dwNumEntries)
1239 {
1240 FIXME("(%p, %p, %08x): stub.\n", hCall, lpToneList, dwNumEntries);
1241 return 0;
1242 }
1243
1244 /***********************************************************************
1245 * lineNegotiateAPIVersion (TAPI32.@)
1246 */
1247 DWORD WINAPI lineNegotiateAPIVersion(
1248 HLINEAPP hLineApp,
1249 DWORD dwDeviceID,
1250 DWORD dwAPILowVersion,
1251 DWORD dwAPIHighVersion,
1252 LPDWORD lpdwAPIVersion,
1253 LPLINEEXTENSIONID lpExtensionID
1254 )
1255 {
1256 static int warn_once;
1257
1258 if(!warn_once++)
1259 FIXME("(%p, %d, %d, %d, %p, %p): stub.\n", hLineApp, dwDeviceID,
1260 dwAPILowVersion, dwAPIHighVersion, lpdwAPIVersion, lpExtensionID);
1261 *lpdwAPIVersion = dwAPIHighVersion;
1262 return 0;
1263 }
1264
1265 /***********************************************************************
1266 * lineNegotiateExtVersion (TAPI32.@)
1267 */
1268 DWORD WINAPI lineNegotiateExtVersion(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, DWORD dwExtLowVersion, DWORD dwExtHighVersion, LPDWORD lpdwExtVersion)
1269 {
1270 FIXME("stub.\n");
1271 return 0;
1272 }
1273
1274 /***********************************************************************
1275 * lineOpen (TAPI32.@)
1276 */
1277 DWORD WINAPI lineOpenA(HLINEAPP hLineApp, DWORD dwDeviceID, LPHLINE lphLine, DWORD dwAPIVersion, DWORD dwExtVersion, DWORD dwCallbackInstance, DWORD dwPrivileges, DWORD dwMediaModes, LPLINECALLPARAMS lpCallParams)
1278 {
1279 FIXME("stub.\n");
1280 return 0;
1281 }
1282
1283 /***********************************************************************
1284 * linePark (TAPI32.@)
1285 */
1286 DWORD WINAPI lineParkA(HCALL hCall, DWORD dwParkMode, LPCSTR lpszDirAddress, LPVARSTRING lpNonDirAddress)
1287 {
1288 FIXME("(%p, %08x, %s, %p): stub.\n", hCall, dwParkMode, lpszDirAddress, lpNonDirAddress);
1289 return 1;
1290 }
1291
1292 /***********************************************************************
1293 * linePickup (TAPI32.@)
1294 */
1295 DWORD WINAPI linePickupA(HLINE hLine, DWORD dwAddressID, LPHCALL lphCall, LPCSTR lpszDestAddress, LPCSTR lpszGroupID)
1296 {
1297 FIXME("(%p, %08x, %p, %s, %s): stub.\n", hLine, dwAddressID, lphCall, lpszDestAddress, lpszGroupID);
1298 return 1;
1299 }
1300
1301 /***********************************************************************
1302 * linePrepareAddToConference (TAPI32.@)
1303 */
1304 DWORD WINAPI linePrepareAddToConferenceA(HCALL hConfCall, LPHCALL lphConsultCall, LPLINECALLPARAMS lpCallParams)
1305 {
1306 FIXME("(%p, %p, %p): stub.\n", hConfCall, lphConsultCall, lpCallParams);
1307 return 1;
1308 }
1309
1310 /***********************************************************************
1311 * lineRedirect (TAPI32.@)
1312 */
1313 DWORD WINAPI lineRedirectA(
1314 HCALL hCall,
1315 LPCSTR lpszDestAddress,
1316 DWORD dwCountryCode) {
1317
1318 FIXME(": stub.\n");
1319 return 1;
1320 }
1321
1322 /***********************************************************************
1323 * lineRegisterRequestRecipient (TAPI32.@)
1324 */
1325 DWORD WINAPI lineRegisterRequestRecipient(HLINEAPP hLineApp, DWORD dwRegistrationInstance, DWORD dwRequestMode, DWORD dwEnable)
1326 {
1327 FIXME("(%p, %08x, %08x, %08x): stub.\n", hLineApp, dwRegistrationInstance, dwRequestMode, dwEnable);
1328 return 1;
1329 }
1330
1331 /***********************************************************************
1332 * lineReleaseUserUserInfo (TAPI32.@)
1333 */
1334 DWORD WINAPI lineReleaseUserUserInfo(HCALL hCall)
1335 {
1336 FIXME("(%p): stub.\n", hCall);
1337 return 1;
1338 }
1339
1340 /***********************************************************************
1341 * lineRemoveFromConference (TAPI32.@)
1342 */
1343 DWORD WINAPI lineRemoveFromConference(HCALL hCall)
1344 {
1345 FIXME("(%p): stub.\n", hCall);
1346 return 1;
1347 }
1348
1349 /***********************************************************************
1350 * lineRemoveProvider (TAPI32.@)
1351 */
1352 DWORD WINAPI lineRemoveProvider(DWORD dwPermanentProviderID, HWND hwndOwner)
1353 {
1354 FIXME("(%08x, %p): stub.\n", dwPermanentProviderID, hwndOwner);
1355 return 1;
1356 }
1357
1358 /***********************************************************************
1359 * lineSecureCall (TAPI32.@)
1360 */
1361 DWORD WINAPI lineSecureCall(HCALL hCall)
1362 {
1363 FIXME("(%p): stub.\n", hCall);
1364 return 1;
1365 }
1366
1367 /***********************************************************************
1368 * lineSendUserUserInfo (TAPI32.@)
1369 */
1370 DWORD WINAPI lineSendUserUserInfo(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize)
1371 {
1372 FIXME("(%p, %s, %08x): stub.\n", hCall, lpsUserUserInfo, dwSize);
1373 return 1;
1374 }
1375
1376 /***********************************************************************
1377 * lineSetAppPriority (TAPI32.@)
1378 */
1379 DWORD WINAPI lineSetAppPriorityA(LPCSTR lpszAppFilename, DWORD dwMediaMode, LPLINEEXTENSIONID const lpExtensionID, DWORD dwRequestMode, LPCSTR lpszExtensionName, DWORD dwPriority)
1380 {
1381 FIXME("(%s, %08x, %p, %08x, %s, %08x): stub.\n", lpszAppFilename, dwMediaMode, lpExtensionID, dwRequestMode, lpszExtensionName, dwPriority);
1382 return 0;
1383 }
1384
1385 /***********************************************************************
1386 * lineSetAppSpecific (TAPI32.@)
1387 */
1388 DWORD WINAPI lineSetAppSpecific(HCALL hCall, DWORD dwAppSpecific)
1389 {
1390 FIXME("(%p, %08x): stub.\n", hCall, dwAppSpecific);
1391 return 0;
1392 }
1393
1394 /***********************************************************************
1395 * lineSetCallParams (TAPI32.@)
1396 */
1397 DWORD WINAPI lineSetCallParams(HCALL hCall, DWORD dwBearerMode, DWORD dwMinRate, DWORD dwMaxRate, LPLINEDIALPARAMS lpDialParams)
1398 {
1399 FIXME("(%p, %08x, %08x, %08x, %p): stub.\n", hCall, dwBearerMode, dwMinRate, dwMaxRate, lpDialParams);
1400 return 1;
1401 }
1402
1403 /***********************************************************************
1404 * lineSetCallPrivilege (TAPI32.@)
1405 */
1406 DWORD WINAPI lineSetCallPrivilege(HCALL hCall, DWORD dwCallPrivilege)
1407 {
1408 FIXME("(%p, %08x): stub.\n", hCall, dwCallPrivilege);
1409 return 0;
1410 }
1411
1412 /***********************************************************************
1413 * lineSetCurrentLocation (TAPI32.@)
1414 */
1415 DWORD WINAPI lineSetCurrentLocation(HLINEAPP hLineApp, DWORD dwLocation)
1416 {
1417 FIXME("(%p, %08x): stub.\n", hLineApp, dwLocation);
1418 return 0;
1419 }
1420
1421 /***********************************************************************
1422 * lineSetDevConfig (TAPI32.@)
1423 */
1424 DWORD WINAPI lineSetDevConfigA(DWORD dwDeviceID, LPVOID lpDeviceConfig, DWORD dwSize, LPCSTR lpszDeviceClass)
1425 {
1426 FIXME("(%08x, %p, %08x, %s): stub.\n", dwDeviceID, lpDeviceConfig, dwSize, lpszDeviceClass);
1427 return 0;
1428 }
1429
1430 /***********************************************************************
1431 * lineSetMediaControl (TAPI32.@)
1432 */
1433 DWORD WINAPI lineSetMediaControl(
1434 HLINE hLine,
1435 DWORD dwAddressID,
1436 HCALL hCall,
1437 DWORD dwSelect,
1438 LPLINEMEDIACONTROLDIGIT const lpDigitList,
1439 DWORD dwDigitNumEntries,
1440 LPLINEMEDIACONTROLMEDIA const lpMediaList,
1441 DWORD dwMediaNumEntries,
1442 LPLINEMEDIACONTROLTONE const lpToneList,
1443 DWORD dwToneNumEntries,
1444 LPLINEMEDIACONTROLCALLSTATE const lpCallStateList,
1445 DWORD dwCallStateNumEntries)
1446 {
1447 FIXME(": stub.\n");
1448 return 0;
1449 }
1450
1451 /***********************************************************************
1452 * lineSetMediaMode (TAPI32.@)
1453 */
1454 DWORD WINAPI lineSetMediaMode(HCALL hCall, DWORD dwMediaModes)
1455 {
1456 FIXME("(%p, %08x): stub.\n", hCall, dwMediaModes);
1457 return 0;
1458 }
1459
1460 /***********************************************************************
1461 * lineSetNumRings (TAPI32.@)
1462 */
1463 DWORD WINAPI lineSetNumRings(HLINE hLine, DWORD dwAddressID, DWORD dwNumRings)
1464 {
1465 FIXME("(%p, %08x, %08x): stub.\n", hLine, dwAddressID, dwNumRings);
1466 return 0;
1467 }
1468
1469 /***********************************************************************
1470 * lineSetStatusMessages (TAPI32.@)
1471 */
1472 DWORD WINAPI lineSetStatusMessages(HLINE hLine, DWORD dwLineStates, DWORD dwAddressStates)
1473 {
1474 FIXME("(%p, %08x, %08x): stub.\n", hLine, dwLineStates, dwAddressStates);
1475 return 0;
1476 }
1477
1478 /***********************************************************************
1479 * lineSetTerminal (TAPI32.@)
1480 */
1481 DWORD WINAPI lineSetTerminal(HLINE hLine, DWORD dwAddressID, HCALL hCall, DWORD dwSelect, DWORD dwTerminalModes, DWORD dwTerminalID, DWORD bEnable)
1482 {
1483 FIXME("(%p, %08x, %p, %08x, %08x, %08x, %08x): stub.\n", hLine, dwAddressID, hCall, dwSelect, dwTerminalModes, dwTerminalID, bEnable);
1484 return 1;
1485 }
1486
1487 /***********************************************************************
1488 * lineSetTollList (TAPI32.@)
1489 */
1490 DWORD WINAPI lineSetTollListA(HLINEAPP hLineApp, DWORD dwDeviceID, LPCSTR lpszAddressIn, DWORD dwTollListOption)
1491 {
1492 FIXME("(%p, %08x, %s, %08x): stub.\n", hLineApp, dwDeviceID, lpszAddressIn, dwTollListOption);
1493 return 0;
1494 }
1495
1496 /***********************************************************************
1497 * lineSetupConference (TAPI32.@)
1498 */
1499 DWORD WINAPI lineSetupConferenceA(HCALL hCall, HLINE hLine, LPHCALL lphConfCall, LPHCALL lphConsultCall, DWORD dwNumParties, LPLINECALLPARAMS lpCallParams)
1500 {
1501 FIXME("(%p, %p, %p, %p, %08x, %p): stub.\n", hCall, hLine, lphConfCall, lphConsultCall, dwNumParties, lpCallParams);
1502 return 1;
1503 }
1504
1505 /***********************************************************************
1506 * lineSetupTransfer (TAPI32.@)
1507 */
1508 DWORD WINAPI lineSetupTransferA(HCALL hCall, LPHCALL lphConsultCall, LPLINECALLPARAMS lpCallParams)
1509 {
1510 FIXME("(%p, %p, %p): stub.\n", hCall, lphConsultCall, lpCallParams);
1511 return 1;
1512 }
1513
1514 /***********************************************************************
1515 * lineShutdown (TAPI32.@)
1516 */
1517 DWORD WINAPI lineShutdown(HLINEAPP hLineApp)
1518 {
1519 FIXME("(%p): stub.\n", hLineApp);
1520 return 0;
1521 }
1522
1523 /***********************************************************************
1524 * lineSwapHold (TAPI32.@)
1525 */
1526 DWORD WINAPI lineSwapHold(HCALL hActiveCall, HCALL hHeldCall)
1527 {
1528 FIXME("(active: %p, held: %p): stub.\n", hActiveCall, hHeldCall);
1529 return 1;
1530 }
1531
1532 /***********************************************************************
1533 * lineTranslateAddress (TAPI32.@)
1534 */
1535 DWORD WINAPI lineTranslateAddressA(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, LPCSTR lpszAddressIn, DWORD dwCard, DWORD dwTranslateOptions, LPLINETRANSLATEOUTPUT lpTranslateOutput)
1536 {
1537 FIXME("(%p, %08x, %08x, %s, %08x, %08x, %p): stub.\n", hLineApp, dwDeviceID, dwAPIVersion, lpszAddressIn, dwCard, dwTranslateOptions, lpTranslateOutput);
1538 return 0;
1539 }
1540
1541 /***********************************************************************
1542 * lineTranslateAddressW (TAPI32.@)
1543 */
1544 DWORD WINAPI lineTranslateAddressW(HLINEAPP hLineApp, DWORD dwDeviceID,
1545 DWORD dwAPIVersion, LPCWSTR lpszAddressIn, DWORD dwCard,
1546 DWORD dwTranslateOptions, LPLINETRANSLATEOUTPUT lpTranslateOutput)
1547 {
1548 FIXME("(%p, %08x, %08x, %s, %08x, %08x, %p): stub.\n", hLineApp, dwDeviceID, dwAPIVersion,
1549 debugstr_w(lpszAddressIn), dwCard, dwTranslateOptions, lpTranslateOutput);
1550 return 0;
1551 }
1552
1553 /***********************************************************************
1554 * lineTranslateDialog (TAPI32.@)
1555 */
1556 DWORD WINAPI lineTranslateDialogA(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, HWND hwndOwner, LPCSTR lpszAddressIn)
1557 {
1558 FIXME("(%p, %08x, %08x, %p, %s): stub.\n", hLineApp, dwDeviceID, dwAPIVersion, hwndOwner, lpszAddressIn);
1559 return 0;
1560 }
1561
1562 /***********************************************************************
1563 * lineTranslateDialogW (TAPI32.@)
1564 */
1565 DWORD WINAPI lineTranslateDialogW(HLINEAPP hLineApp, DWORD dwDeviceID,
1566 DWORD dwAPIVersion, HWND hwndOwner, LPCWSTR lpszAddressIn)
1567 {
1568 FIXME("(%p, %08x, %08x, %p, %s): stub.\n", hLineApp, dwDeviceID,
1569 dwAPIVersion, hwndOwner, debugstr_w(lpszAddressIn));
1570 return 0;
1571 }
1572
1573 /***********************************************************************
1574 * lineUncompleteCall (TAPI32.@)
1575 */
1576 DWORD WINAPI lineUncompleteCall(HLINE hLine, DWORD dwCompletionID)
1577 {
1578 FIXME("(%p, %08x): stub.\n", hLine, dwCompletionID);
1579 return 1;
1580 }
1581
1582 /***********************************************************************
1583 * lineUnhold (TAPI32.@)
1584 */
1585 DWORD WINAPI lineUnhold(HCALL hCall)
1586 {
1587 FIXME("(%p): stub.\n", hCall);
1588 return 1;
1589 }
1590
1591 /***********************************************************************
1592 * lineUnpark (TAPI32.@)
1593 */
1594 DWORD WINAPI lineUnparkA(HLINE hLine, DWORD dwAddressID, LPHCALL lphCall, LPCSTR lpszDestAddress)
1595 {
1596 FIXME("(%p, %08x, %p, %s): stub.\n", hLine, dwAddressID, lphCall, lpszDestAddress);
1597 return 1;
1598 }