winspool: Error check in add_printer_driver() was to strict.
[wine/multimedia.git] / dlls / tapi32 / line.c
blob214e504c0849da6b4fb3a5cfb49f36398cc60bf8
1 /*
2 * TAPI32 line services
4 * Copyright 1999 Andreas Mohr
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.
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.
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
21 #include <string.h>
22 #include <stdlib.h>
23 #include <stdarg.h>
24 #include <stdio.h>
25 #include "windef.h"
26 #include "winbase.h"
27 #include "wingdi.h"
28 #include "winreg.h"
29 #include "winnls.h"
30 #include "winerror.h"
31 #include "objbase.h"
32 #include "tapi.h"
33 #include "wine/debug.h"
35 WINE_DEFAULT_DEBUG_CHANNEL(tapi);
37 /* registry keys */
38 static const char szCountrylistKey[] =
39 "Software\\Microsoft\\Windows\\CurrentVersion\\Telephony\\Country List";
40 static const char szLocationsKey[] =
41 "Software\\Microsoft\\Windows\\CurrentVersion\\Telephony\\Locations";
42 static const char szCardsKey[] =
43 "Software\\Microsoft\\Windows\\CurrentVersion\\Telephony\\Cards";
46 /***********************************************************************
47 * lineAccept (TAPI32.@)
49 DWORD WINAPI lineAccept(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize)
51 FIXME("(%p, %s, %d): stub.\n", hCall, lpsUserUserInfo, dwSize);
52 return 1;
55 /***********************************************************************
56 * lineAddProvider (TAPI32.@)
58 DWORD WINAPI lineAddProviderA(LPCSTR lpszProviderName, HWND hwndOwner, LPDWORD lpdwPermanentProviderID)
60 FIXME("(%s, %p, %p): stub.\n", lpszProviderName, hwndOwner, lpdwPermanentProviderID);
61 return 1;
64 /***********************************************************************
65 * lineAddToConference (TAPI32.@)
67 DWORD WINAPI lineAddToConference(HCALL hConfCall, HCALL hConsultCall)
69 FIXME("(%p, %p): stub.\n", hConfCall, hConsultCall);
70 return 1;
73 /***********************************************************************
74 * lineAnswer (TAPI32.@)
76 DWORD WINAPI lineAnswer(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize)
78 FIXME("(%p, %s, %d): stub.\n", hCall, lpsUserUserInfo, dwSize);
79 return 1;
82 /***********************************************************************
83 * lineBlindTransfer (TAPI32.@)
85 DWORD WINAPI lineBlindTransferA(HCALL hCall, LPCSTR lpszDestAddress, DWORD dwCountryCode)
87 FIXME("(%p, %s, %08x): stub.\n", hCall, lpszDestAddress, dwCountryCode);
88 return 1;
91 /***********************************************************************
92 * lineClose (TAPI32.@)
94 DWORD WINAPI lineClose(HLINE hLine)
96 FIXME("(%p): stub.\n", hLine);
97 return 0;
100 /***********************************************************************
101 * lineCompleteCall (TAPI32.@)
103 DWORD WINAPI lineCompleteCall(HCALL hCall, LPDWORD lpdwCompletionID, DWORD dwCompletionMode, DWORD dwMessageID)
105 FIXME("(%p, %p, %08x, %08x): stub.\n", hCall, lpdwCompletionID, dwCompletionMode, dwMessageID);
106 return 1;
109 /***********************************************************************
110 * lineCompleteTransfer (TAPI32.@)
112 DWORD WINAPI lineCompleteTransfer(HCALL hCall, HCALL hConsultCall, LPHCALL lphConfCall, DWORD dwTransferMode)
114 FIXME("(%p, %p, %p, %08x): stub.\n", hCall, hConsultCall, lphConfCall, dwTransferMode);
115 return 1;
118 /***********************************************************************
119 * lineConfigDialog (TAPI32.@)
121 DWORD WINAPI lineConfigDialogA(DWORD dwDeviceID, HWND hwndOwner, LPCSTR lpszDeviceClass)
123 FIXME("(%08x, %p, %s): stub.\n", dwDeviceID, hwndOwner, lpszDeviceClass);
124 return 0;
127 /***********************************************************************
128 * lineConfigDialogEdit (TAPI32.@)
130 DWORD WINAPI lineConfigDialogEditA(DWORD dwDeviceID, HWND hwndOwner, LPCSTR lpszDeviceClass, LPVOID const lpDeviceConfigIn, DWORD dwSize, LPVARSTRING lpDeviceConfigOut)
132 FIXME("stub.\n");
133 return 0;
136 /***********************************************************************
137 * lineConfigProvider (TAPI32.@)
139 DWORD WINAPI lineConfigProvider(HWND hwndOwner, DWORD dwPermanentProviderID)
141 FIXME("(%p, %08x): stub.\n", hwndOwner, dwPermanentProviderID);
142 return 0;
145 /***********************************************************************
146 * lineDeallocateCall (TAPI32.@)
148 DWORD WINAPI lineDeallocateCall(HCALL hCall)
150 FIXME("(%p): stub.\n", hCall);
151 return 0;
154 /***********************************************************************
155 * lineDevSpecific (TAPI32.@)
157 DWORD WINAPI lineDevSpecific(HLINE hLine, DWORD dwAddressId, HCALL hCall, LPVOID lpParams, DWORD dwSize)
159 FIXME("(%p, %08x, %p, %p, %d): stub.\n", hLine, dwAddressId, hCall, lpParams, dwSize);
160 return 1;
163 /***********************************************************************
164 * lineDevSpecificFeature (TAPI32.@)
166 DWORD WINAPI lineDevSpecificFeature(HLINE hLine, DWORD dwFeature, LPVOID lpParams, DWORD dwSize)
168 FIXME("(%p, %08x, %p, %d): stub.\n", hLine, dwFeature, lpParams, dwSize);
169 return 1;
172 /***********************************************************************
173 * lineDial (TAPI32.@)
175 DWORD WINAPI lineDialA(HCALL hCall, LPCSTR lpszDestAddress, DWORD dwCountryCode)
177 FIXME("(%p, %s, %08x): stub.\n", hCall, lpszDestAddress, dwCountryCode);
178 return 1;
181 /***********************************************************************
182 * lineDrop (TAPI32.@)
184 DWORD WINAPI lineDrop(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize)
186 FIXME("(%p, %s, %08x): stub.\n", hCall, lpsUserUserInfo, dwSize);
187 return 1;
190 /***********************************************************************
191 * lineForward (TAPI32.@)
193 DWORD WINAPI lineForwardA(HLINE hLine, DWORD bAllAddress, DWORD dwAddressID, LPLINEFORWARDLIST lpForwardList, DWORD dwNumRingsNoAnswer, LPHCALL lphConsultCall, LPLINECALLPARAMS lpCallParams)
195 FIXME("stub.\n");
196 return 1;
199 /***********************************************************************
200 * lineGatherDigits (TAPI32.@)
202 DWORD WINAPI lineGatherDigitsA(HCALL hCall, DWORD dwDigitModes, LPSTR lpsDigits, DWORD dwNumDigits, LPCSTR lpszTerminationDigits, DWORD dwFirstDigitTimeout, DWORD dwInterDigitTimeout)
204 FIXME("stub.\n");
205 return 0;
208 /***********************************************************************
209 * lineGenerateDigits (TAPI32.@)
211 DWORD WINAPI lineGenerateDigitsA(HCALL hCall, DWORD dwDigitModes, LPCSTR lpszDigits, DWORD dwDuration)
213 FIXME("(%p, %08x, %s, %d): stub.\n", hCall, dwDigitModes, lpszDigits, dwDuration);
214 return 0;
217 /***********************************************************************
218 * lineGenerateTone (TAPI32.@)
220 DWORD WINAPI lineGenerateTone(HCALL hCall, DWORD dwToneMode, DWORD dwDuration, DWORD dwNumTones, LPLINEGENERATETONE lpTones)
222 FIXME("(%p, %08x, %d, %d, %p): stub.\n", hCall, dwToneMode, dwDuration, dwNumTones, lpTones);
223 return 0;
226 /***********************************************************************
227 * lineGetAddressCaps (TAPI32.@)
229 DWORD WINAPI lineGetAddressCapsA(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAddressID, DWORD dwAPIVersion, DWORD dwExtVersion, LPLINEADDRESSCAPS lpAddressCaps)
231 FIXME("(%p, %08x, %08x, %08x, %08x, %p): stub.\n", hLineApp, dwDeviceID, dwAddressID, dwAPIVersion, dwExtVersion, lpAddressCaps);
232 return 0;
235 /***********************************************************************
236 * lineGetAddressID (TAPI32.@)
238 DWORD WINAPI lineGetAddressIDA(HLINE hLine, LPDWORD lpdwAddressID, DWORD dwAddressMode, LPCSTR lpsAddress, DWORD dwSize)
240 FIXME("%p, %p, %08x, %s, %d): stub.\n", hLine, lpdwAddressID, dwAddressMode, lpsAddress, dwSize);
241 return 0;
244 /***********************************************************************
245 * lineGetAddressStatus (TAPI32.@)
247 DWORD WINAPI lineGetAddressStatusA(HLINE hLine, DWORD dwAddressID, LPLINEADDRESSSTATUS lpAddressStatus)
249 FIXME("(%p, %08x, %p): stub.\n", hLine, dwAddressID, lpAddressStatus);
250 return 0;
253 /***********************************************************************
254 * lineGetAppPriority (TAPI32.@)
256 DWORD WINAPI lineGetAppPriorityA(LPCSTR lpszAppFilename, DWORD dwMediaMode, LPLINEEXTENSIONID const lpExtensionID, DWORD dwRequestMode, LPVARSTRING lpExtensionName, LPDWORD lpdwPriority)
258 FIXME("(%s, %08x, %p, %08x, %p, %p): stub.\n", lpszAppFilename, dwMediaMode, lpExtensionID, dwRequestMode, lpExtensionName, lpdwPriority);
259 return 0;
262 /***********************************************************************
263 * lineGetCallInfo (TAPI32.@)
265 DWORD WINAPI lineGetCallInfoA(HCALL hCall, LPLINECALLINFO lpCallInfo)
267 FIXME("(%p, %p): stub.\n", hCall, lpCallInfo);
268 return 0;
271 /***********************************************************************
272 * lineGetCallStatus (TAPI32.@)
274 DWORD WINAPI lineGetCallStatus(HCALL hCall, LPLINECALLSTATUS lpCallStatus)
276 FIXME("(%p, %p): stub.\n", hCall, lpCallStatus);
277 return 0;
280 /***********************************************************************
281 * lineGetConfRelatedCalls (TAPI32.@)
283 DWORD WINAPI lineGetConfRelatedCalls(HCALL hCall, LPLINECALLLIST lpCallList)
285 FIXME("(%p, %p): stub.\n", hCall, lpCallList);
286 return 0;
289 typedef struct tagTAPI_CountryInfo
291 DWORD dwCountryID;
292 DWORD dwCountryCode;
293 LPSTR lpCountryName;
294 LPSTR lpSameAreaRule;
295 LPSTR lpLongDistanceRule;
296 LPSTR lpInternationalRule;
297 } TAPI_CountryInfo;
299 /***********************************************************************
300 * lineGetCountry (TAPI32.@)
302 DWORD WINAPI lineGetCountryA(DWORD dwCountryID, DWORD dwAPIVersion, LPLINECOUNTRYLIST lpLineCountryList)
304 DWORD dwAvailSize, dwOffset, i, num_countries, max_subkey_len;
305 LPLINECOUNTRYENTRY lpLCE;
306 HKEY hkey;
307 char *subkey_name;
309 if(!lpLineCountryList) {
310 TRACE("(%08x, %08x, %p): stub. Returning LINEERR_INVALPOINTER\n",
311 dwCountryID, dwAPIVersion, lpLineCountryList);
312 return LINEERR_INVALPOINTER;
315 TRACE("(%08x, %08x, %p(%d)): stub.\n",
316 dwCountryID, dwAPIVersion, lpLineCountryList,
317 lpLineCountryList->dwTotalSize);
319 if(RegOpenKeyA(HKEY_LOCAL_MACHINE, szCountrylistKey, &hkey)
320 != ERROR_SUCCESS)
321 return LINEERR_INIFILECORRUPT;
324 dwAvailSize = lpLineCountryList->dwTotalSize;
325 dwOffset = sizeof (LINECOUNTRYLIST);
327 if(dwAvailSize<dwOffset)
328 return LINEERR_STRUCTURETOOSMALL;
330 memset(lpLineCountryList, 0, dwAvailSize);
332 lpLineCountryList->dwTotalSize = dwAvailSize;
333 lpLineCountryList->dwUsedSize = dwOffset;
334 lpLineCountryList->dwNumCountries = 0;
335 lpLineCountryList->dwCountryListSize = 0;
336 lpLineCountryList->dwCountryListOffset = dwOffset;
338 lpLCE = (LPLINECOUNTRYENTRY)(&lpLineCountryList[1]);
340 if(RegQueryInfoKeyA(hkey, NULL, NULL, NULL, &num_countries, &max_subkey_len,
341 NULL, NULL, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) {
342 RegCloseKey(hkey);
343 return LINEERR_STRUCTURETOOSMALL;
346 if(dwCountryID)
347 dwOffset = sizeof (LINECOUNTRYENTRY);
348 else
349 dwOffset += num_countries * sizeof (LINECOUNTRYENTRY);
351 max_subkey_len++;
352 subkey_name = HeapAlloc(GetProcessHeap(), 0, max_subkey_len);
353 for(i = 0; i < num_countries; i++)
355 DWORD len, size, size_int, size_long, size_name, size_same;
356 HKEY hsubkey;
358 if(RegEnumKeyA(hkey, i, subkey_name, max_subkey_len) !=
359 ERROR_SUCCESS)
360 continue;
362 if(dwCountryID && (atoi(subkey_name) != dwCountryID))
363 continue;
365 if(RegOpenKeyA(hkey, subkey_name, &hsubkey) != ERROR_SUCCESS)
366 continue;
368 RegQueryValueExA(hsubkey, "InternationalRule", NULL, NULL,
369 NULL, &size_int);
370 len = size_int;
372 RegQueryValueExA(hsubkey, "LongDistanceRule", NULL, NULL,
373 NULL, &size_long);
374 len += size_long;
376 RegQueryValueExA(hsubkey, "Name", NULL, NULL,
377 NULL, &size_name);
378 len += size_name;
380 RegQueryValueExA(hsubkey, "SameAreaRule", NULL, NULL,
381 NULL, &size_same);
382 len += size_same;
384 if(dwAvailSize < (dwOffset+len))
386 dwOffset += len;
387 RegCloseKey(hsubkey);
388 if(dwCountryID)
389 break;
390 continue;
393 lpLineCountryList->dwNumCountries++;
394 lpLineCountryList->dwCountryListSize += sizeof (LINECOUNTRYENTRY);
395 lpLineCountryList->dwUsedSize += len + sizeof (LINECOUNTRYENTRY);
397 if(dwCountryID)
398 i = 0;
400 lpLCE[i].dwCountryID = atoi(subkey_name);
401 size = sizeof(DWORD);
402 RegQueryValueExA(hsubkey, "CountryCode", NULL, NULL,
403 (BYTE*)&lpLCE[i].dwCountryCode, &size);
405 lpLCE[i].dwNextCountryID = 0;
407 if(i > 0)
408 lpLCE[i-1].dwNextCountryID = lpLCE[i].dwCountryID;
410 /* add country name */
411 lpLCE[i].dwCountryNameSize = size_name;
412 lpLCE[i].dwCountryNameOffset = dwOffset;
413 RegQueryValueExA(hsubkey, "Name", NULL, NULL,
414 ((LPBYTE)lpLineCountryList)+dwOffset,
415 &size_name);
416 dwOffset += size_name;
418 /* add Same Area Rule */
419 lpLCE[i].dwSameAreaRuleSize = size_same;
420 lpLCE[i].dwSameAreaRuleOffset = dwOffset;
421 RegQueryValueExA(hsubkey, "SameAreaRule", NULL, NULL,
422 ((LPBYTE)lpLineCountryList)+dwOffset,
423 &size_same);
424 dwOffset += size_same;
426 /* add Long Distance Rule */
427 lpLCE[i].dwLongDistanceRuleSize = size_long;
428 lpLCE[i].dwLongDistanceRuleOffset = dwOffset;
429 RegQueryValueExA(hsubkey, "LongDistanceRule", NULL, NULL,
430 ((LPBYTE)lpLineCountryList)+dwOffset,
431 &size_long);
432 dwOffset += size_long;
434 /* add Long Distance Rule */
435 lpLCE[i].dwInternationalRuleSize = size_int;
436 lpLCE[i].dwInternationalRuleOffset = dwOffset;
437 RegQueryValueExA(hsubkey, "InternationalRule", NULL, NULL,
438 ((LPBYTE)lpLineCountryList)+dwOffset,
439 &size_int);
440 dwOffset += size_int;
441 RegCloseKey(hsubkey);
443 TRACE("Added country %s at %p\n", (LPSTR)lpLineCountryList + lpLCE[i].dwCountryNameOffset,
444 &lpLCE[i]);
446 if(dwCountryID) break;
449 lpLineCountryList->dwNeededSize = dwOffset;
451 TRACE("%d available %d required\n", dwAvailSize, dwOffset);
453 HeapFree(GetProcessHeap(), 0, subkey_name);
454 RegCloseKey(hkey);
456 return 0;
459 /***********************************************************************
460 * lineGetDevCaps (TAPI32.@)
462 DWORD WINAPI lineGetDevCapsA(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, DWORD dwExtVersion, LPLINEDEVCAPS lpLineDevCaps)
464 FIXME("(%p, %08x, %08x, %08x, %p): stub.\n", hLineApp, dwDeviceID, dwAPIVersion, dwExtVersion, lpLineDevCaps);
465 return 0;
468 /***********************************************************************
469 * lineGetDevConfig (TAPI32.@)
471 DWORD WINAPI lineGetDevConfigA(DWORD dwDeviceID, LPVARSTRING lpDeviceConfig, LPCSTR lpszDeviceClass)
473 FIXME("(%08x, %p, %s): stub.\n", dwDeviceID, lpDeviceConfig, lpszDeviceClass);
474 return 0;
477 /***********************************************************************
478 * lineGetID (TAPI32.@)
480 DWORD WINAPI lineGetIDA(HLINE hLine, DWORD dwAddressID, HCALL hCall, DWORD dwSelect, LPVARSTRING lpDeviceID, LPCSTR lpszDeviceClass)
482 FIXME("(%p, %08x, %p, %08x, %p, %s): stub.\n", hLine, dwAddressID, hCall, dwSelect, lpDeviceID, lpszDeviceClass);
483 return 0;
486 /***********************************************************************
487 * lineGetIcon (TAPI32.@)
489 DWORD WINAPI lineGetIconA(DWORD dwDeviceID, LPCSTR lpszDeviceClass, HICON *lphIcon)
491 FIXME("(%08x, %s, %p): stub.\n", dwDeviceID, lpszDeviceClass, lphIcon);
492 return 0;
495 /***********************************************************************
496 * lineGetLineDevStatus (TAPI32.@)
498 DWORD WINAPI lineGetLineDevStatusA(HLINE hLine, LPLINEDEVSTATUS lpLineDevStatus)
500 FIXME("(%p, %p): stub.\n", hLine, lpLineDevStatus);
501 return 0;
504 /***********************************************************************
505 * lineGetNewCalls (TAPI32.@)
507 DWORD WINAPI lineGetNewCalls(HLINE hLine, DWORD dwAddressID, DWORD dwSelect, LPLINECALLLIST lpCallList)
509 FIXME("(%p, %08x, %08x, %p): stub.\n", hLine, dwAddressID, dwSelect, lpCallList);
510 return 0;
513 /***********************************************************************
514 * lineGetNumRings (TAPI32.@)
516 DWORD WINAPI lineGetNumRings(HLINE hLine, DWORD dwAddressID, LPDWORD lpdwNumRings)
518 FIXME("(%p, %08x, %p): stub.\n", hLine, dwAddressID, lpdwNumRings);
519 return 0;
522 /***********************************************************************
523 * lineGetProviderList (TAPI32.@)
525 DWORD WINAPI lineGetProviderListA(DWORD dwAPIVersion, LPLINEPROVIDERLIST lpProviderList)
527 FIXME("(%08x, %p): stub.\n", dwAPIVersion, lpProviderList);
528 return 0;
531 /***********************************************************************
532 * lineGetRequest (TAPI32.@)
534 DWORD WINAPI lineGetRequestA(HLINEAPP hLineApp, DWORD dwRequestMode, LPVOID lpRequestBuffer)
536 FIXME("%p, %08x, %p): stub.\n", hLineApp, dwRequestMode, lpRequestBuffer);
537 return 0;
540 /***********************************************************************
541 * lineGetStatusMessages (TAPI32.@)
543 DWORD WINAPI lineGetStatusMessages(HLINE hLine, LPDWORD lpdwLineStatus, LPDWORD lpdwAddressStates)
545 FIXME("(%p, %p, %p): stub.\n", hLine, lpdwLineStatus, lpdwAddressStates);
546 return 0;
549 /***********************************************************************
550 * lineGetTranslateCaps (TAPI32.@)
552 * get address translate capabilities. Returns a LINETRANSLATECAPS
553 * structure:
555 * +-----------------------+
556 * |TotalSize |
557 * |NeededSize |
558 * |UsedSize |
559 * +-----------------------+
560 * |NumLocations |
561 * |LocationsListSize |
562 * |LocationsListOffset | -+
563 * |CurrentLocationID | |
564 * +-----------------------+ |
565 * |NumCards | |
566 * |CardListSize | |
567 * |CardListOffset | -|--+
568 * |CurrentPreferredCardID | | |
569 * +-----------------------+ | |
570 * | | <+ |
571 * |LINELOCATIONENTRY #1 | |
572 * | | |
573 * +-----------------------+ |
574 * ~ ~ |
575 * +-----------------------+ |
576 * | | |
577 * |LINELOCATIONENTRY | |
578 * | #NumLocations| |
579 * +-----------------------+ |
580 * | | <---+
581 * |LINECARDENTRY #1 |
582 * | |
583 * +-----------------------+
584 * ~ ~
585 * +-----------------------+
586 * | |
587 * |LINECARDENTRY #NumCards|
588 * | |
589 * +-----------------------+
590 * | room for strings named|
591 * | in the structures |
592 * | above. |
593 * +-----------------------+
595 DWORD WINAPI lineGetTranslateCapsA(HLINEAPP hLineApp, DWORD dwAPIVersion,
596 LPLINETRANSLATECAPS lpTranslateCaps)
598 HKEY hkLocations, hkCards, hkCardLocations, hsubkey;
599 int numlocations, numcards;
600 DWORD maxlockeylen,
601 maxcardkeylen;
602 char *loc_key_name = NULL;
603 char *card_key_name = NULL;
604 LPBYTE strptr;
605 int length;
606 int i;
607 DWORD lendword;
608 DWORD currentid;
609 LPLINELOCATIONENTRY pLocEntry;
610 LPLINECARDENTRY pCardEntry;
612 TRACE("(%p, %08x, %p (tot. size %d)\n", hLineApp, dwAPIVersion,
613 lpTranslateCaps, lpTranslateCaps->dwTotalSize );
614 if( lpTranslateCaps->dwTotalSize < sizeof(LINETRANSLATECAPS))
615 return LINEERR_STRUCTURETOOSMALL;
616 if( RegCreateKeyA(HKEY_LOCAL_MACHINE, szLocationsKey, &hkLocations)
617 != ERROR_SUCCESS ) {
618 ERR("unexpected registry error 1.\n");
619 return LINEERR_INIFILECORRUPT;
621 lendword = sizeof( DWORD);
622 if( RegQueryValueExA( hkLocations, "CurrentID", NULL, NULL,
623 (LPBYTE) &currentid, &lendword) != ERROR_SUCCESS )
624 currentid = -1; /* change this later */
625 if(RegQueryInfoKeyA(hkLocations, NULL, NULL, NULL, NULL, &maxlockeylen,
626 NULL, NULL, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) {
627 RegCloseKey(hkLocations);
628 ERR("unexpected registry error 2.\n");
629 return LINEERR_INIFILECORRUPT;
631 maxlockeylen++;
632 if( maxlockeylen < 10)
633 maxlockeylen = 10; /* need this also if there is no key */
634 loc_key_name = HeapAlloc( GetProcessHeap(), 0, maxlockeylen);
635 /* first time through: calculate needed space */
636 length=0;
637 i=0;
638 numlocations=0;
639 while( RegEnumKeyA(hkLocations, i, loc_key_name, maxlockeylen)
640 == ERROR_SUCCESS){
641 DWORD size_val;
642 i++;
643 if( strncasecmp(loc_key_name, "location", 8) ||
644 (RegOpenKeyA(hkLocations, loc_key_name, &hsubkey)
645 != ERROR_SUCCESS))
646 continue;
647 numlocations++;
648 length += sizeof(LINELOCATIONENTRY);
649 RegQueryValueExA(hsubkey, "Name",NULL,NULL,NULL,&size_val);
650 length += size_val;
651 RegQueryValueExA(hsubkey, "AreaCode",NULL,NULL,NULL,&size_val);
652 length += size_val;
653 RegQueryValueExA(hsubkey, "OutsideAccess",NULL,NULL,NULL,&size_val);
654 length += size_val;
655 RegQueryValueExA(hsubkey, "LongDistanceAccess",NULL,NULL,NULL,&size_val);
656 length += size_val;
657 RegQueryValueExA(hsubkey, "DisableCallWaiting",NULL,NULL,NULL,&size_val);
658 length += size_val;
659 /* fixme: what about TollPrefixList???? */
660 RegCloseKey(hsubkey);
662 if(numlocations == 0) {
663 /* add one location */
664 if( RegCreateKeyA( hkLocations, "Location1", &hsubkey)
665 == ERROR_SUCCESS) {
666 DWORD dwval;
667 char buf[10];
668 numlocations = 1;
669 length += sizeof(LINELOCATIONENTRY) + 20 ;
670 RegSetValueExA( hsubkey, "AreaCode", 0, REG_SZ, (const BYTE *)"010", 4);
671 GetLocaleInfoA( LOCALE_SYSTEM_DEFAULT, LOCALE_ICOUNTRY, buf, 8);
672 dwval = atoi(buf);
673 RegSetValueExA( hsubkey, "Country", 0, REG_DWORD, (LPBYTE)&dwval,
674 sizeof(DWORD));
675 RegSetValueExA( hsubkey, "DisableCallWaiting", 0, REG_SZ, (const BYTE *)"", 1);
676 dwval = 1;
677 RegSetValueExA( hsubkey, "Flags", 0, REG_DWORD, (LPBYTE)&dwval,
678 sizeof(DWORD));
679 RegSetValueExA( hsubkey, "LongDistanceAccess", 0, REG_SZ, (const BYTE *)"", 1);
680 RegSetValueExA( hsubkey, "Name", 0, REG_SZ, (const BYTE *)"New Location", 13);
681 RegSetValueExA( hsubkey, "OutsideAccess", 0, REG_SZ, (const BYTE *)"", 1);
682 RegCloseKey(hsubkey);
683 dwval = 1;
684 RegSetValueExA( hkLocations, "CurrentID", 0, REG_DWORD,
685 (LPBYTE)&dwval, sizeof(DWORD));
686 dwval = 2;
687 RegSetValueExA( hkLocations, "NextID", 0, REG_DWORD, (LPBYTE)&dwval,
688 sizeof(DWORD));
691 /* do the card list */
692 numcards=0;
693 if( RegCreateKeyA(HKEY_CURRENT_USER, szCardsKey, &hkCards)
694 == ERROR_SUCCESS ) {
695 if(RegQueryInfoKeyA(hkCards, NULL, NULL, NULL, NULL, &maxcardkeylen,
696 NULL, NULL, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) {
697 maxcardkeylen++;
698 if( maxcardkeylen < 6) maxcardkeylen = 6;
699 card_key_name = HeapAlloc(GetProcessHeap(), 0, maxcardkeylen);
700 i=0;
701 while( RegEnumKeyA(hkCards, i, card_key_name, maxcardkeylen) ==
702 ERROR_SUCCESS){
703 DWORD size_val;
704 i++;
705 if( strncasecmp(card_key_name, "card", 4) || ERROR_SUCCESS !=
706 (RegOpenKeyA(hkCards, card_key_name, &hsubkey) ))
707 continue;
708 numcards++;
709 length += sizeof(LINECARDENTRY);
710 RegQueryValueExA(hsubkey, "Name",NULL,NULL,NULL,&size_val);
711 length += size_val;
712 RegQueryValueExA(hsubkey, "LocalRule",NULL,NULL,NULL,&size_val);
713 length += size_val;
714 RegQueryValueExA(hsubkey, "LDRule",NULL,NULL,NULL,&size_val);
715 length += size_val;
716 RegQueryValueExA(hsubkey, "InternationalRule",NULL,NULL,NULL,
717 &size_val);
718 length += size_val;
719 RegCloseKey(hsubkey);
722 /* add one card (direct call) */
723 if (numcards == 0 &&
724 ERROR_SUCCESS == RegCreateKeyA( hkCards, "Card1", &hsubkey)) {
725 DWORD dwval;
726 numcards = 1;
727 length += sizeof(LINECARDENTRY) + 22 ;
728 RegSetValueExA( hsubkey, "Name", 0, REG_SZ, (const BYTE *)"None (Direct Call)", 19);
729 dwval = 1;
730 RegSetValueExA( hsubkey, "Flags", 0, REG_DWORD, (LPBYTE)&dwval,
731 sizeof(DWORD));
732 RegSetValueExA( hsubkey, "InternationalRule", 0, REG_SZ, (const BYTE *)"", 1);
733 RegSetValueExA( hsubkey, "LDRule", 0, REG_SZ, (const BYTE *)"", 1);
734 RegSetValueExA( hsubkey, "LocalRule", 0, REG_SZ, (const BYTE *)"", 1);
735 RegCloseKey(hsubkey);
736 dwval = 2;
737 RegSetValueExA( hkCards, "NextID", 0, REG_DWORD, (LPBYTE)&dwval,
738 sizeof(DWORD));
740 } else hkCards = 0; /* should really fail */
741 /* check if sufficient room is available */
742 lpTranslateCaps->dwNeededSize = sizeof(LINETRANSLATECAPS) + length;
743 if ( lpTranslateCaps->dwNeededSize > lpTranslateCaps->dwTotalSize ) {
744 RegCloseKey( hkLocations);
745 if( hkCards) RegCloseKey( hkCards);
746 HeapFree(GetProcessHeap(), 0, loc_key_name);
747 HeapFree(GetProcessHeap(), 0, card_key_name);
748 lpTranslateCaps->dwUsedSize = sizeof(LINETRANSLATECAPS);
749 TRACE("Insufficient space: total %d needed %d used %d\n",
750 lpTranslateCaps->dwTotalSize,
751 lpTranslateCaps->dwNeededSize,
752 lpTranslateCaps->dwUsedSize);
753 return 0;
755 /* fill in the LINETRANSLATECAPS structure */
756 lpTranslateCaps->dwUsedSize = lpTranslateCaps->dwNeededSize;
757 lpTranslateCaps->dwNumLocations = numlocations;
758 lpTranslateCaps->dwLocationListSize = sizeof(LINELOCATIONENTRY) *
759 lpTranslateCaps->dwNumLocations;
760 lpTranslateCaps->dwLocationListOffset = sizeof(LINETRANSLATECAPS);
761 lpTranslateCaps->dwCurrentLocationID = currentid;
762 lpTranslateCaps->dwNumCards = numcards;
763 lpTranslateCaps->dwCardListSize = sizeof(LINECARDENTRY) *
764 lpTranslateCaps->dwNumCards;
765 lpTranslateCaps->dwCardListOffset = lpTranslateCaps->dwLocationListOffset +
766 lpTranslateCaps->dwLocationListSize;
767 lpTranslateCaps->dwCurrentPreferredCardID = 0;
768 /* this is where the strings will be stored */
769 strptr = ((LPBYTE) lpTranslateCaps) +
770 lpTranslateCaps->dwCardListOffset + lpTranslateCaps->dwCardListSize;
771 pLocEntry = (LPLINELOCATIONENTRY) (lpTranslateCaps + 1);
772 /* key with Preferred CardID's */
773 if( RegOpenKeyA(HKEY_CURRENT_USER, szLocationsKey, &hkCardLocations)
774 != ERROR_SUCCESS )
775 hkCardLocations = 0;
776 /* second time through all locations */
777 i=0;
778 while(RegEnumKeyA(hkLocations, i, loc_key_name, maxlockeylen)
779 == ERROR_SUCCESS){
780 DWORD size_val;
781 i++;
782 if( strncasecmp(loc_key_name, "location", 8) ||
783 (RegOpenKeyA(hkLocations, loc_key_name, &hsubkey)
784 != ERROR_SUCCESS))
785 continue;
786 size_val=sizeof(DWORD);
787 if( RegQueryValueExA(hsubkey, "ID",NULL, NULL,
788 (LPBYTE) &(pLocEntry->dwPermanentLocationID), &size_val) !=
789 ERROR_SUCCESS)
790 pLocEntry->dwPermanentLocationID = atoi( loc_key_name + 8);
791 size_val=2048;
792 RegQueryValueExA(hsubkey, "Name",NULL,NULL, strptr, &size_val);
793 pLocEntry->dwLocationNameSize = size_val;
794 pLocEntry->dwLocationNameOffset = strptr - (LPBYTE) lpTranslateCaps;
795 strptr += size_val;
797 size_val=2048;
798 RegQueryValueExA(hsubkey, "AreaCode",NULL,NULL, strptr, &size_val);
799 pLocEntry->dwCityCodeSize = size_val;
800 pLocEntry->dwCityCodeOffset = strptr - (LPBYTE) lpTranslateCaps;
801 strptr += size_val;
803 size_val=2048;
804 RegQueryValueExA(hsubkey, "OutsideAccess",NULL,NULL, strptr, &size_val);
805 pLocEntry->dwLocalAccessCodeSize = size_val;
806 pLocEntry->dwLocalAccessCodeOffset = strptr - (LPBYTE) lpTranslateCaps;
807 strptr += size_val;
808 size_val=2048;
809 RegQueryValueExA(hsubkey, "LongDistanceAccess",NULL,NULL, strptr,
810 &size_val);
811 pLocEntry->dwLongDistanceAccessCodeSize= size_val;
812 pLocEntry->dwLongDistanceAccessCodeOffset= strptr -
813 (LPBYTE) lpTranslateCaps;
814 strptr += size_val;
815 size_val=2048;
816 RegQueryValueExA(hsubkey, "DisableCallWaiting",NULL,NULL, strptr,
817 &size_val);
818 pLocEntry->dwCancelCallWaitingSize= size_val;
819 pLocEntry->dwCancelCallWaitingOffset= strptr - (LPBYTE) lpTranslateCaps;
820 strptr += size_val;
822 pLocEntry->dwTollPrefixListSize = 0; /* FIXME */
823 pLocEntry->dwTollPrefixListOffset = 0; /* FIXME */
825 size_val=sizeof(DWORD);
826 RegQueryValueExA(hsubkey, "Country",NULL,NULL,
827 (LPBYTE) &(pLocEntry->dwCountryCode), &size_val);
828 pLocEntry->dwCountryID = pLocEntry->dwCountryCode; /* FIXME */
829 RegQueryValueExA(hsubkey, "Flags",NULL,NULL,
830 (LPBYTE) &(pLocEntry->dwOptions), &size_val);
831 RegCloseKey(hsubkey);
832 /* get preferred cardid */
833 pLocEntry->dwPreferredCardID = 0;
834 if ( hkCardLocations) {
835 size_val=sizeof(DWORD);
836 if(RegOpenKeyA(hkCardLocations, loc_key_name, &hsubkey) ==
837 ERROR_SUCCESS) {
838 RegQueryValueExA(hsubkey, "CallingCard",NULL,NULL,
839 (LPBYTE) &(pLocEntry->dwPreferredCardID), &size_val);
840 RegCloseKey(hsubkey);
844 /* make sure there is a currentID */
845 if(currentid == -1){
846 currentid = pLocEntry->dwPermanentLocationID;
847 lpTranslateCaps->dwCurrentLocationID = currentid;
849 if(pLocEntry->dwPermanentLocationID == currentid )
850 lpTranslateCaps->dwCurrentPreferredCardID =
851 pLocEntry->dwPreferredCardID;
852 TRACE("added: ID %d %s CountryCode %d CityCode %s CardID %d "
853 "LocalAccess: %s LongDistanceAccess: %s CountryID %d "
854 "Options %d CancelCallWait %s\n",
855 pLocEntry->dwPermanentLocationID,
856 debugstr_a( (char*)lpTranslateCaps + pLocEntry->dwLocationNameOffset),
857 pLocEntry->dwCountryCode,
858 debugstr_a( (char*)lpTranslateCaps + pLocEntry->dwCityCodeOffset),
859 pLocEntry->dwPreferredCardID,
860 debugstr_a( (char*)lpTranslateCaps + pLocEntry->dwLocalAccessCodeOffset),
861 debugstr_a( (char*)lpTranslateCaps + pLocEntry->dwLongDistanceAccessCodeOffset),
862 pLocEntry->dwCountryID,
863 pLocEntry->dwOptions,
864 debugstr_a( (char*)lpTranslateCaps + pLocEntry->dwCancelCallWaitingOffset));
865 pLocEntry++;
867 pCardEntry= (LPLINECARDENTRY) pLocEntry;
868 /* do the card list */
869 if( hkCards) {
870 i=0;
871 while( RegEnumKeyA(hkCards, i, card_key_name, maxcardkeylen) ==
872 ERROR_SUCCESS){
873 DWORD size_val;
874 i++;
875 if( strncasecmp(card_key_name, "card", 4) ||
876 (RegOpenKeyA(hkCards, card_key_name, &hsubkey) != ERROR_SUCCESS))
877 continue;
878 size_val=sizeof(DWORD);
879 if( RegQueryValueExA(hsubkey, "ID",NULL, NULL,
880 (LPBYTE) &(pCardEntry->dwPermanentCardID), &size_val) !=
881 ERROR_SUCCESS)
882 pCardEntry->dwPermanentCardID= atoi( card_key_name + 4);
883 size_val=2048;
884 RegQueryValueExA(hsubkey, "Name",NULL,NULL, strptr, &size_val);
885 pCardEntry->dwCardNameSize = size_val;
886 pCardEntry->dwCardNameOffset = strptr - (LPBYTE) lpTranslateCaps;
887 strptr += size_val;
888 pCardEntry->dwCardNumberDigits = 1; /* FIXME */
889 size_val=2048;
890 RegQueryValueExA(hsubkey, "LocalRule",NULL,NULL, strptr, &size_val);
891 pCardEntry->dwSameAreaRuleSize= size_val;
892 pCardEntry->dwSameAreaRuleOffset= strptr - (LPBYTE) lpTranslateCaps;
893 strptr += size_val;
894 size_val=2048;
895 RegQueryValueExA(hsubkey, "LDRule",NULL,NULL, strptr, &size_val);
896 pCardEntry->dwLongDistanceRuleSize = size_val;
897 pCardEntry->dwLongDistanceRuleOffset = strptr - (LPBYTE) lpTranslateCaps;
898 strptr += size_val;
899 size_val=2048;
900 RegQueryValueExA(hsubkey, "InternationalRule",NULL,NULL, strptr,
901 &size_val);
902 pCardEntry->dwInternationalRuleSize = size_val;
903 pCardEntry->dwInternationalRuleOffset = strptr -
904 (LPBYTE) lpTranslateCaps;
905 strptr += size_val;
906 size_val=sizeof(DWORD);
907 RegQueryValueExA(hsubkey, "Flags",NULL, NULL,
908 (LPBYTE) &(pCardEntry->dwOptions), &size_val);
909 TRACE( "added card: ID %d name %s SameArea %s LongDistance %s International %s Options 0x%x\n",
910 pCardEntry->dwPermanentCardID,
911 debugstr_a( (char*)lpTranslateCaps + pCardEntry->dwCardNameOffset),
912 debugstr_a( (char*)lpTranslateCaps + pCardEntry->dwSameAreaRuleOffset),
913 debugstr_a( (char*)lpTranslateCaps + pCardEntry->dwLongDistanceRuleOffset),
914 debugstr_a( (char*)lpTranslateCaps + pCardEntry->dwInternationalRuleOffset),
915 pCardEntry->dwOptions);
917 pCardEntry++;
921 if(hkLocations) RegCloseKey(hkLocations);
922 if(hkCards) RegCloseKey(hkCards);
923 if(hkCardLocations) RegCloseKey(hkCardLocations);
924 HeapFree(GetProcessHeap(), 0, loc_key_name);
925 HeapFree(GetProcessHeap(), 0, card_key_name);
926 TRACE(" returning success tot %d needed %d used %d\n",
927 lpTranslateCaps->dwTotalSize,
928 lpTranslateCaps->dwNeededSize,
929 lpTranslateCaps->dwUsedSize );
930 return 0; /* success */
933 /***********************************************************************
934 * lineHandoff (TAPI32.@)
936 DWORD WINAPI lineHandoffA(HCALL hCall, LPCSTR lpszFileName, DWORD dwMediaMode)
938 FIXME("(%p, %s, %08x): stub.\n", hCall, lpszFileName, dwMediaMode);
939 return 0;
942 /***********************************************************************
943 * lineHold (TAPI32.@)
945 DWORD WINAPI lineHold(HCALL hCall)
947 FIXME("(%p): stub.\n", hCall);
948 return 1;
951 /***********************************************************************
952 * lineInitialize (TAPI32.@)
954 DWORD WINAPI lineInitialize(
955 LPHLINEAPP lphLineApp,
956 HINSTANCE hInstance,
957 LINECALLBACK lpfnCallback,
958 LPCSTR lpszAppName,
959 LPDWORD lpdwNumDevs)
961 FIXME("(%p, %p, %p, %s, %p): stub.\n", lphLineApp, hInstance,
962 lpfnCallback, debugstr_a(lpszAppName), lpdwNumDevs);
963 return 0;
966 /***********************************************************************
967 * lineInitializeExA (TAPI32.@)
969 LONG WINAPI lineInitializeExA(LPHLINEAPP lphLineApp, HINSTANCE hInstance, LINECALLBACK lpfnCallback, LPCSTR lpszFriendlyAppName, LPDWORD lpdwNumDevs, LPDWORD lpdwAPIVersion, LPLINEINITIALIZEEXPARAMS lpLineInitializeExParams)
971 FIXME("(%p, %p, %p, %s, %p, %p, %p): stub.\n", lphLineApp, hInstance,
972 lpfnCallback, debugstr_a(lpszFriendlyAppName), lpdwNumDevs, lpdwAPIVersion, lpLineInitializeExParams);
973 return 0;
976 /***********************************************************************
977 * lineMakeCall (TAPI32.@)
979 DWORD WINAPI lineMakeCallA(HLINE hLine, LPHCALL lphCall, LPCSTR lpszDestAddress, DWORD dwCountryCode, LPLINECALLPARAMS lpCallParams)
981 FIXME("(%p, %p, %s, %08x, %p): stub.\n", hLine, lphCall, lpszDestAddress, dwCountryCode, lpCallParams);
982 return 1;
985 /***********************************************************************
986 * lineMonitorDigits (TAPI32.@)
988 DWORD WINAPI lineMonitorDigits(HCALL hCall, DWORD dwDigitModes)
990 FIXME("(%p, %08x): stub.\n", hCall, dwDigitModes);
991 return 0;
994 /***********************************************************************
995 * lineMonitorMedia (TAPI32.@)
997 DWORD WINAPI lineMonitorMedia(HCALL hCall, DWORD dwMediaModes)
999 FIXME("(%p, %08x): stub.\n", hCall, dwMediaModes);
1000 return 0;
1003 /***********************************************************************
1004 * lineMonitorTones (TAPI32.@)
1006 DWORD WINAPI lineMonitorTones(HCALL hCall, LPLINEMONITORTONE lpToneList, DWORD dwNumEntries)
1008 FIXME("(%p, %p, %08x): stub.\n", hCall, lpToneList, dwNumEntries);
1009 return 0;
1012 /***********************************************************************
1013 * lineNegotiateAPIVersion (TAPI32.@)
1015 DWORD WINAPI lineNegotiateAPIVersion(
1016 HLINEAPP hLineApp,
1017 DWORD dwDeviceID,
1018 DWORD dwAPILowVersion,
1019 DWORD dwAPIHighVersion,
1020 LPDWORD lpdwAPIVersion,
1021 LPLINEEXTENSIONID lpExtensionID
1024 FIXME("(%p, %d, %d, %d, %p, %p): stub.\n", hLineApp, dwDeviceID,
1025 dwAPILowVersion, dwAPIHighVersion, lpdwAPIVersion, lpExtensionID);
1026 *lpdwAPIVersion = dwAPIHighVersion;
1027 return 0;
1030 /***********************************************************************
1031 * lineNegotiateExtVersion (TAPI32.@)
1033 DWORD WINAPI lineNegotiateExtVersion(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, DWORD dwExtLowVersion, DWORD dwExtHighVersion, LPDWORD lpdwExtVersion)
1035 FIXME("stub.\n");
1036 return 0;
1039 /***********************************************************************
1040 * lineOpen (TAPI32.@)
1042 DWORD WINAPI lineOpenA(HLINEAPP hLineApp, DWORD dwDeviceID, LPHLINE lphLine, DWORD dwAPIVersion, DWORD dwExtVersion, DWORD dwCallbackInstance, DWORD dwPrivileges, DWORD dwMediaModes, LPLINECALLPARAMS lpCallParams)
1044 FIXME("stub.\n");
1045 return 0;
1048 /***********************************************************************
1049 * linePark (TAPI32.@)
1051 DWORD WINAPI lineParkA(HCALL hCall, DWORD dwParkMode, LPCSTR lpszDirAddress, LPVARSTRING lpNonDirAddress)
1053 FIXME("(%p, %08x, %s, %p): stub.\n", hCall, dwParkMode, lpszDirAddress, lpNonDirAddress);
1054 return 1;
1057 /***********************************************************************
1058 * linePickup (TAPI32.@)
1060 DWORD WINAPI linePickupA(HLINE hLine, DWORD dwAddressID, LPHCALL lphCall, LPCSTR lpszDestAddress, LPCSTR lpszGroupID)
1062 FIXME("(%p, %08x, %p, %s, %s): stub.\n", hLine, dwAddressID, lphCall, lpszDestAddress, lpszGroupID);
1063 return 1;
1066 /***********************************************************************
1067 * linePrepareAddToConference (TAPI32.@)
1069 DWORD WINAPI linePrepareAddToConferenceA(HCALL hConfCall, LPHCALL lphConsultCall, LPLINECALLPARAMS lpCallParams)
1071 FIXME("(%p, %p, %p): stub.\n", hConfCall, lphConsultCall, lpCallParams);
1072 return 1;
1075 /***********************************************************************
1076 * lineRedirect (TAPI32.@)
1078 DWORD WINAPI lineRedirectA(
1079 HCALL hCall,
1080 LPCSTR lpszDestAddress,
1081 DWORD dwCountryCode) {
1083 FIXME(": stub.\n");
1084 return 1;
1087 /***********************************************************************
1088 * lineRegisterRequestRecipient (TAPI32.@)
1090 DWORD WINAPI lineRegisterRequestRecipient(HLINEAPP hLineApp, DWORD dwRegistrationInstance, DWORD dwRequestMode, DWORD dwEnable)
1092 FIXME("(%p, %08x, %08x, %08x): stub.\n", hLineApp, dwRegistrationInstance, dwRequestMode, dwEnable);
1093 return 1;
1096 /***********************************************************************
1097 * lineReleaseUserUserInfo (TAPI32.@)
1099 DWORD WINAPI lineReleaseUserUserInfo(HCALL hCall)
1101 FIXME("(%p): stub.\n", hCall);
1102 return 1;
1105 /***********************************************************************
1106 * lineRemoveFromConference (TAPI32.@)
1108 DWORD WINAPI lineRemoveFromConference(HCALL hCall)
1110 FIXME("(%p): stub.\n", hCall);
1111 return 1;
1114 /***********************************************************************
1115 * lineRemoveProvider (TAPI32.@)
1117 DWORD WINAPI lineRemoveProvider(DWORD dwPermanentProviderID, HWND hwndOwner)
1119 FIXME("(%08x, %p): stub.\n", dwPermanentProviderID, hwndOwner);
1120 return 1;
1123 /***********************************************************************
1124 * lineSecureCall (TAPI32.@)
1126 DWORD WINAPI lineSecureCall(HCALL hCall)
1128 FIXME("(%p): stub.\n", hCall);
1129 return 1;
1132 /***********************************************************************
1133 * lineSendUserUserInfo (TAPI32.@)
1135 DWORD WINAPI lineSendUserUserInfo(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize)
1137 FIXME("(%p, %s, %08x): stub.\n", hCall, lpsUserUserInfo, dwSize);
1138 return 1;
1141 /***********************************************************************
1142 * lineSetAppPriority (TAPI32.@)
1144 DWORD WINAPI lineSetAppPriorityA(LPCSTR lpszAppFilename, DWORD dwMediaMode, LPLINEEXTENSIONID const lpExtensionID, DWORD dwRequestMode, LPCSTR lpszExtensionName, DWORD dwPriority)
1146 FIXME("(%s, %08x, %p, %08x, %s, %08x): stub.\n", lpszAppFilename, dwMediaMode, lpExtensionID, dwRequestMode, lpszExtensionName, dwPriority);
1147 return 0;
1150 /***********************************************************************
1151 * lineSetAppSpecific (TAPI32.@)
1153 DWORD WINAPI lineSetAppSpecific(HCALL hCall, DWORD dwAppSpecific)
1155 FIXME("(%p, %08x): stub.\n", hCall, dwAppSpecific);
1156 return 0;
1159 /***********************************************************************
1160 * lineSetCallParams (TAPI32.@)
1162 DWORD WINAPI lineSetCallParams(HCALL hCall, DWORD dwBearerMode, DWORD dwMinRate, DWORD dwMaxRate, LPLINEDIALPARAMS lpDialParams)
1164 FIXME("(%p, %08x, %08x, %08x, %p): stub.\n", hCall, dwBearerMode, dwMinRate, dwMaxRate, lpDialParams);
1165 return 1;
1168 /***********************************************************************
1169 * lineSetCallPrivilege (TAPI32.@)
1171 DWORD WINAPI lineSetCallPrivilege(HCALL hCall, DWORD dwCallPrivilege)
1173 FIXME("(%p, %08x): stub.\n", hCall, dwCallPrivilege);
1174 return 0;
1177 /***********************************************************************
1178 * lineSetCurrentLocation (TAPI32.@)
1180 DWORD WINAPI lineSetCurrentLocation(HLINEAPP hLineApp, DWORD dwLocation)
1182 FIXME("(%p, %08x): stub.\n", hLineApp, dwLocation);
1183 return 0;
1186 /***********************************************************************
1187 * lineSetDevConfig (TAPI32.@)
1189 DWORD WINAPI lineSetDevConfigA(DWORD dwDeviceID, LPVOID lpDeviceConfig, DWORD dwSize, LPCSTR lpszDeviceClass)
1191 FIXME("(%08x, %p, %08x, %s): stub.\n", dwDeviceID, lpDeviceConfig, dwSize, lpszDeviceClass);
1192 return 0;
1195 /***********************************************************************
1196 * lineSetMediaControl (TAPI32.@)
1198 DWORD WINAPI lineSetMediaControl(
1199 HLINE hLine,
1200 DWORD dwAddressID,
1201 HCALL hCall,
1202 DWORD dwSelect,
1203 LPLINEMEDIACONTROLDIGIT const lpDigitList,
1204 DWORD dwDigitNumEntries,
1205 LPLINEMEDIACONTROLMEDIA const lpMediaList,
1206 DWORD dwMediaNumEntries,
1207 LPLINEMEDIACONTROLTONE const lpToneList,
1208 DWORD dwToneNumEntries,
1209 LPLINEMEDIACONTROLCALLSTATE const lpCallStateList,
1210 DWORD dwCallStateNumEntries)
1212 FIXME(": stub.\n");
1213 return 0;
1216 /***********************************************************************
1217 * lineSetMediaMode (TAPI32.@)
1219 DWORD WINAPI lineSetMediaMode(HCALL hCall, DWORD dwMediaModes)
1221 FIXME("(%p, %08x): stub.\n", hCall, dwMediaModes);
1222 return 0;
1225 /***********************************************************************
1226 * lineSetNumRings (TAPI32.@)
1228 DWORD WINAPI lineSetNumRings(HLINE hLine, DWORD dwAddressID, DWORD dwNumRings)
1230 FIXME("(%p, %08x, %08x): stub.\n", hLine, dwAddressID, dwNumRings);
1231 return 0;
1234 /***********************************************************************
1235 * lineSetStatusMessages (TAPI32.@)
1237 DWORD WINAPI lineSetStatusMessages(HLINE hLine, DWORD dwLineStates, DWORD dwAddressStates)
1239 FIXME("(%p, %08x, %08x): stub.\n", hLine, dwLineStates, dwAddressStates);
1240 return 0;
1243 /***********************************************************************
1244 * lineSetTerminal (TAPI32.@)
1246 DWORD WINAPI lineSetTerminal(HLINE hLine, DWORD dwAddressID, HCALL hCall, DWORD dwSelect, DWORD dwTerminalModes, DWORD dwTerminalID, DWORD bEnable)
1248 FIXME("(%p, %08x, %p, %08x, %08x, %08x, %08x): stub.\n", hLine, dwAddressID, hCall, dwSelect, dwTerminalModes, dwTerminalID, bEnable);
1249 return 1;
1252 /***********************************************************************
1253 * lineSetTollList (TAPI32.@)
1255 DWORD WINAPI lineSetTollListA(HLINEAPP hLineApp, DWORD dwDeviceID, LPCSTR lpszAddressIn, DWORD dwTollListOption)
1257 FIXME("(%p, %08x, %s, %08x): stub.\n", hLineApp, dwDeviceID, lpszAddressIn, dwTollListOption);
1258 return 0;
1261 /***********************************************************************
1262 * lineSetupConference (TAPI32.@)
1264 DWORD WINAPI lineSetupConferenceA(HCALL hCall, HLINE hLine, LPHCALL lphConfCall, LPHCALL lphConsultCall, DWORD dwNumParties, LPLINECALLPARAMS lpCallParams)
1266 FIXME("(%p, %p, %p, %p, %08x, %p): stub.\n", hCall, hLine, lphConfCall, lphConsultCall, dwNumParties, lpCallParams);
1267 return 1;
1270 /***********************************************************************
1271 * lineSetupTransfer (TAPI32.@)
1273 DWORD WINAPI lineSetupTransferA(HCALL hCall, LPHCALL lphConsultCall, LPLINECALLPARAMS lpCallParams)
1275 FIXME("(%p, %p, %p): stub.\n", hCall, lphConsultCall, lpCallParams);
1276 return 1;
1279 /***********************************************************************
1280 * lineShutdown (TAPI32.@)
1282 DWORD WINAPI lineShutdown(HLINEAPP hLineApp)
1284 FIXME("(%p): stub.\n", hLineApp);
1285 return 0;
1288 /***********************************************************************
1289 * lineSwapHold (TAPI32.@)
1291 DWORD WINAPI lineSwapHold(HCALL hActiveCall, HCALL hHeldCall)
1293 FIXME("(active: %p, held: %p): stub.\n", hActiveCall, hHeldCall);
1294 return 1;
1297 /***********************************************************************
1298 * lineTranslateAddress (TAPI32.@)
1300 DWORD WINAPI lineTranslateAddressA(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, LPCSTR lpszAddressIn, DWORD dwCard, DWORD dwTranslateOptions, LPLINETRANSLATEOUTPUT lpTranslateOutput)
1302 FIXME("(%p, %08x, %08x, %s, %08x, %08x, %p): stub.\n", hLineApp, dwDeviceID, dwAPIVersion, lpszAddressIn, dwCard, dwTranslateOptions, lpTranslateOutput);
1303 return 0;
1306 /***********************************************************************
1307 * lineTranslateDialog (TAPI32.@)
1309 DWORD WINAPI lineTranslateDialogA(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, HWND hwndOwner, LPCSTR lpszAddressIn)
1311 FIXME("(%p, %08x, %08x, %p, %s): stub.\n", hLineApp, dwDeviceID, dwAPIVersion, hwndOwner, lpszAddressIn);
1312 return 0;
1315 /***********************************************************************
1316 * lineUncompleteCall (TAPI32.@)
1318 DWORD WINAPI lineUncompleteCall(HLINE hLine, DWORD dwCompletionID)
1320 FIXME("(%p, %08x): stub.\n", hLine, dwCompletionID);
1321 return 1;
1324 /***********************************************************************
1325 * lineUnhold (TAPI32.@)
1327 DWORD WINAPI lineUnhold(HCALL hCall)
1329 FIXME("(%p): stub.\n", hCall);
1330 return 1;
1333 /***********************************************************************
1334 * lineUnpark (TAPI32.@)
1336 DWORD WINAPI lineUnparkA(HLINE hLine, DWORD dwAddressID, LPHCALL lphCall, LPCSTR lpszDestAddress)
1338 FIXME("(%p, %08x, %p, %s): stub.\n", hLine, dwAddressID, lphCall, lpszDestAddress);
1339 return 1;