diff --git a/reactos/baseaddress.rbuild b/reactos/baseaddress.rbuild
index 61bbedb9a54..00e2219ab93 100644
--- a/reactos/baseaddress.rbuild
+++ b/reactos/baseaddress.rbuild
@@ -14,6 +14,7 @@
+
diff --git a/reactos/boot/bootdata/packages/reactos.dff b/reactos/boot/bootdata/packages/reactos.dff
index d6db1449cf3..8cbd4fd09c1 100644
--- a/reactos/boot/bootdata/packages/reactos.dff
+++ b/reactos/boot/bootdata/packages/reactos.dff
@@ -256,6 +256,7 @@ dll\win32\smdll\smdll.dll 1
dll\win32\snmpapi\snmpapi.dll 1
dll\win32\stdole2.tlb\stdole2.tlb 1
dll\win32\syssetup\syssetup.dll 1
+dll\win32\tapi32\tapi32.dll 1
dll\win32\tapiui\tapiui.dll 1
dll\win32\twain_32\twain_32.dll 1
dll\win32\ufat\ufat.dll 1
diff --git a/reactos/dll/win32/tapi32/assisted.c b/reactos/dll/win32/tapi32/assisted.c
new file mode 100644
index 00000000000..7c3c3e8cc75
--- /dev/null
+++ b/reactos/dll/win32/tapi32/assisted.c
@@ -0,0 +1,93 @@
+/*
+ * TAPI32 Assisted Telephony
+ *
+ * Copyright 1999 Andreas Mohr
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include
+#include
+#include "windef.h"
+#include "winbase.h"
+#include "wingdi.h"
+#include "winreg.h"
+#include "objbase.h"
+#include "tapi.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(tapi);
+
+/***********************************************************************
+ * tapiGetLocationInfo (TAPI32.@)
+ */
+DWORD WINAPI tapiGetLocationInfoA(LPSTR lpszCountryCode, LPSTR lpszCityCode)
+{
+ HKEY hkey, hsubkey;
+ DWORD currid;
+ DWORD valsize;
+ DWORD type;
+ DWORD bufsize;
+ BYTE buf[100];
+ char szlockey[20];
+ if(!RegOpenKeyA(HKEY_LOCAL_MACHINE,
+ "Software\\Microsoft\\Windows\\CurrentVersion\\Telephony\\Locations",
+ &hkey) != ERROR_SUCCESS) {
+ valsize = sizeof( DWORD);
+ if(!RegQueryValueExA(hkey, "CurrentID", 0, &type, (LPBYTE) &currid,
+ &valsize) && type == REG_DWORD) {
+ /* find a subkey called Location1, Location2... */
+ sprintf( szlockey, "Location%lu", currid);
+ if( !RegOpenKeyA( hkey, szlockey, &hsubkey)) {
+ if( lpszCityCode) {
+ bufsize=sizeof(buf);
+ if( !RegQueryValueExA( hsubkey, "AreaCode", 0, &type, buf,
+ &bufsize) && type == REG_SZ) {
+ lstrcpynA( lpszCityCode, (char *) buf, 8);
+ } else
+ lpszCityCode[0] = '\0';
+ }
+ if( lpszCountryCode) {
+ bufsize=sizeof(buf);
+ if( !RegQueryValueExA( hsubkey, "Country", 0, &type, buf,
+ &bufsize) && type == REG_DWORD)
+ snprintf( lpszCountryCode, 8, "%lu", *(LPDWORD) buf );
+ else
+ lpszCountryCode[0] = '\0';
+ }
+ TRACE("(%p \"%s\", %p \"%s\"): success.\n",
+ lpszCountryCode, debugstr_a(lpszCountryCode),
+ lpszCityCode, debugstr_a(lpszCityCode));
+ RegCloseKey( hkey);
+ RegCloseKey( hsubkey);
+ return 0; /* SUCCESS */
+ }
+ }
+ RegCloseKey( hkey);
+ }
+ WARN("(%p, %p): failed (no telephony registry entries?).\n",
+ lpszCountryCode, lpszCityCode);
+ return TAPIERR_REQUESTFAILED;
+}
+
+/***********************************************************************
+ * tapiRequestMakeCall (TAPI32.@)
+ */
+DWORD WINAPI tapiRequestMakeCallA(LPCSTR lpszDestAddress, LPCSTR lpszAppName,
+ LPCSTR lpszCalledParty, LPCSTR lpszComment)
+{
+ FIXME("(%s, %s, %s, %s): stub.\n", lpszDestAddress, lpszAppName, lpszCalledParty, lpszComment);
+ return 0;
+}
diff --git a/reactos/dll/win32/tapi32/line.c b/reactos/dll/win32/tapi32/line.c
new file mode 100644
index 00000000000..214e504c084
--- /dev/null
+++ b/reactos/dll/win32/tapi32/line.c
@@ -0,0 +1,1340 @@
+/*
+ * TAPI32 line services
+ *
+ * Copyright 1999 Andreas Mohr
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include
+#include
+#include
+#include
+#include "windef.h"
+#include "winbase.h"
+#include "wingdi.h"
+#include "winreg.h"
+#include "winnls.h"
+#include "winerror.h"
+#include "objbase.h"
+#include "tapi.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(tapi);
+
+/* registry keys */
+static const char szCountrylistKey[] =
+ "Software\\Microsoft\\Windows\\CurrentVersion\\Telephony\\Country List";
+static const char szLocationsKey[] =
+ "Software\\Microsoft\\Windows\\CurrentVersion\\Telephony\\Locations";
+static const char szCardsKey[] =
+ "Software\\Microsoft\\Windows\\CurrentVersion\\Telephony\\Cards";
+
+
+/***********************************************************************
+ * lineAccept (TAPI32.@)
+ */
+DWORD WINAPI lineAccept(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize)
+{
+ FIXME("(%p, %s, %d): stub.\n", hCall, lpsUserUserInfo, dwSize);
+ return 1;
+}
+
+/***********************************************************************
+ * lineAddProvider (TAPI32.@)
+ */
+DWORD WINAPI lineAddProviderA(LPCSTR lpszProviderName, HWND hwndOwner, LPDWORD lpdwPermanentProviderID)
+{
+ FIXME("(%s, %p, %p): stub.\n", lpszProviderName, hwndOwner, lpdwPermanentProviderID);
+ return 1;
+}
+
+/***********************************************************************
+ * lineAddToConference (TAPI32.@)
+ */
+DWORD WINAPI lineAddToConference(HCALL hConfCall, HCALL hConsultCall)
+{
+ FIXME("(%p, %p): stub.\n", hConfCall, hConsultCall);
+ return 1;
+}
+
+/***********************************************************************
+ * lineAnswer (TAPI32.@)
+ */
+DWORD WINAPI lineAnswer(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize)
+{
+ FIXME("(%p, %s, %d): stub.\n", hCall, lpsUserUserInfo, dwSize);
+ return 1;
+}
+
+/***********************************************************************
+ * lineBlindTransfer (TAPI32.@)
+ */
+DWORD WINAPI lineBlindTransferA(HCALL hCall, LPCSTR lpszDestAddress, DWORD dwCountryCode)
+{
+ FIXME("(%p, %s, %08x): stub.\n", hCall, lpszDestAddress, dwCountryCode);
+ return 1;
+}
+
+/***********************************************************************
+ * lineClose (TAPI32.@)
+ */
+DWORD WINAPI lineClose(HLINE hLine)
+{
+ FIXME("(%p): stub.\n", hLine);
+ return 0;
+}
+
+/***********************************************************************
+ * lineCompleteCall (TAPI32.@)
+ */
+DWORD WINAPI lineCompleteCall(HCALL hCall, LPDWORD lpdwCompletionID, DWORD dwCompletionMode, DWORD dwMessageID)
+{
+ FIXME("(%p, %p, %08x, %08x): stub.\n", hCall, lpdwCompletionID, dwCompletionMode, dwMessageID);
+ return 1;
+}
+
+/***********************************************************************
+ * lineCompleteTransfer (TAPI32.@)
+ */
+DWORD WINAPI lineCompleteTransfer(HCALL hCall, HCALL hConsultCall, LPHCALL lphConfCall, DWORD dwTransferMode)
+{
+ FIXME("(%p, %p, %p, %08x): stub.\n", hCall, hConsultCall, lphConfCall, dwTransferMode);
+ return 1;
+}
+
+/***********************************************************************
+ * lineConfigDialog (TAPI32.@)
+ */
+DWORD WINAPI lineConfigDialogA(DWORD dwDeviceID, HWND hwndOwner, LPCSTR lpszDeviceClass)
+{
+ FIXME("(%08x, %p, %s): stub.\n", dwDeviceID, hwndOwner, lpszDeviceClass);
+ return 0;
+}
+
+/***********************************************************************
+ * lineConfigDialogEdit (TAPI32.@)
+ */
+DWORD WINAPI lineConfigDialogEditA(DWORD dwDeviceID, HWND hwndOwner, LPCSTR lpszDeviceClass, LPVOID const lpDeviceConfigIn, DWORD dwSize, LPVARSTRING lpDeviceConfigOut)
+{
+ FIXME("stub.\n");
+ return 0;
+}
+
+/***********************************************************************
+ * lineConfigProvider (TAPI32.@)
+ */
+DWORD WINAPI lineConfigProvider(HWND hwndOwner, DWORD dwPermanentProviderID)
+{
+ FIXME("(%p, %08x): stub.\n", hwndOwner, dwPermanentProviderID);
+ return 0;
+}
+
+/***********************************************************************
+ * lineDeallocateCall (TAPI32.@)
+ */
+DWORD WINAPI lineDeallocateCall(HCALL hCall)
+{
+ FIXME("(%p): stub.\n", hCall);
+ return 0;
+}
+
+/***********************************************************************
+ * lineDevSpecific (TAPI32.@)
+ */
+DWORD WINAPI lineDevSpecific(HLINE hLine, DWORD dwAddressId, HCALL hCall, LPVOID lpParams, DWORD dwSize)
+{
+ FIXME("(%p, %08x, %p, %p, %d): stub.\n", hLine, dwAddressId, hCall, lpParams, dwSize);
+ return 1;
+}
+
+/***********************************************************************
+ * lineDevSpecificFeature (TAPI32.@)
+ */
+DWORD WINAPI lineDevSpecificFeature(HLINE hLine, DWORD dwFeature, LPVOID lpParams, DWORD dwSize)
+{
+ FIXME("(%p, %08x, %p, %d): stub.\n", hLine, dwFeature, lpParams, dwSize);
+ return 1;
+}
+
+/***********************************************************************
+ * lineDial (TAPI32.@)
+ */
+DWORD WINAPI lineDialA(HCALL hCall, LPCSTR lpszDestAddress, DWORD dwCountryCode)
+{
+ FIXME("(%p, %s, %08x): stub.\n", hCall, lpszDestAddress, dwCountryCode);
+ return 1;
+}
+
+/***********************************************************************
+ * lineDrop (TAPI32.@)
+ */
+DWORD WINAPI lineDrop(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize)
+{
+ FIXME("(%p, %s, %08x): stub.\n", hCall, lpsUserUserInfo, dwSize);
+ return 1;
+}
+
+/***********************************************************************
+ * lineForward (TAPI32.@)
+ */
+DWORD WINAPI lineForwardA(HLINE hLine, DWORD bAllAddress, DWORD dwAddressID, LPLINEFORWARDLIST lpForwardList, DWORD dwNumRingsNoAnswer, LPHCALL lphConsultCall, LPLINECALLPARAMS lpCallParams)
+{
+ FIXME("stub.\n");
+ return 1;
+}
+
+/***********************************************************************
+ * lineGatherDigits (TAPI32.@)
+ */
+DWORD WINAPI lineGatherDigitsA(HCALL hCall, DWORD dwDigitModes, LPSTR lpsDigits, DWORD dwNumDigits, LPCSTR lpszTerminationDigits, DWORD dwFirstDigitTimeout, DWORD dwInterDigitTimeout)
+{
+ FIXME("stub.\n");
+ return 0;
+}
+
+/***********************************************************************
+ * lineGenerateDigits (TAPI32.@)
+ */
+DWORD WINAPI lineGenerateDigitsA(HCALL hCall, DWORD dwDigitModes, LPCSTR lpszDigits, DWORD dwDuration)
+{
+ FIXME("(%p, %08x, %s, %d): stub.\n", hCall, dwDigitModes, lpszDigits, dwDuration);
+ return 0;
+}
+
+/***********************************************************************
+ * lineGenerateTone (TAPI32.@)
+ */
+DWORD WINAPI lineGenerateTone(HCALL hCall, DWORD dwToneMode, DWORD dwDuration, DWORD dwNumTones, LPLINEGENERATETONE lpTones)
+{
+ FIXME("(%p, %08x, %d, %d, %p): stub.\n", hCall, dwToneMode, dwDuration, dwNumTones, lpTones);
+ return 0;
+}
+
+/***********************************************************************
+ * lineGetAddressCaps (TAPI32.@)
+ */
+DWORD WINAPI lineGetAddressCapsA(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAddressID, DWORD dwAPIVersion, DWORD dwExtVersion, LPLINEADDRESSCAPS lpAddressCaps)
+{
+ FIXME("(%p, %08x, %08x, %08x, %08x, %p): stub.\n", hLineApp, dwDeviceID, dwAddressID, dwAPIVersion, dwExtVersion, lpAddressCaps);
+ return 0;
+}
+
+/***********************************************************************
+ * lineGetAddressID (TAPI32.@)
+ */
+DWORD WINAPI lineGetAddressIDA(HLINE hLine, LPDWORD lpdwAddressID, DWORD dwAddressMode, LPCSTR lpsAddress, DWORD dwSize)
+{
+ FIXME("%p, %p, %08x, %s, %d): stub.\n", hLine, lpdwAddressID, dwAddressMode, lpsAddress, dwSize);
+ return 0;
+}
+
+/***********************************************************************
+ * lineGetAddressStatus (TAPI32.@)
+ */
+DWORD WINAPI lineGetAddressStatusA(HLINE hLine, DWORD dwAddressID, LPLINEADDRESSSTATUS lpAddressStatus)
+{
+ FIXME("(%p, %08x, %p): stub.\n", hLine, dwAddressID, lpAddressStatus);
+ return 0;
+}
+
+/***********************************************************************
+ * lineGetAppPriority (TAPI32.@)
+ */
+DWORD WINAPI lineGetAppPriorityA(LPCSTR lpszAppFilename, DWORD dwMediaMode, LPLINEEXTENSIONID const lpExtensionID, DWORD dwRequestMode, LPVARSTRING lpExtensionName, LPDWORD lpdwPriority)
+{
+ FIXME("(%s, %08x, %p, %08x, %p, %p): stub.\n", lpszAppFilename, dwMediaMode, lpExtensionID, dwRequestMode, lpExtensionName, lpdwPriority);
+ return 0;
+}
+
+/***********************************************************************
+ * lineGetCallInfo (TAPI32.@)
+ */
+DWORD WINAPI lineGetCallInfoA(HCALL hCall, LPLINECALLINFO lpCallInfo)
+{
+ FIXME("(%p, %p): stub.\n", hCall, lpCallInfo);
+ return 0;
+}
+
+/***********************************************************************
+ * lineGetCallStatus (TAPI32.@)
+ */
+DWORD WINAPI lineGetCallStatus(HCALL hCall, LPLINECALLSTATUS lpCallStatus)
+{
+ FIXME("(%p, %p): stub.\n", hCall, lpCallStatus);
+ return 0;
+}
+
+/***********************************************************************
+ * lineGetConfRelatedCalls (TAPI32.@)
+ */
+DWORD WINAPI lineGetConfRelatedCalls(HCALL hCall, LPLINECALLLIST lpCallList)
+{
+ FIXME("(%p, %p): stub.\n", hCall, lpCallList);
+ return 0;
+}
+
+typedef struct tagTAPI_CountryInfo
+{
+ DWORD dwCountryID;
+ DWORD dwCountryCode;
+ LPSTR lpCountryName;
+ LPSTR lpSameAreaRule;
+ LPSTR lpLongDistanceRule;
+ LPSTR lpInternationalRule;
+} TAPI_CountryInfo;
+
+/***********************************************************************
+ * lineGetCountry (TAPI32.@)
+ */
+DWORD WINAPI lineGetCountryA(DWORD dwCountryID, DWORD dwAPIVersion, LPLINECOUNTRYLIST lpLineCountryList)
+{
+ DWORD dwAvailSize, dwOffset, i, num_countries, max_subkey_len;
+ LPLINECOUNTRYENTRY lpLCE;
+ HKEY hkey;
+ char *subkey_name;
+
+ if(!lpLineCountryList) {
+ TRACE("(%08x, %08x, %p): stub. Returning LINEERR_INVALPOINTER\n",
+ dwCountryID, dwAPIVersion, lpLineCountryList);
+ return LINEERR_INVALPOINTER;
+ }
+
+ TRACE("(%08x, %08x, %p(%d)): stub.\n",
+ dwCountryID, dwAPIVersion, lpLineCountryList,
+ lpLineCountryList->dwTotalSize);
+
+ if(RegOpenKeyA(HKEY_LOCAL_MACHINE, szCountrylistKey, &hkey)
+ != ERROR_SUCCESS)
+ return LINEERR_INIFILECORRUPT;
+
+
+ dwAvailSize = lpLineCountryList->dwTotalSize;
+ dwOffset = sizeof (LINECOUNTRYLIST);
+
+ if(dwAvailSizedwTotalSize = dwAvailSize;
+ lpLineCountryList->dwUsedSize = dwOffset;
+ lpLineCountryList->dwNumCountries = 0;
+ lpLineCountryList->dwCountryListSize = 0;
+ lpLineCountryList->dwCountryListOffset = dwOffset;
+
+ lpLCE = (LPLINECOUNTRYENTRY)(&lpLineCountryList[1]);
+
+ if(RegQueryInfoKeyA(hkey, NULL, NULL, NULL, &num_countries, &max_subkey_len,
+ NULL, NULL, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) {
+ RegCloseKey(hkey);
+ return LINEERR_STRUCTURETOOSMALL;
+ }
+
+ if(dwCountryID)
+ dwOffset = sizeof (LINECOUNTRYENTRY);
+ else
+ dwOffset += num_countries * sizeof (LINECOUNTRYENTRY);
+
+ max_subkey_len++;
+ subkey_name = HeapAlloc(GetProcessHeap(), 0, max_subkey_len);
+ for(i = 0; i < num_countries; i++)
+ {
+ DWORD len, size, size_int, size_long, size_name, size_same;
+ HKEY hsubkey;
+
+ if(RegEnumKeyA(hkey, i, subkey_name, max_subkey_len) !=
+ ERROR_SUCCESS)
+ continue;
+
+ if(dwCountryID && (atoi(subkey_name) != dwCountryID))
+ continue;
+
+ if(RegOpenKeyA(hkey, subkey_name, &hsubkey) != ERROR_SUCCESS)
+ continue;
+
+ RegQueryValueExA(hsubkey, "InternationalRule", NULL, NULL,
+ NULL, &size_int);
+ len = size_int;
+
+ RegQueryValueExA(hsubkey, "LongDistanceRule", NULL, NULL,
+ NULL, &size_long);
+ len += size_long;
+
+ RegQueryValueExA(hsubkey, "Name", NULL, NULL,
+ NULL, &size_name);
+ len += size_name;
+
+ RegQueryValueExA(hsubkey, "SameAreaRule", NULL, NULL,
+ NULL, &size_same);
+ len += size_same;
+
+ if(dwAvailSize < (dwOffset+len))
+ {
+ dwOffset += len;
+ RegCloseKey(hsubkey);
+ if(dwCountryID)
+ break;
+ continue;
+ }
+
+ lpLineCountryList->dwNumCountries++;
+ lpLineCountryList->dwCountryListSize += sizeof (LINECOUNTRYENTRY);
+ lpLineCountryList->dwUsedSize += len + sizeof (LINECOUNTRYENTRY);
+
+ if(dwCountryID)
+ i = 0;
+
+ lpLCE[i].dwCountryID = atoi(subkey_name);
+ size = sizeof(DWORD);
+ RegQueryValueExA(hsubkey, "CountryCode", NULL, NULL,
+ (BYTE*)&lpLCE[i].dwCountryCode, &size);
+
+ lpLCE[i].dwNextCountryID = 0;
+
+ if(i > 0)
+ lpLCE[i-1].dwNextCountryID = lpLCE[i].dwCountryID;
+
+ /* add country name */
+ lpLCE[i].dwCountryNameSize = size_name;
+ lpLCE[i].dwCountryNameOffset = dwOffset;
+ RegQueryValueExA(hsubkey, "Name", NULL, NULL,
+ ((LPBYTE)lpLineCountryList)+dwOffset,
+ &size_name);
+ dwOffset += size_name;
+
+ /* add Same Area Rule */
+ lpLCE[i].dwSameAreaRuleSize = size_same;
+ lpLCE[i].dwSameAreaRuleOffset = dwOffset;
+ RegQueryValueExA(hsubkey, "SameAreaRule", NULL, NULL,
+ ((LPBYTE)lpLineCountryList)+dwOffset,
+ &size_same);
+ dwOffset += size_same;
+
+ /* add Long Distance Rule */
+ lpLCE[i].dwLongDistanceRuleSize = size_long;
+ lpLCE[i].dwLongDistanceRuleOffset = dwOffset;
+ RegQueryValueExA(hsubkey, "LongDistanceRule", NULL, NULL,
+ ((LPBYTE)lpLineCountryList)+dwOffset,
+ &size_long);
+ dwOffset += size_long;
+
+ /* add Long Distance Rule */
+ lpLCE[i].dwInternationalRuleSize = size_int;
+ lpLCE[i].dwInternationalRuleOffset = dwOffset;
+ RegQueryValueExA(hsubkey, "InternationalRule", NULL, NULL,
+ ((LPBYTE)lpLineCountryList)+dwOffset,
+ &size_int);
+ dwOffset += size_int;
+ RegCloseKey(hsubkey);
+
+ TRACE("Added country %s at %p\n", (LPSTR)lpLineCountryList + lpLCE[i].dwCountryNameOffset,
+ &lpLCE[i]);
+
+ if(dwCountryID) break;
+ }
+
+ lpLineCountryList->dwNeededSize = dwOffset;
+
+ TRACE("%d available %d required\n", dwAvailSize, dwOffset);
+
+ HeapFree(GetProcessHeap(), 0, subkey_name);
+ RegCloseKey(hkey);
+
+ return 0;
+}
+
+/***********************************************************************
+ * lineGetDevCaps (TAPI32.@)
+ */
+DWORD WINAPI lineGetDevCapsA(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, DWORD dwExtVersion, LPLINEDEVCAPS lpLineDevCaps)
+{
+ FIXME("(%p, %08x, %08x, %08x, %p): stub.\n", hLineApp, dwDeviceID, dwAPIVersion, dwExtVersion, lpLineDevCaps);
+ return 0;
+}
+
+/***********************************************************************
+ * lineGetDevConfig (TAPI32.@)
+ */
+DWORD WINAPI lineGetDevConfigA(DWORD dwDeviceID, LPVARSTRING lpDeviceConfig, LPCSTR lpszDeviceClass)
+{
+ FIXME("(%08x, %p, %s): stub.\n", dwDeviceID, lpDeviceConfig, lpszDeviceClass);
+ return 0;
+}
+
+/***********************************************************************
+ * lineGetID (TAPI32.@)
+ */
+DWORD WINAPI lineGetIDA(HLINE hLine, DWORD dwAddressID, HCALL hCall, DWORD dwSelect, LPVARSTRING lpDeviceID, LPCSTR lpszDeviceClass)
+{
+ FIXME("(%p, %08x, %p, %08x, %p, %s): stub.\n", hLine, dwAddressID, hCall, dwSelect, lpDeviceID, lpszDeviceClass);
+ return 0;
+}
+
+/***********************************************************************
+ * lineGetIcon (TAPI32.@)
+ */
+DWORD WINAPI lineGetIconA(DWORD dwDeviceID, LPCSTR lpszDeviceClass, HICON *lphIcon)
+{
+ FIXME("(%08x, %s, %p): stub.\n", dwDeviceID, lpszDeviceClass, lphIcon);
+ return 0;
+}
+
+/***********************************************************************
+ * lineGetLineDevStatus (TAPI32.@)
+ */
+DWORD WINAPI lineGetLineDevStatusA(HLINE hLine, LPLINEDEVSTATUS lpLineDevStatus)
+{
+ FIXME("(%p, %p): stub.\n", hLine, lpLineDevStatus);
+ return 0;
+}
+
+/***********************************************************************
+ * lineGetNewCalls (TAPI32.@)
+ */
+DWORD WINAPI lineGetNewCalls(HLINE hLine, DWORD dwAddressID, DWORD dwSelect, LPLINECALLLIST lpCallList)
+{
+ FIXME("(%p, %08x, %08x, %p): stub.\n", hLine, dwAddressID, dwSelect, lpCallList);
+ return 0;
+}
+
+/***********************************************************************
+ * lineGetNumRings (TAPI32.@)
+ */
+DWORD WINAPI lineGetNumRings(HLINE hLine, DWORD dwAddressID, LPDWORD lpdwNumRings)
+{
+ FIXME("(%p, %08x, %p): stub.\n", hLine, dwAddressID, lpdwNumRings);
+ return 0;
+}
+
+/***********************************************************************
+ * lineGetProviderList (TAPI32.@)
+ */
+DWORD WINAPI lineGetProviderListA(DWORD dwAPIVersion, LPLINEPROVIDERLIST lpProviderList)
+{
+ FIXME("(%08x, %p): stub.\n", dwAPIVersion, lpProviderList);
+ return 0;
+}
+
+/***********************************************************************
+ * lineGetRequest (TAPI32.@)
+ */
+DWORD WINAPI lineGetRequestA(HLINEAPP hLineApp, DWORD dwRequestMode, LPVOID lpRequestBuffer)
+{
+ FIXME("%p, %08x, %p): stub.\n", hLineApp, dwRequestMode, lpRequestBuffer);
+ return 0;
+}
+
+/***********************************************************************
+ * lineGetStatusMessages (TAPI32.@)
+ */
+DWORD WINAPI lineGetStatusMessages(HLINE hLine, LPDWORD lpdwLineStatus, LPDWORD lpdwAddressStates)
+{
+ FIXME("(%p, %p, %p): stub.\n", hLine, lpdwLineStatus, lpdwAddressStates);
+ return 0;
+}
+
+/***********************************************************************
+ * lineGetTranslateCaps (TAPI32.@)
+ *
+ * get address translate capabilities. Returns a LINETRANSLATECAPS
+ * structure:
+ *
+ * +-----------------------+
+ * |TotalSize |
+ * |NeededSize |
+ * |UsedSize |
+ * +-----------------------+
+ * |NumLocations |
+ * |LocationsListSize |
+ * |LocationsListOffset | -+
+ * |CurrentLocationID | |
+ * +-----------------------+ |
+ * |NumCards | |
+ * |CardListSize | |
+ * |CardListOffset | -|--+
+ * |CurrentPreferredCardID | | |
+ * +-----------------------+ | |
+ * | | <+ |
+ * |LINELOCATIONENTRY #1 | |
+ * | | |
+ * +-----------------------+ |
+ * ~ ~ |
+ * +-----------------------+ |
+ * | | |
+ * |LINELOCATIONENTRY | |
+ * | #NumLocations| |
+ * +-----------------------+ |
+ * | | <---+
+ * |LINECARDENTRY #1 |
+ * | |
+ * +-----------------------+
+ * ~ ~
+ * +-----------------------+
+ * | |
+ * |LINECARDENTRY #NumCards|
+ * | |
+ * +-----------------------+
+ * | room for strings named|
+ * | in the structures |
+ * | above. |
+ * +-----------------------+
+ */
+DWORD WINAPI lineGetTranslateCapsA(HLINEAPP hLineApp, DWORD dwAPIVersion,
+ LPLINETRANSLATECAPS lpTranslateCaps)
+{
+ HKEY hkLocations, hkCards, hkCardLocations, hsubkey;
+ int numlocations, numcards;
+ DWORD maxlockeylen,
+ maxcardkeylen;
+ char *loc_key_name = NULL;
+ char *card_key_name = NULL;
+ LPBYTE strptr;
+ int length;
+ int i;
+ DWORD lendword;
+ DWORD currentid;
+ LPLINELOCATIONENTRY pLocEntry;
+ LPLINECARDENTRY pCardEntry;
+
+ TRACE("(%p, %08x, %p (tot. size %d)\n", hLineApp, dwAPIVersion,
+ lpTranslateCaps, lpTranslateCaps->dwTotalSize );
+ if( lpTranslateCaps->dwTotalSize < sizeof(LINETRANSLATECAPS))
+ return LINEERR_STRUCTURETOOSMALL;
+ if( RegCreateKeyA(HKEY_LOCAL_MACHINE, szLocationsKey, &hkLocations)
+ != ERROR_SUCCESS ) {
+ ERR("unexpected registry error 1.\n");
+ return LINEERR_INIFILECORRUPT;
+ }
+ lendword = sizeof( DWORD);
+ if( RegQueryValueExA( hkLocations, "CurrentID", NULL, NULL,
+ (LPBYTE) ¤tid, &lendword) != ERROR_SUCCESS )
+ currentid = -1; /* change this later */
+ if(RegQueryInfoKeyA(hkLocations, NULL, NULL, NULL, NULL, &maxlockeylen,
+ NULL, NULL, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) {
+ RegCloseKey(hkLocations);
+ ERR("unexpected registry error 2.\n");
+ return LINEERR_INIFILECORRUPT;
+ }
+ maxlockeylen++;
+ if( maxlockeylen < 10)
+ maxlockeylen = 10; /* need this also if there is no key */
+ loc_key_name = HeapAlloc( GetProcessHeap(), 0, maxlockeylen);
+ /* first time through: calculate needed space */
+ length=0;
+ i=0;
+ numlocations=0;
+ while( RegEnumKeyA(hkLocations, i, loc_key_name, maxlockeylen)
+ == ERROR_SUCCESS){
+ DWORD size_val;
+ i++;
+ if( strncasecmp(loc_key_name, "location", 8) ||
+ (RegOpenKeyA(hkLocations, loc_key_name, &hsubkey)
+ != ERROR_SUCCESS))
+ continue;
+ numlocations++;
+ length += sizeof(LINELOCATIONENTRY);
+ RegQueryValueExA(hsubkey, "Name",NULL,NULL,NULL,&size_val);
+ length += size_val;
+ RegQueryValueExA(hsubkey, "AreaCode",NULL,NULL,NULL,&size_val);
+ length += size_val;
+ RegQueryValueExA(hsubkey, "OutsideAccess",NULL,NULL,NULL,&size_val);
+ length += size_val;
+ RegQueryValueExA(hsubkey, "LongDistanceAccess",NULL,NULL,NULL,&size_val);
+ length += size_val;
+ RegQueryValueExA(hsubkey, "DisableCallWaiting",NULL,NULL,NULL,&size_val);
+ length += size_val;
+ /* fixme: what about TollPrefixList???? */
+ RegCloseKey(hsubkey);
+ }
+ if(numlocations == 0) {
+ /* add one location */
+ if( RegCreateKeyA( hkLocations, "Location1", &hsubkey)
+ == ERROR_SUCCESS) {
+ DWORD dwval;
+ char buf[10];
+ numlocations = 1;
+ length += sizeof(LINELOCATIONENTRY) + 20 ;
+ RegSetValueExA( hsubkey, "AreaCode", 0, REG_SZ, (const BYTE *)"010", 4);
+ GetLocaleInfoA( LOCALE_SYSTEM_DEFAULT, LOCALE_ICOUNTRY, buf, 8);
+ dwval = atoi(buf);
+ RegSetValueExA( hsubkey, "Country", 0, REG_DWORD, (LPBYTE)&dwval,
+ sizeof(DWORD));
+ RegSetValueExA( hsubkey, "DisableCallWaiting", 0, REG_SZ, (const BYTE *)"", 1);
+ dwval = 1;
+ RegSetValueExA( hsubkey, "Flags", 0, REG_DWORD, (LPBYTE)&dwval,
+ sizeof(DWORD));
+ RegSetValueExA( hsubkey, "LongDistanceAccess", 0, REG_SZ, (const BYTE *)"", 1);
+ RegSetValueExA( hsubkey, "Name", 0, REG_SZ, (const BYTE *)"New Location", 13);
+ RegSetValueExA( hsubkey, "OutsideAccess", 0, REG_SZ, (const BYTE *)"", 1);
+ RegCloseKey(hsubkey);
+ dwval = 1;
+ RegSetValueExA( hkLocations, "CurrentID", 0, REG_DWORD,
+ (LPBYTE)&dwval, sizeof(DWORD));
+ dwval = 2;
+ RegSetValueExA( hkLocations, "NextID", 0, REG_DWORD, (LPBYTE)&dwval,
+ sizeof(DWORD));
+ }
+ }
+ /* do the card list */
+ numcards=0;
+ if( RegCreateKeyA(HKEY_CURRENT_USER, szCardsKey, &hkCards)
+ == ERROR_SUCCESS ) {
+ if(RegQueryInfoKeyA(hkCards, NULL, NULL, NULL, NULL, &maxcardkeylen,
+ NULL, NULL, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) {
+ maxcardkeylen++;
+ if( maxcardkeylen < 6) maxcardkeylen = 6;
+ card_key_name = HeapAlloc(GetProcessHeap(), 0, maxcardkeylen);
+ i=0;
+ while( RegEnumKeyA(hkCards, i, card_key_name, maxcardkeylen) ==
+ ERROR_SUCCESS){
+ DWORD size_val;
+ i++;
+ if( strncasecmp(card_key_name, "card", 4) || ERROR_SUCCESS !=
+ (RegOpenKeyA(hkCards, card_key_name, &hsubkey) ))
+ continue;
+ numcards++;
+ length += sizeof(LINECARDENTRY);
+ RegQueryValueExA(hsubkey, "Name",NULL,NULL,NULL,&size_val);
+ length += size_val;
+ RegQueryValueExA(hsubkey, "LocalRule",NULL,NULL,NULL,&size_val);
+ length += size_val;
+ RegQueryValueExA(hsubkey, "LDRule",NULL,NULL,NULL,&size_val);
+ length += size_val;
+ RegQueryValueExA(hsubkey, "InternationalRule",NULL,NULL,NULL,
+ &size_val);
+ length += size_val;
+ RegCloseKey(hsubkey);
+ }
+ }
+ /* add one card (direct call) */
+ if (numcards == 0 &&
+ ERROR_SUCCESS == RegCreateKeyA( hkCards, "Card1", &hsubkey)) {
+ DWORD dwval;
+ numcards = 1;
+ length += sizeof(LINECARDENTRY) + 22 ;
+ RegSetValueExA( hsubkey, "Name", 0, REG_SZ, (const BYTE *)"None (Direct Call)", 19);
+ dwval = 1;
+ RegSetValueExA( hsubkey, "Flags", 0, REG_DWORD, (LPBYTE)&dwval,
+ sizeof(DWORD));
+ RegSetValueExA( hsubkey, "InternationalRule", 0, REG_SZ, (const BYTE *)"", 1);
+ RegSetValueExA( hsubkey, "LDRule", 0, REG_SZ, (const BYTE *)"", 1);
+ RegSetValueExA( hsubkey, "LocalRule", 0, REG_SZ, (const BYTE *)"", 1);
+ RegCloseKey(hsubkey);
+ dwval = 2;
+ RegSetValueExA( hkCards, "NextID", 0, REG_DWORD, (LPBYTE)&dwval,
+ sizeof(DWORD));
+ }
+ } else hkCards = 0; /* should really fail */
+ /* check if sufficient room is available */
+ lpTranslateCaps->dwNeededSize = sizeof(LINETRANSLATECAPS) + length;
+ if ( lpTranslateCaps->dwNeededSize > lpTranslateCaps->dwTotalSize ) {
+ RegCloseKey( hkLocations);
+ if( hkCards) RegCloseKey( hkCards);
+ HeapFree(GetProcessHeap(), 0, loc_key_name);
+ HeapFree(GetProcessHeap(), 0, card_key_name);
+ lpTranslateCaps->dwUsedSize = sizeof(LINETRANSLATECAPS);
+ TRACE("Insufficient space: total %d needed %d used %d\n",
+ lpTranslateCaps->dwTotalSize,
+ lpTranslateCaps->dwNeededSize,
+ lpTranslateCaps->dwUsedSize);
+ return 0;
+ }
+ /* fill in the LINETRANSLATECAPS structure */
+ lpTranslateCaps->dwUsedSize = lpTranslateCaps->dwNeededSize;
+ lpTranslateCaps->dwNumLocations = numlocations;
+ lpTranslateCaps->dwLocationListSize = sizeof(LINELOCATIONENTRY) *
+ lpTranslateCaps->dwNumLocations;
+ lpTranslateCaps->dwLocationListOffset = sizeof(LINETRANSLATECAPS);
+ lpTranslateCaps->dwCurrentLocationID = currentid;
+ lpTranslateCaps->dwNumCards = numcards;
+ lpTranslateCaps->dwCardListSize = sizeof(LINECARDENTRY) *
+ lpTranslateCaps->dwNumCards;
+ lpTranslateCaps->dwCardListOffset = lpTranslateCaps->dwLocationListOffset +
+ lpTranslateCaps->dwLocationListSize;
+ lpTranslateCaps->dwCurrentPreferredCardID = 0;
+ /* this is where the strings will be stored */
+ strptr = ((LPBYTE) lpTranslateCaps) +
+ lpTranslateCaps->dwCardListOffset + lpTranslateCaps->dwCardListSize;
+ pLocEntry = (LPLINELOCATIONENTRY) (lpTranslateCaps + 1);
+ /* key with Preferred CardID's */
+ if( RegOpenKeyA(HKEY_CURRENT_USER, szLocationsKey, &hkCardLocations)
+ != ERROR_SUCCESS )
+ hkCardLocations = 0;
+ /* second time through all locations */
+ i=0;
+ while(RegEnumKeyA(hkLocations, i, loc_key_name, maxlockeylen)
+ == ERROR_SUCCESS){
+ DWORD size_val;
+ i++;
+ if( strncasecmp(loc_key_name, "location", 8) ||
+ (RegOpenKeyA(hkLocations, loc_key_name, &hsubkey)
+ != ERROR_SUCCESS))
+ continue;
+ size_val=sizeof(DWORD);
+ if( RegQueryValueExA(hsubkey, "ID",NULL, NULL,
+ (LPBYTE) &(pLocEntry->dwPermanentLocationID), &size_val) !=
+ ERROR_SUCCESS)
+ pLocEntry->dwPermanentLocationID = atoi( loc_key_name + 8);
+ size_val=2048;
+ RegQueryValueExA(hsubkey, "Name",NULL,NULL, strptr, &size_val);
+ pLocEntry->dwLocationNameSize = size_val;
+ pLocEntry->dwLocationNameOffset = strptr - (LPBYTE) lpTranslateCaps;
+ strptr += size_val;
+
+ size_val=2048;
+ RegQueryValueExA(hsubkey, "AreaCode",NULL,NULL, strptr, &size_val);
+ pLocEntry->dwCityCodeSize = size_val;
+ pLocEntry->dwCityCodeOffset = strptr - (LPBYTE) lpTranslateCaps;
+ strptr += size_val;
+
+ size_val=2048;
+ RegQueryValueExA(hsubkey, "OutsideAccess",NULL,NULL, strptr, &size_val);
+ pLocEntry->dwLocalAccessCodeSize = size_val;
+ pLocEntry->dwLocalAccessCodeOffset = strptr - (LPBYTE) lpTranslateCaps;
+ strptr += size_val;
+ size_val=2048;
+ RegQueryValueExA(hsubkey, "LongDistanceAccess",NULL,NULL, strptr,
+ &size_val);
+ pLocEntry->dwLongDistanceAccessCodeSize= size_val;
+ pLocEntry->dwLongDistanceAccessCodeOffset= strptr -
+ (LPBYTE) lpTranslateCaps;
+ strptr += size_val;
+ size_val=2048;
+ RegQueryValueExA(hsubkey, "DisableCallWaiting",NULL,NULL, strptr,
+ &size_val);
+ pLocEntry->dwCancelCallWaitingSize= size_val;
+ pLocEntry->dwCancelCallWaitingOffset= strptr - (LPBYTE) lpTranslateCaps;
+ strptr += size_val;
+
+ pLocEntry->dwTollPrefixListSize = 0; /* FIXME */
+ pLocEntry->dwTollPrefixListOffset = 0; /* FIXME */
+
+ size_val=sizeof(DWORD);
+ RegQueryValueExA(hsubkey, "Country",NULL,NULL,
+ (LPBYTE) &(pLocEntry->dwCountryCode), &size_val);
+ pLocEntry->dwCountryID = pLocEntry->dwCountryCode; /* FIXME */
+ RegQueryValueExA(hsubkey, "Flags",NULL,NULL,
+ (LPBYTE) &(pLocEntry->dwOptions), &size_val);
+ RegCloseKey(hsubkey);
+ /* get preferred cardid */
+ pLocEntry->dwPreferredCardID = 0;
+ if ( hkCardLocations) {
+ size_val=sizeof(DWORD);
+ if(RegOpenKeyA(hkCardLocations, loc_key_name, &hsubkey) ==
+ ERROR_SUCCESS) {
+ RegQueryValueExA(hsubkey, "CallingCard",NULL,NULL,
+ (LPBYTE) &(pLocEntry->dwPreferredCardID), &size_val);
+ RegCloseKey(hsubkey);
+ }
+
+ }
+ /* make sure there is a currentID */
+ if(currentid == -1){
+ currentid = pLocEntry->dwPermanentLocationID;
+ lpTranslateCaps->dwCurrentLocationID = currentid;
+ }
+ if(pLocEntry->dwPermanentLocationID == currentid )
+ lpTranslateCaps->dwCurrentPreferredCardID =
+ pLocEntry->dwPreferredCardID;
+ TRACE("added: ID %d %s CountryCode %d CityCode %s CardID %d "
+ "LocalAccess: %s LongDistanceAccess: %s CountryID %d "
+ "Options %d CancelCallWait %s\n",
+ pLocEntry->dwPermanentLocationID,
+ debugstr_a( (char*)lpTranslateCaps + pLocEntry->dwLocationNameOffset),
+ pLocEntry->dwCountryCode,
+ debugstr_a( (char*)lpTranslateCaps + pLocEntry->dwCityCodeOffset),
+ pLocEntry->dwPreferredCardID,
+ debugstr_a( (char*)lpTranslateCaps + pLocEntry->dwLocalAccessCodeOffset),
+ debugstr_a( (char*)lpTranslateCaps + pLocEntry->dwLongDistanceAccessCodeOffset),
+ pLocEntry->dwCountryID,
+ pLocEntry->dwOptions,
+ debugstr_a( (char*)lpTranslateCaps + pLocEntry->dwCancelCallWaitingOffset));
+ pLocEntry++;
+ }
+ pCardEntry= (LPLINECARDENTRY) pLocEntry;
+ /* do the card list */
+ if( hkCards) {
+ i=0;
+ while( RegEnumKeyA(hkCards, i, card_key_name, maxcardkeylen) ==
+ ERROR_SUCCESS){
+ DWORD size_val;
+ i++;
+ if( strncasecmp(card_key_name, "card", 4) ||
+ (RegOpenKeyA(hkCards, card_key_name, &hsubkey) != ERROR_SUCCESS))
+ continue;
+ size_val=sizeof(DWORD);
+ if( RegQueryValueExA(hsubkey, "ID",NULL, NULL,
+ (LPBYTE) &(pCardEntry->dwPermanentCardID), &size_val) !=
+ ERROR_SUCCESS)
+ pCardEntry->dwPermanentCardID= atoi( card_key_name + 4);
+ size_val=2048;
+ RegQueryValueExA(hsubkey, "Name",NULL,NULL, strptr, &size_val);
+ pCardEntry->dwCardNameSize = size_val;
+ pCardEntry->dwCardNameOffset = strptr - (LPBYTE) lpTranslateCaps;
+ strptr += size_val;
+ pCardEntry->dwCardNumberDigits = 1; /* FIXME */
+ size_val=2048;
+ RegQueryValueExA(hsubkey, "LocalRule",NULL,NULL, strptr, &size_val);
+ pCardEntry->dwSameAreaRuleSize= size_val;
+ pCardEntry->dwSameAreaRuleOffset= strptr - (LPBYTE) lpTranslateCaps;
+ strptr += size_val;
+ size_val=2048;
+ RegQueryValueExA(hsubkey, "LDRule",NULL,NULL, strptr, &size_val);
+ pCardEntry->dwLongDistanceRuleSize = size_val;
+ pCardEntry->dwLongDistanceRuleOffset = strptr - (LPBYTE) lpTranslateCaps;
+ strptr += size_val;
+ size_val=2048;
+ RegQueryValueExA(hsubkey, "InternationalRule",NULL,NULL, strptr,
+ &size_val);
+ pCardEntry->dwInternationalRuleSize = size_val;
+ pCardEntry->dwInternationalRuleOffset = strptr -
+ (LPBYTE) lpTranslateCaps;
+ strptr += size_val;
+ size_val=sizeof(DWORD);
+ RegQueryValueExA(hsubkey, "Flags",NULL, NULL,
+ (LPBYTE) &(pCardEntry->dwOptions), &size_val);
+ TRACE( "added card: ID %d name %s SameArea %s LongDistance %s International %s Options 0x%x\n",
+ pCardEntry->dwPermanentCardID,
+ debugstr_a( (char*)lpTranslateCaps + pCardEntry->dwCardNameOffset),
+ debugstr_a( (char*)lpTranslateCaps + pCardEntry->dwSameAreaRuleOffset),
+ debugstr_a( (char*)lpTranslateCaps + pCardEntry->dwLongDistanceRuleOffset),
+ debugstr_a( (char*)lpTranslateCaps + pCardEntry->dwInternationalRuleOffset),
+ pCardEntry->dwOptions);
+
+ pCardEntry++;
+ }
+ }
+
+ if(hkLocations) RegCloseKey(hkLocations);
+ if(hkCards) RegCloseKey(hkCards);
+ if(hkCardLocations) RegCloseKey(hkCardLocations);
+ HeapFree(GetProcessHeap(), 0, loc_key_name);
+ HeapFree(GetProcessHeap(), 0, card_key_name);
+ TRACE(" returning success tot %d needed %d used %d\n",
+ lpTranslateCaps->dwTotalSize,
+ lpTranslateCaps->dwNeededSize,
+ lpTranslateCaps->dwUsedSize );
+ return 0; /* success */
+}
+
+/***********************************************************************
+ * lineHandoff (TAPI32.@)
+ */
+DWORD WINAPI lineHandoffA(HCALL hCall, LPCSTR lpszFileName, DWORD dwMediaMode)
+{
+ FIXME("(%p, %s, %08x): stub.\n", hCall, lpszFileName, dwMediaMode);
+ return 0;
+}
+
+/***********************************************************************
+ * lineHold (TAPI32.@)
+ */
+DWORD WINAPI lineHold(HCALL hCall)
+{
+ FIXME("(%p): stub.\n", hCall);
+ return 1;
+}
+
+/***********************************************************************
+ * lineInitialize (TAPI32.@)
+ */
+DWORD WINAPI lineInitialize(
+ LPHLINEAPP lphLineApp,
+ HINSTANCE hInstance,
+ LINECALLBACK lpfnCallback,
+ LPCSTR lpszAppName,
+ LPDWORD lpdwNumDevs)
+{
+ FIXME("(%p, %p, %p, %s, %p): stub.\n", lphLineApp, hInstance,
+ lpfnCallback, debugstr_a(lpszAppName), lpdwNumDevs);
+ return 0;
+}
+
+/***********************************************************************
+ * lineInitializeExA (TAPI32.@)
+ */
+LONG WINAPI lineInitializeExA(LPHLINEAPP lphLineApp, HINSTANCE hInstance, LINECALLBACK lpfnCallback, LPCSTR lpszFriendlyAppName, LPDWORD lpdwNumDevs, LPDWORD lpdwAPIVersion, LPLINEINITIALIZEEXPARAMS lpLineInitializeExParams)
+{
+ FIXME("(%p, %p, %p, %s, %p, %p, %p): stub.\n", lphLineApp, hInstance,
+ lpfnCallback, debugstr_a(lpszFriendlyAppName), lpdwNumDevs, lpdwAPIVersion, lpLineInitializeExParams);
+ return 0;
+}
+
+/***********************************************************************
+ * lineMakeCall (TAPI32.@)
+ */
+DWORD WINAPI lineMakeCallA(HLINE hLine, LPHCALL lphCall, LPCSTR lpszDestAddress, DWORD dwCountryCode, LPLINECALLPARAMS lpCallParams)
+{
+ FIXME("(%p, %p, %s, %08x, %p): stub.\n", hLine, lphCall, lpszDestAddress, dwCountryCode, lpCallParams);
+ return 1;
+}
+
+/***********************************************************************
+ * lineMonitorDigits (TAPI32.@)
+ */
+DWORD WINAPI lineMonitorDigits(HCALL hCall, DWORD dwDigitModes)
+{
+ FIXME("(%p, %08x): stub.\n", hCall, dwDigitModes);
+ return 0;
+}
+
+/***********************************************************************
+ * lineMonitorMedia (TAPI32.@)
+ */
+DWORD WINAPI lineMonitorMedia(HCALL hCall, DWORD dwMediaModes)
+{
+ FIXME("(%p, %08x): stub.\n", hCall, dwMediaModes);
+ return 0;
+}
+
+/***********************************************************************
+ * lineMonitorTones (TAPI32.@)
+ */
+DWORD WINAPI lineMonitorTones(HCALL hCall, LPLINEMONITORTONE lpToneList, DWORD dwNumEntries)
+{
+ FIXME("(%p, %p, %08x): stub.\n", hCall, lpToneList, dwNumEntries);
+ return 0;
+}
+
+/***********************************************************************
+ * lineNegotiateAPIVersion (TAPI32.@)
+ */
+DWORD WINAPI lineNegotiateAPIVersion(
+ HLINEAPP hLineApp,
+ DWORD dwDeviceID,
+ DWORD dwAPILowVersion,
+ DWORD dwAPIHighVersion,
+ LPDWORD lpdwAPIVersion,
+ LPLINEEXTENSIONID lpExtensionID
+)
+{
+ FIXME("(%p, %d, %d, %d, %p, %p): stub.\n", hLineApp, dwDeviceID,
+ dwAPILowVersion, dwAPIHighVersion, lpdwAPIVersion, lpExtensionID);
+ *lpdwAPIVersion = dwAPIHighVersion;
+ return 0;
+}
+
+/***********************************************************************
+ * lineNegotiateExtVersion (TAPI32.@)
+ */
+DWORD WINAPI lineNegotiateExtVersion(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, DWORD dwExtLowVersion, DWORD dwExtHighVersion, LPDWORD lpdwExtVersion)
+{
+ FIXME("stub.\n");
+ return 0;
+}
+
+/***********************************************************************
+ * lineOpen (TAPI32.@)
+ */
+DWORD WINAPI lineOpenA(HLINEAPP hLineApp, DWORD dwDeviceID, LPHLINE lphLine, DWORD dwAPIVersion, DWORD dwExtVersion, DWORD dwCallbackInstance, DWORD dwPrivileges, DWORD dwMediaModes, LPLINECALLPARAMS lpCallParams)
+{
+ FIXME("stub.\n");
+ return 0;
+}
+
+/***********************************************************************
+ * linePark (TAPI32.@)
+ */
+DWORD WINAPI lineParkA(HCALL hCall, DWORD dwParkMode, LPCSTR lpszDirAddress, LPVARSTRING lpNonDirAddress)
+{
+ FIXME("(%p, %08x, %s, %p): stub.\n", hCall, dwParkMode, lpszDirAddress, lpNonDirAddress);
+ return 1;
+}
+
+/***********************************************************************
+ * linePickup (TAPI32.@)
+ */
+DWORD WINAPI linePickupA(HLINE hLine, DWORD dwAddressID, LPHCALL lphCall, LPCSTR lpszDestAddress, LPCSTR lpszGroupID)
+{
+ FIXME("(%p, %08x, %p, %s, %s): stub.\n", hLine, dwAddressID, lphCall, lpszDestAddress, lpszGroupID);
+ return 1;
+}
+
+/***********************************************************************
+ * linePrepareAddToConference (TAPI32.@)
+ */
+DWORD WINAPI linePrepareAddToConferenceA(HCALL hConfCall, LPHCALL lphConsultCall, LPLINECALLPARAMS lpCallParams)
+{
+ FIXME("(%p, %p, %p): stub.\n", hConfCall, lphConsultCall, lpCallParams);
+ return 1;
+}
+
+/***********************************************************************
+ * lineRedirect (TAPI32.@)
+ */
+DWORD WINAPI lineRedirectA(
+ HCALL hCall,
+ LPCSTR lpszDestAddress,
+ DWORD dwCountryCode) {
+
+ FIXME(": stub.\n");
+ return 1;
+}
+
+/***********************************************************************
+ * lineRegisterRequestRecipient (TAPI32.@)
+ */
+DWORD WINAPI lineRegisterRequestRecipient(HLINEAPP hLineApp, DWORD dwRegistrationInstance, DWORD dwRequestMode, DWORD dwEnable)
+{
+ FIXME("(%p, %08x, %08x, %08x): stub.\n", hLineApp, dwRegistrationInstance, dwRequestMode, dwEnable);
+ return 1;
+}
+
+/***********************************************************************
+ * lineReleaseUserUserInfo (TAPI32.@)
+ */
+DWORD WINAPI lineReleaseUserUserInfo(HCALL hCall)
+{
+ FIXME("(%p): stub.\n", hCall);
+ return 1;
+}
+
+/***********************************************************************
+ * lineRemoveFromConference (TAPI32.@)
+ */
+DWORD WINAPI lineRemoveFromConference(HCALL hCall)
+{
+ FIXME("(%p): stub.\n", hCall);
+ return 1;
+}
+
+/***********************************************************************
+ * lineRemoveProvider (TAPI32.@)
+ */
+DWORD WINAPI lineRemoveProvider(DWORD dwPermanentProviderID, HWND hwndOwner)
+{
+ FIXME("(%08x, %p): stub.\n", dwPermanentProviderID, hwndOwner);
+ return 1;
+}
+
+/***********************************************************************
+ * lineSecureCall (TAPI32.@)
+ */
+DWORD WINAPI lineSecureCall(HCALL hCall)
+{
+ FIXME("(%p): stub.\n", hCall);
+ return 1;
+}
+
+/***********************************************************************
+ * lineSendUserUserInfo (TAPI32.@)
+ */
+DWORD WINAPI lineSendUserUserInfo(HCALL hCall, LPCSTR lpsUserUserInfo, DWORD dwSize)
+{
+ FIXME("(%p, %s, %08x): stub.\n", hCall, lpsUserUserInfo, dwSize);
+ return 1;
+}
+
+/***********************************************************************
+ * lineSetAppPriority (TAPI32.@)
+ */
+DWORD WINAPI lineSetAppPriorityA(LPCSTR lpszAppFilename, DWORD dwMediaMode, LPLINEEXTENSIONID const lpExtensionID, DWORD dwRequestMode, LPCSTR lpszExtensionName, DWORD dwPriority)
+{
+ FIXME("(%s, %08x, %p, %08x, %s, %08x): stub.\n", lpszAppFilename, dwMediaMode, lpExtensionID, dwRequestMode, lpszExtensionName, dwPriority);
+ return 0;
+}
+
+/***********************************************************************
+ * lineSetAppSpecific (TAPI32.@)
+ */
+DWORD WINAPI lineSetAppSpecific(HCALL hCall, DWORD dwAppSpecific)
+{
+ FIXME("(%p, %08x): stub.\n", hCall, dwAppSpecific);
+ return 0;
+}
+
+/***********************************************************************
+ * lineSetCallParams (TAPI32.@)
+ */
+DWORD WINAPI lineSetCallParams(HCALL hCall, DWORD dwBearerMode, DWORD dwMinRate, DWORD dwMaxRate, LPLINEDIALPARAMS lpDialParams)
+{
+ FIXME("(%p, %08x, %08x, %08x, %p): stub.\n", hCall, dwBearerMode, dwMinRate, dwMaxRate, lpDialParams);
+ return 1;
+}
+
+/***********************************************************************
+ * lineSetCallPrivilege (TAPI32.@)
+ */
+DWORD WINAPI lineSetCallPrivilege(HCALL hCall, DWORD dwCallPrivilege)
+{
+ FIXME("(%p, %08x): stub.\n", hCall, dwCallPrivilege);
+ return 0;
+}
+
+/***********************************************************************
+ * lineSetCurrentLocation (TAPI32.@)
+ */
+DWORD WINAPI lineSetCurrentLocation(HLINEAPP hLineApp, DWORD dwLocation)
+{
+ FIXME("(%p, %08x): stub.\n", hLineApp, dwLocation);
+ return 0;
+}
+
+/***********************************************************************
+ * lineSetDevConfig (TAPI32.@)
+ */
+DWORD WINAPI lineSetDevConfigA(DWORD dwDeviceID, LPVOID lpDeviceConfig, DWORD dwSize, LPCSTR lpszDeviceClass)
+{
+ FIXME("(%08x, %p, %08x, %s): stub.\n", dwDeviceID, lpDeviceConfig, dwSize, lpszDeviceClass);
+ return 0;
+}
+
+/***********************************************************************
+ * lineSetMediaControl (TAPI32.@)
+ */
+DWORD WINAPI lineSetMediaControl(
+HLINE hLine,
+DWORD dwAddressID,
+HCALL hCall,
+DWORD dwSelect,
+LPLINEMEDIACONTROLDIGIT const lpDigitList,
+DWORD dwDigitNumEntries,
+LPLINEMEDIACONTROLMEDIA const lpMediaList,
+DWORD dwMediaNumEntries,
+LPLINEMEDIACONTROLTONE const lpToneList,
+DWORD dwToneNumEntries,
+LPLINEMEDIACONTROLCALLSTATE const lpCallStateList,
+DWORD dwCallStateNumEntries)
+{
+ FIXME(": stub.\n");
+ return 0;
+}
+
+/***********************************************************************
+ * lineSetMediaMode (TAPI32.@)
+ */
+DWORD WINAPI lineSetMediaMode(HCALL hCall, DWORD dwMediaModes)
+{
+ FIXME("(%p, %08x): stub.\n", hCall, dwMediaModes);
+ return 0;
+}
+
+/***********************************************************************
+ * lineSetNumRings (TAPI32.@)
+ */
+DWORD WINAPI lineSetNumRings(HLINE hLine, DWORD dwAddressID, DWORD dwNumRings)
+{
+ FIXME("(%p, %08x, %08x): stub.\n", hLine, dwAddressID, dwNumRings);
+ return 0;
+}
+
+/***********************************************************************
+ * lineSetStatusMessages (TAPI32.@)
+ */
+DWORD WINAPI lineSetStatusMessages(HLINE hLine, DWORD dwLineStates, DWORD dwAddressStates)
+{
+ FIXME("(%p, %08x, %08x): stub.\n", hLine, dwLineStates, dwAddressStates);
+ return 0;
+}
+
+/***********************************************************************
+ * lineSetTerminal (TAPI32.@)
+ */
+DWORD WINAPI lineSetTerminal(HLINE hLine, DWORD dwAddressID, HCALL hCall, DWORD dwSelect, DWORD dwTerminalModes, DWORD dwTerminalID, DWORD bEnable)
+{
+ FIXME("(%p, %08x, %p, %08x, %08x, %08x, %08x): stub.\n", hLine, dwAddressID, hCall, dwSelect, dwTerminalModes, dwTerminalID, bEnable);
+ return 1;
+}
+
+/***********************************************************************
+ * lineSetTollList (TAPI32.@)
+ */
+DWORD WINAPI lineSetTollListA(HLINEAPP hLineApp, DWORD dwDeviceID, LPCSTR lpszAddressIn, DWORD dwTollListOption)
+{
+ FIXME("(%p, %08x, %s, %08x): stub.\n", hLineApp, dwDeviceID, lpszAddressIn, dwTollListOption);
+ return 0;
+}
+
+/***********************************************************************
+ * lineSetupConference (TAPI32.@)
+ */
+DWORD WINAPI lineSetupConferenceA(HCALL hCall, HLINE hLine, LPHCALL lphConfCall, LPHCALL lphConsultCall, DWORD dwNumParties, LPLINECALLPARAMS lpCallParams)
+{
+ FIXME("(%p, %p, %p, %p, %08x, %p): stub.\n", hCall, hLine, lphConfCall, lphConsultCall, dwNumParties, lpCallParams);
+ return 1;
+}
+
+/***********************************************************************
+ * lineSetupTransfer (TAPI32.@)
+ */
+DWORD WINAPI lineSetupTransferA(HCALL hCall, LPHCALL lphConsultCall, LPLINECALLPARAMS lpCallParams)
+{
+ FIXME("(%p, %p, %p): stub.\n", hCall, lphConsultCall, lpCallParams);
+ return 1;
+}
+
+/***********************************************************************
+ * lineShutdown (TAPI32.@)
+ */
+DWORD WINAPI lineShutdown(HLINEAPP hLineApp)
+{
+ FIXME("(%p): stub.\n", hLineApp);
+ return 0;
+}
+
+/***********************************************************************
+ * lineSwapHold (TAPI32.@)
+ */
+DWORD WINAPI lineSwapHold(HCALL hActiveCall, HCALL hHeldCall)
+{
+ FIXME("(active: %p, held: %p): stub.\n", hActiveCall, hHeldCall);
+ return 1;
+}
+
+/***********************************************************************
+ * lineTranslateAddress (TAPI32.@)
+ */
+DWORD WINAPI lineTranslateAddressA(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, LPCSTR lpszAddressIn, DWORD dwCard, DWORD dwTranslateOptions, LPLINETRANSLATEOUTPUT lpTranslateOutput)
+{
+ FIXME("(%p, %08x, %08x, %s, %08x, %08x, %p): stub.\n", hLineApp, dwDeviceID, dwAPIVersion, lpszAddressIn, dwCard, dwTranslateOptions, lpTranslateOutput);
+ return 0;
+}
+
+/***********************************************************************
+ * lineTranslateDialog (TAPI32.@)
+ */
+DWORD WINAPI lineTranslateDialogA(HLINEAPP hLineApp, DWORD dwDeviceID, DWORD dwAPIVersion, HWND hwndOwner, LPCSTR lpszAddressIn)
+{
+ FIXME("(%p, %08x, %08x, %p, %s): stub.\n", hLineApp, dwDeviceID, dwAPIVersion, hwndOwner, lpszAddressIn);
+ return 0;
+}
+
+/***********************************************************************
+ * lineUncompleteCall (TAPI32.@)
+ */
+DWORD WINAPI lineUncompleteCall(HLINE hLine, DWORD dwCompletionID)
+{
+ FIXME("(%p, %08x): stub.\n", hLine, dwCompletionID);
+ return 1;
+}
+
+/***********************************************************************
+ * lineUnhold (TAPI32.@)
+ */
+DWORD WINAPI lineUnhold(HCALL hCall)
+{
+ FIXME("(%p): stub.\n", hCall);
+ return 1;
+}
+
+/***********************************************************************
+ * lineUnpark (TAPI32.@)
+ */
+DWORD WINAPI lineUnparkA(HLINE hLine, DWORD dwAddressID, LPHCALL lphCall, LPCSTR lpszDestAddress)
+{
+ FIXME("(%p, %08x, %p, %s): stub.\n", hLine, dwAddressID, lphCall, lpszDestAddress);
+ return 1;
+}
diff --git a/reactos/dll/win32/tapi32/phone.c b/reactos/dll/win32/tapi32/phone.c
new file mode 100644
index 00000000000..994d787be70
--- /dev/null
+++ b/reactos/dll/win32/tapi32/phone.c
@@ -0,0 +1,330 @@
+/*
+ * TAPI32 phone services
+ *
+ * Copyright 1999 Andreas Mohr
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include
+
+#include "windef.h"
+#include "winbase.h"
+#include "objbase.h"
+#include "tapi.h"
+#include "wine/debug.h"
+
+/*
+ * Additional TSPI functions:
+ * - voiceGetHandles
+ * - TSPI_ProviderInit
+ * - TSPI_ProviderShutdown
+ * - TSPI_ProviderEnumDevices
+ * - TSPI_ProviderConfig
+*/
+WINE_DEFAULT_DEBUG_CHANNEL(tapi);
+
+/***********************************************************************
+ * phoneClose (TAPI32.@)
+ */
+DWORD WINAPI phoneClose(HPHONE hPhone)
+{
+ FIXME("(%p), stub.\n", hPhone);
+ /* call TSPI function here ! */
+ return 0;
+}
+
+/***********************************************************************
+ * phoneConfigDialog (TAPI32.@)
+ */
+DWORD WINAPI phoneConfigDialogA(DWORD dwDeviceID, HWND hwndOwner, LPCSTR lpszDeviceClass)
+{
+ FIXME("(%08x, %p, %s): stub.\n", dwDeviceID, hwndOwner, lpszDeviceClass);
+ return 0;
+}
+
+/***********************************************************************
+ * phoneDevSpecific (TAPI32.@)
+ */
+DWORD WINAPI phoneDevSpecific(HPHONE hPhone, LPVOID lpParams, DWORD dwSize)
+{
+ FIXME("(%p, %p, %d): stub.\n", hPhone, lpParams, dwSize);
+ return 1;
+}
+
+/***********************************************************************
+ * phoneGetButtonInfo (TAPI32.@)
+ */
+DWORD WINAPI phoneGetButtonInfoA(HPHONE hPhone, DWORD dwButtonLampID,
+ LPPHONEBUTTONINFO lpButtonInfo)
+{
+ FIXME("(%p, %08x, %p): stub.\n", hPhone, dwButtonLampID, lpButtonInfo);
+ return 0;
+}
+
+/***********************************************************************
+ * phoneGetData (TAPI32.@)
+ */
+DWORD WINAPI phoneGetData(HPHONE hPhone, DWORD dwDataID, LPVOID lpData, DWORD dwSize)
+{
+ FIXME("(%p, %08x, %p, %d): stub.\n", hPhone, dwDataID, lpData, dwSize);
+ return 0;
+}
+
+/***********************************************************************
+ * phoneGetDevCaps (TAPI32.@)
+ */
+DWORD WINAPI phoneGetDevCapsA(HPHONEAPP hPhoneApp, DWORD dwDeviceID,
+ DWORD dwAPIVersion, DWORD dwExtVersion, LPPHONECAPS lpPhoneCaps)
+{
+ FIXME("(%p, %08x, %08x, %08x, %p): stub.\n", hPhoneApp, dwDeviceID, dwAPIVersion, dwExtVersion, lpPhoneCaps);
+ /* call TSPI function here ! */
+ return 0;
+}
+
+/***********************************************************************
+ * phoneGetDisplay (TAPI32.@)
+ */
+DWORD WINAPI phoneGetDisplay(HPHONE hPhone, LPVARSTRING lpDisplay)
+{
+ FIXME("(%p, %p): stub.\n", hPhone, lpDisplay);
+ return 0;
+}
+
+/***********************************************************************
+ * phoneGetGain (TAPI32.@)
+ */
+DWORD WINAPI phoneGetGain(HPHONE hPhone, DWORD dwHookSwitchDev, LPDWORD lpdwGain)
+{
+ FIXME("(%p, %08x, %p): stub.\n", hPhone, dwHookSwitchDev, lpdwGain);
+ /* call TSPI function here ! */
+ return 0;
+}
+
+/***********************************************************************
+ * phoneGetHookSwitch (TAPI32.@)
+ */
+DWORD WINAPI phoneGetHookSwitch(HPHONE hPhone, LPDWORD lpdwHookSwitchDevs)
+{
+ FIXME("(%p, %p): stub.\n", hPhone, lpdwHookSwitchDevs);
+ /* call TSPI function here ! */
+ return 0;
+}
+
+/***********************************************************************
+ * phoneGetID (TAPI32.@)
+ */
+DWORD WINAPI phoneGetIDA(HPHONE hPhone, LPVARSTRING lpDeviceID,
+ LPCSTR lpszDeviceClass)
+{
+ FIXME("(%p, %p, %s): stub.\n", hPhone, lpDeviceID, lpszDeviceClass);
+ /* call TSPI function here ! */
+ return 0;
+}
+
+/***********************************************************************
+ * phoneGetIcon (TAPI32.@)
+ */
+DWORD WINAPI phoneGetIconA(DWORD dwDeviceID, LPCSTR lpszDeviceClass,
+ HICON *lphIcon)
+{
+ FIXME("(%08x, %s, %p): stub.\n", dwDeviceID, lpszDeviceClass, lphIcon);
+ /* call TSPI function here ! */
+ return 0;
+}
+
+/***********************************************************************
+ * phoneGetLamp (TAPI32.@)
+ */
+DWORD WINAPI phoneGetLamp(HPHONE hPhone, DWORD dwButtonLampID,
+ LPDWORD lpdwLampMode)
+{
+ FIXME("(%p, %08x, %p): stub.\n", hPhone, dwButtonLampID, lpdwLampMode);
+ return 0;
+}
+
+/***********************************************************************
+ * phoneGetRing (TAPI32.@)
+ */
+DWORD WINAPI phoneGetRing(HPHONE hPhone, LPDWORD lpdwRingMode, LPDWORD lpdwVolume)
+{
+ FIXME("(%p, %p, %p): stub.\n", hPhone, lpdwRingMode, lpdwVolume);
+ return 0;
+}
+
+/***********************************************************************
+ * phoneGetStatus (TAPI32.@)
+ */
+DWORD WINAPI phoneGetStatusA(HPHONE hPhone, LPPHONESTATUS lpPhoneStatus)
+{
+ FIXME("(%p, %p): stub.\n", hPhone, lpPhoneStatus);
+ /* call TSPI function here ! */
+ return 0;
+}
+
+/***********************************************************************
+ * phoneGetStatusMessages (TAPI32.@)
+ */
+DWORD WINAPI phoneGetStatusMessages(HPHONE hPhone, LPDWORD lpdwPhoneStates,
+ LPDWORD lpdwButtonModes, LPDWORD lpdwButtonStates)
+{
+ FIXME("(%p, %p, %p, %p): stub.\n", hPhone, lpdwPhoneStates, lpdwButtonModes, lpdwButtonStates);
+ return 0;
+}
+
+/***********************************************************************
+ * phoneGetVolume (TAPI32.@)
+ */
+DWORD WINAPI phoneGetVolume(HPHONE hPhone, DWORD dwHookSwitchDevs,
+ LPDWORD lpdwVolume)
+{
+ FIXME("(%p, %08x, %p): stub.\n", hPhone, dwHookSwitchDevs, lpdwVolume);
+ /* call TSPI function here ! */
+ return 0;
+}
+
+/***********************************************************************
+ * phoneInitialize (TAPI32.@)
+ */
+DWORD WINAPI phoneInitialize(LPHPHONEAPP lphPhoneApp, HINSTANCE hInstance, PHONECALLBACK lpfnCallback, LPCSTR lpszAppName, LPDWORD lpdwNumDevs)
+{
+ FIXME("(%p, %p, %p, %s, %p): stub.\n", lphPhoneApp, hInstance, lpfnCallback, lpszAppName, lpdwNumDevs);
+ return 0;
+}
+
+/***********************************************************************
+ * phoneNegotiateAPIVersion (TAPI32.@)
+ */
+DWORD WINAPI phoneNegotiateAPIVersion(HPHONEAPP hPhoneApp, DWORD dwDeviceID, DWORD dwAPILowVersion, DWORD dwAPIHighVersion, LPDWORD lpdwAPIVersion, LPPHONEEXTENSIONID lpExtensionID)
+{
+ FIXME("(): stub.\n");
+ return 0;
+}
+
+/***********************************************************************
+ * phoneNegotiateExtVersion (TAPI32.@)
+ */
+DWORD WINAPI phoneNegotiateExtVersion(HPHONEAPP hPhoneApp, DWORD dwDeviceID,
+ DWORD dwAPIVersion, DWORD dwExtLowVersion,
+ DWORD dwExtHighVersion, LPDWORD lpdwExtVersion)
+{
+ FIXME("(): stub.\n");
+ /* call TSPI function here ! */
+ return 0;
+}
+
+/***********************************************************************
+ * phoneOpen (TAPI32.@)
+ */
+DWORD WINAPI phoneOpen(HPHONEAPP hPhoneApp, DWORD dwDeviceID, LPHPHONE lphPhone, DWORD dwAPIVersion, DWORD dwExtVersion, DWORD dwCallbackInstance, DWORD dwPrivileges)
+{
+ FIXME("(): stub.\n");
+ /* call TSPI function here ! */
+ return 0;
+}
+
+/***********************************************************************
+ * phoneSetButtonInfo (TAPI32.@)
+ */
+DWORD WINAPI phoneSetButtonInfoA(HPHONE hPhone, DWORD dwButtonLampID, LPPHONEBUTTONINFO lpButtonInfo)
+{
+ FIXME("(%p, %08x, %p): stub.\n", hPhone, dwButtonLampID, lpButtonInfo);
+ return 0;
+}
+
+/***********************************************************************
+ * phoneSetData (TAPI32.@)
+ */
+DWORD WINAPI phoneSetData(HPHONE hPhone, DWORD dwDataID, LPVOID lpData, DWORD dwSize)
+{
+ FIXME("(%p, %08x, %p, %d): stub.\n", hPhone, dwDataID, lpData, dwSize);
+ return 1;
+}
+
+/***********************************************************************
+ * phoneSetDisplay (TAPI32.@)
+ */
+DWORD WINAPI phoneSetDisplay(HPHONE hPhone, DWORD dwRow, DWORD dwColumn, LPCSTR lpszDisplay, DWORD dwSize)
+{
+ FIXME("(%p, '%s' at %d/%d, len %d): stub.\n", hPhone, lpszDisplay, dwRow, dwColumn, dwSize);
+ return 1;
+}
+
+/***********************************************************************
+ * phoneSetGain (TAPI32.@)
+ */
+DWORD WINAPI phoneSetGain(HPHONE hPhone, DWORD dwHookSwitchDev, DWORD dwGain)
+{
+ FIXME("(%p, %08x, %d): stub.\n", hPhone, dwHookSwitchDev, dwGain);
+ /* call TSPI function here ! */
+ return 1;
+}
+
+/***********************************************************************
+ * phoneSetHookSwitch (TAPI32.@)
+ */
+DWORD WINAPI phoneSetHookSwitch(HPHONE hPhone, DWORD dwHookSwitchDevs, DWORD dwHookSwitchMode)
+{
+ FIXME("(%p, %08x, %08x): stub.\n", hPhone, dwHookSwitchDevs, dwHookSwitchMode);
+ /* call TSPI function here ! */
+ return 1;
+}
+
+/***********************************************************************
+ * phoneSetLamp (TAPI32.@)
+ */
+DWORD WINAPI phoneSetLamp(HPHONE hPhone, DWORD dwButtonLampID, DWORD lpdwLampMode)
+{
+ FIXME("(%p, %08x, %08x): stub.\n", hPhone, dwButtonLampID, lpdwLampMode);
+ return 1;
+}
+
+/***********************************************************************
+ * phoneSetRing (TAPI32.@)
+ */
+DWORD WINAPI phoneSetRing(HPHONE hPhone, DWORD dwRingMode, DWORD dwVolume)
+{
+ FIXME("(%p, %08x, %08x): stub.\n", hPhone, dwRingMode, dwVolume);
+ return 1;
+}
+
+/***********************************************************************
+ * phoneSetStatusMessages (TAPI32.@)
+ */
+DWORD WINAPI phoneSetStatusMessages(HPHONE hPhone, DWORD dwPhoneStates, DWORD dwButtonModes, DWORD dwButtonStates)
+{
+ FIXME("(%p, %08x, %08x, %08x): stub.\n", hPhone, dwPhoneStates, dwButtonModes, dwButtonStates);
+ /* call TSPI function here ! */
+ return 0; /* FIXME ? */
+}
+
+/***********************************************************************
+ * phoneSetVolume (TAPI32.@)
+ */
+DWORD WINAPI phoneSetVolume(HPHONE hPhone, DWORD dwHookSwitchDev, DWORD dwVolume)
+{
+ FIXME("(%p, %08x, %08x): stub.\n", hPhone, dwHookSwitchDev, dwVolume);
+ /* call TSPI function here ! */
+ return 1;
+}
+
+/***********************************************************************
+ * phoneShutdown (TAPI32.@)
+ */
+DWORD WINAPI phoneShutdown(HPHONEAPP hPhoneApp)
+{
+ FIXME("(%p): stub.\n", hPhoneApp);
+ return 0;
+}
diff --git a/reactos/dll/win32/tapi32/tapi32.rbuild b/reactos/dll/win32/tapi32/tapi32.rbuild
new file mode 100644
index 00000000000..c3130178889
--- /dev/null
+++ b/reactos/dll/win32/tapi32/tapi32.rbuild
@@ -0,0 +1,20 @@
+
+
+ .
+ include/reactos/wine
+
+
+
+ 0x00020000
+ 0x600
+ 0x501
+ 0x501
+ wine
+ advapi32
+ kernel32
+ ntdll
+ assisted.c
+ line.c
+ phone.c
+ tapi32.spec
+
\ No newline at end of file
diff --git a/reactos/dll/win32/tapi32/tapi32.spec b/reactos/dll/win32/tapi32/tapi32.spec
new file mode 100644
index 00000000000..87266cea22f
--- /dev/null
+++ b/reactos/dll/win32/tapi32/tapi32.spec
@@ -0,0 +1,161 @@
+@ stdcall lineAccept(long str long)
+@ stdcall lineAddProvider(str long ptr) lineAddProviderA
+@ stdcall lineAddProviderA(str long ptr)
+@ stdcall lineAddToConference(long long)
+@ stdcall lineAnswer(long str long)
+@ stdcall lineBlindTransfer(long str long) lineBlindTransferA
+@ stdcall lineBlindTransferA(long str long)
+@ stdcall lineClose(long)
+@ stdcall lineCompleteCall(long ptr long long)
+@ stdcall lineCompleteTransfer(long long ptr long)
+@ stdcall lineConfigDialog(long long str) lineConfigDialogA
+@ stdcall lineConfigDialogA(long long str)
+@ stdcall lineConfigDialogEdit(long long str ptr long ptr) lineConfigDialogEditA
+@ stdcall lineConfigDialogEditA(long long str ptr long ptr)
+@ stdcall lineConfigProvider(long long)
+@ stdcall lineDeallocateCall(long)
+@ stdcall lineDevSpecific(long long long ptr long)
+@ stdcall lineDevSpecificFeature(long long ptr long)
+@ stdcall lineDial(long str long) lineDialA
+@ stdcall lineDialA(long str long)
+@ stdcall lineDrop(long str long)
+@ stdcall lineForward(long long long ptr long ptr ptr) lineForwardA
+@ stdcall lineForwardA(long long long ptr long ptr ptr)
+@ stdcall lineGatherDigits(long long str long str long long) lineGatherDigitsA
+@ stdcall lineGatherDigitsA(long long str long str long long)
+@ stdcall lineGenerateDigits(long long str long) lineGenerateDigitsA
+@ stdcall lineGenerateDigitsA(long long str long)
+@ stdcall lineGenerateTone(long long long long ptr)
+@ stdcall lineGetAddressCaps(long long long long long ptr) lineGetAddressCapsA
+@ stdcall lineGetAddressCapsA(long long long long long ptr)
+@ stdcall lineGetAddressID(long ptr long str long) lineGetAddressIDA
+@ stdcall lineGetAddressIDA(long ptr long str long)
+@ stdcall lineGetAddressStatus(long long ptr) lineGetAddressStatusA
+@ stdcall lineGetAddressStatusA(long long ptr)
+@ stdcall lineGetAppPriority(str long ptr long ptr ptr) lineGetAppPriorityA
+@ stdcall lineGetAppPriorityA(str long ptr long ptr ptr)
+@ stdcall lineGetCallInfo(long ptr) lineGetCallInfoA
+@ stdcall lineGetCallInfoA(long ptr)
+@ stdcall lineGetCallStatus(long ptr)
+@ stdcall lineGetConfRelatedCalls(long ptr)
+@ stdcall lineGetCountry(long long ptr) lineGetCountryA
+@ stdcall lineGetCountryA(long long ptr)
+@ stdcall lineGetDevCaps(long long long long ptr) lineGetDevCapsA
+@ stdcall lineGetDevCapsA(long long long long ptr)
+@ stdcall lineGetDevConfig(long ptr str) lineGetDevConfigA
+@ stdcall lineGetDevConfigA(long ptr str)
+@ stdcall lineGetID(long long long long ptr str) lineGetIDA
+@ stdcall lineGetIDA(long long long long ptr str)
+@ stdcall lineGetIcon(long str ptr) lineGetIconA
+@ stdcall lineGetIconA(long str ptr)
+@ stdcall lineGetLineDevStatus(long ptr) lineGetLineDevStatusA
+@ stdcall lineGetLineDevStatusA(long ptr)
+@ stdcall lineGetNewCalls(long long long ptr)
+@ stdcall lineGetNumRings(long long ptr)
+@ stdcall lineGetProviderList(long ptr) lineGetProviderListA
+@ stdcall lineGetProviderListA(long ptr)
+@ stdcall lineGetRequest(long long ptr) lineGetRequestA
+@ stdcall lineGetRequestA(long long ptr)
+@ stdcall lineGetStatusMessages(long ptr ptr)
+@ stdcall lineGetTranslateCaps(long long ptr) lineGetTranslateCapsA
+@ stdcall lineGetTranslateCapsA(long long ptr)
+@ stdcall lineHandoff(long str long) lineHandoffA
+@ stdcall lineHandoffA(long str long)
+@ stdcall lineHold(long)
+@ stdcall lineInitialize(ptr long ptr str ptr)
+@ stdcall lineInitializeExA(ptr long ptr str ptr ptr ptr)
+@ stdcall lineMakeCall(long ptr str long ptr) lineMakeCallA
+@ stdcall lineMakeCallA(long ptr str long ptr)
+@ stdcall lineMonitorDigits(long long)
+@ stdcall lineMonitorMedia(long long)
+@ stdcall lineMonitorTones(long ptr long)
+@ stdcall lineNegotiateAPIVersion(long long long long ptr ptr)
+@ stdcall lineNegotiateExtVersion(long long long long long ptr)
+@ stdcall lineOpen(long long ptr long long long long long ptr) lineOpenA
+@ stdcall lineOpenA(long long ptr long long long long long ptr)
+@ stdcall linePark(long long str ptr) lineParkA
+@ stdcall lineParkA(long long str ptr)
+@ stdcall linePickup(long long ptr str str) linePickupA
+@ stdcall linePickupA(long long ptr str str)
+@ stdcall linePrepareAddToConference(long ptr ptr) linePrepareAddToConferenceA
+@ stdcall linePrepareAddToConferenceA(long ptr ptr)
+@ stdcall lineRedirect(long str long) lineRedirectA
+@ stdcall lineRedirectA(long str long)
+@ stdcall lineRegisterRequestRecipient(long long long long)
+@ stdcall lineReleaseUserUserInfo(long)
+@ stdcall lineRemoveFromConference(long)
+@ stdcall lineRemoveProvider(long long)
+@ stdcall lineSecureCall(long)
+@ stdcall lineSendUserUserInfo(long str long)
+@ stdcall lineSetAppPriority(str long ptr long str long) lineSetAppPriorityA
+@ stdcall lineSetAppPriorityA(str long ptr long str long)
+@ stdcall lineSetAppSpecific(long long)
+@ stdcall lineSetCallParams(long long long long ptr)
+@ stdcall lineSetCallPrivilege(long long)
+@ stdcall lineSetCurrentLocation(long long)
+@ stdcall lineSetDevConfig(long ptr long str) lineSetDevConfigA
+@ stdcall lineSetDevConfigA(long ptr long str)
+@ stdcall lineSetMediaControl(long long long long ptr long ptr long ptr long ptr long)
+@ stdcall lineSetMediaMode(long long)
+@ stdcall lineSetNumRings(long long long)
+@ stdcall lineSetStatusMessages(long long long)
+@ stdcall lineSetTerminal(long long long long long long long)
+@ stdcall lineSetTollList(long long str long) lineSetTollListA
+@ stdcall lineSetTollListA(long long str long)
+@ stdcall lineSetupConference(long long ptr ptr long ptr) lineSetupConferenceA
+@ stdcall lineSetupConferenceA(long long ptr ptr long ptr)
+@ stdcall lineSetupTransfer(long ptr ptr) lineSetupTransferA
+@ stdcall lineSetupTransferA(long ptr ptr)
+@ stdcall lineShutdown(long)
+@ stdcall lineSwapHold(long long)
+@ stdcall lineTranslateAddress(long long long str long long ptr) lineTranslateAddressA
+@ stdcall lineTranslateAddressA(long long long str long long ptr)
+@ stdcall lineTranslateDialog(long long long long str) lineTranslateDialogA
+@ stdcall lineTranslateDialogA(long long long long str)
+@ stdcall lineUncompleteCall(long long)
+@ stdcall lineUnhold(long)
+@ stdcall lineUnpark(long long ptr str) lineUnparkA
+@ stdcall lineUnparkA(long long ptr str)
+@ stdcall phoneClose(long)
+@ stdcall phoneConfigDialog(long long str) phoneConfigDialogA
+@ stdcall phoneConfigDialogA(long long str)
+@ stdcall phoneDevSpecific(long ptr long)
+@ stdcall phoneGetButtonInfo(long long ptr) phoneGetButtonInfoA
+@ stdcall phoneGetButtonInfoA(long long ptr)
+@ stdcall phoneGetData(long long ptr long)
+@ stdcall phoneGetDevCaps(long long long long ptr) phoneGetDevCapsA
+@ stdcall phoneGetDevCapsA(long long long long ptr)
+@ stdcall phoneGetDisplay(long ptr)
+@ stdcall phoneGetGain(long long ptr)
+@ stdcall phoneGetHookSwitch(long ptr)
+@ stdcall phoneGetID(long ptr str) phoneGetIDA
+@ stdcall phoneGetIDA(long ptr str)
+@ stdcall phoneGetIcon(long str ptr) phoneGetIconA
+@ stdcall phoneGetIconA(long str ptr)
+@ stdcall phoneGetLamp(long long ptr)
+@ stdcall phoneGetRing(long ptr ptr)
+@ stdcall phoneGetStatus(long ptr) phoneGetStatusA
+@ stdcall phoneGetStatusA(long ptr)
+@ stdcall phoneGetStatusMessages(long ptr ptr ptr)
+@ stdcall phoneGetVolume(long long ptr)
+@ stdcall phoneInitialize(ptr long ptr str ptr)
+@ stdcall phoneNegotiateAPIVersion(long long long long ptr ptr)
+@ stdcall phoneNegotiateExtVersion(long long long long long ptr)
+@ stdcall phoneOpen(long long ptr long long long long)
+@ stdcall phoneSetButtonInfo(long long ptr) phoneSetButtonInfoA
+@ stdcall phoneSetButtonInfoA(long long ptr)
+@ stdcall phoneSetData(long long ptr long)
+@ stdcall phoneSetDisplay(long long long str long)
+@ stdcall phoneSetGain(long long long)
+@ stdcall phoneSetHookSwitch(long long long)
+@ stdcall phoneSetLamp(long long long)
+@ stdcall phoneSetRing(long long long)
+@ stdcall phoneSetStatusMessages(long long long long)
+@ stdcall phoneSetVolume(long long long)
+@ stdcall phoneShutdown(long)
+@ stdcall tapiGetLocationInfo(str str) tapiGetLocationInfoA
+@ stdcall tapiGetLocationInfoA(str str)
+@ stub tapiRequestDrop
+@ stdcall tapiRequestMakeCall(str str str str) tapiRequestMakeCallA
+@ stdcall tapiRequestMakeCallA(str str str str)
+@ stub tapiRequestMediaCall
diff --git a/reactos/dll/win32/win32.rbuild b/reactos/dll/win32/win32.rbuild
index 7fa422a662d..9ca948e56a6 100644
--- a/reactos/dll/win32/win32.rbuild
+++ b/reactos/dll/win32/win32.rbuild
@@ -283,6 +283,9 @@
+
+
+
diff --git a/reactos/include/psdk/tapi.h b/reactos/include/psdk/tapi.h
index 867366502b9..fed82367a1f 100644
--- a/reactos/include/psdk/tapi.h
+++ b/reactos/include/psdk/tapi.h
@@ -123,6 +123,25 @@ typedef HANDLE HPHONEAPP, *LPHPHONEAPP;
#define LINEERR_INVALFEATURE 0x80000055
#define LINEERR_NOMULTIPLEINSTANCE 0x80000056
+#define LINEFORWARDMODE_UNCOND 0x00000001
+#define LINEFORWARDMODE_UNCONDINTERNAL 0x00000002
+#define LINEFORWARDMODE_UNCONDEXTERNAL 0x00000004
+#define LINEFORWARDMODE_UNCONDSPECIFIC 0x00000008
+#define LINEFORWARDMODE_BUSY 0x00000010
+#define LINEFORWARDMODE_BUSYINTERNAL 0x00000020
+#define LINEFORWARDMODE_BUSYEXTERNAL 0x00000040
+#define LINEFORWARDMODE_BUSYSPECIFIC 0x00000080
+#define LINEFORWARDMODE_NOANSW 0x00000100
+#define LINEFORWARDMODE_NOANSWINTERNAL 0x00000200
+#define LINEFORWARDMODE_NOANSWEXTERNAL 0x00000400
+#define LINEFORWARDMODE_NOANSWSPECIFIC 0x00000800
+#define LINEFORWARDMODE_BUSYNA 0x00001000
+#define LINEFORWARDMODE_BUSYNAINTERNAL 0x00002000
+#define LINEFORWARDMODE_BUSYNAEXTERNAL 0x00004000
+#define LINEFORWARDMODE_BUSYNASPECIFIC 0x00008000
+#define LINEFORWARDMODE_UNKNOWN 0x00010000
+#define LINEFORWARDMODE_UNAVAIL 0x00020000
+
#define STRINGFORMAT_ASCII 0x00000001
#define STRINGFORMAT_DBCS 0x00000002
#define STRINGFORMAT_UNICODE 0x00000003
@@ -153,6 +172,13 @@ typedef HANDLE HPHONEAPP, *LPHPHONEAPP;
#define LINEDEVCAPFLAGS_DIALBILLING 0x00000040
#define LINEDEVCAPFLAGS_DIALQUIET 0x00000080
#define LINEDEVCAPFLAGS_DIALDIALTONE 0x00000100
+#if (TAPI_CURRENT_VERSION >= 0x00030000)
+#define LINEDEVCAPFLAGS_MSP 0x00000200
+#define LINEDEVCAPFLAGS_CALLHUB 0x00000400
+#define LINEDEVCAPFLAGS_CALLHUBTRACKING 0x00000800
+#define LINEDEVCAPFLAGS_PRIVATEOBJECTS 0x00001000
+#endif
+#define LINEDEVCAPFLAGS_LOCAL 0x00002000
#define LINEDEVSTATE_OTHER 0x00000001
#define LINEDEVSTATE_RINGING 0x00000002
@@ -181,6 +207,22 @@ typedef HANDLE HPHONEAPP, *LPHPHONEAPP;
#define LINEDEVSTATE_COMPLCANCEL 0x00800000
#define LINEDEVSTATE_REMOVED 0x01000000
+#define LINEDEVSTATUSFLAGS_CONNECTED 0x00000001
+#define LINEDEVSTATUSFLAGS_MSGWAIT 0x00000002
+#define LINEDEVSTATUSFLAGS_INSERVICE 0x00000004
+#define LINEDEVSTATUSFLAGS_LOCKED 0x00000008
+
+#define LINEDIALTONEMODE_NORMAL 0x00000001
+#define LINEDIALTONEMODE_SPECIAL 0x00000002
+#define LINEDIALTONEMODE_INTERNAL 0x00000004
+#define LINEDIALTONEMODE_EXTERNAL 0x00000008
+#define LINEDIALTONEMODE_UNKNOWN 0x00000010
+#define LINEDIALTONEMODE_UNAVAIL 0x00000020
+
+#define LINEDIGITMODE_PULSE 0x00000001
+#define LINEDIGITMODE_DTMF 0x00000002
+#define LINEDIGITMODE_DTMFEND 0x00000004
+
#define LINELOCATIONOPTION_PULSEDIAL 0x00000001
@@ -218,12 +260,70 @@ typedef HANDLE HPHONEAPP, *LPHPHONEAPP;
#define LINE_CREATE 19L
#define PHONE_CREATE 20L
+#if (TAPI_CURRENT_VERSION >= 0x00020000)
#define LINE_AGENTSPECIFIC 21L
#define LINE_AGENTSTATUS 22L
#define LINE_APPNEWCALL 23L
#define LINE_PROXYREQUEST 24L
#define LINE_REMOVE 25L
#define PHONE_REMOVE 26L
+#endif
+
+#if (TAPI_CURRENT_VERSION >= 0x00020002)
+#define LINE_AGENTSESSIONSTATUS 27L
+#define LINE_QUEUESTATUS 28L
+#define LINE_AGENTSTATUSEX 29L
+#define LINE_GROUPSTATUS 30L
+#define LINE_PROXYSTATUS 31L
+#endif
+
+#if (TAPI_CURRENT_VERSION >= 0x00030000)
+#define LINE_APPNEWCALLHUB 32L
+#define LINE_CALLHUBCLOSE 33L
+#define LINE_DEVSPECIFICEX 34L
+#endif
+
+#define INITIALIZE_NEGOTIATION 0xFFFFFFFFUL
+
+#define LINEADDRCAPFLAGS_FWDNUMRINGS 0x00000001
+#define LINEADDRCAPFLAGS_PICKUPGROUPID 0x00000002
+#define LINEADDRCAPFLAGS_SECURE 0x00000004
+#define LINEADDRCAPFLAGS_BLOCKIDDEFAULT 0x00000008
+#define LINEADDRCAPFLAGS_BLOCKIDOVERRIDE 0x00000010
+#define LINEADDRCAPFLAGS_DIALED 0x00000020
+#define LINEADDRCAPFLAGS_ORIGOFFHOOK 0x00000040
+#define LINEADDRCAPFLAGS_DESTOFFHOOK 0x00000080
+#define LINEADDRCAPFLAGS_FWDCONSULT 0x00000100
+#define LINEADDRCAPFLAGS_SETUPCONFNULL 0x00000200
+#define LINEADDRCAPFLAGS_AUTORECONNECT 0x00000400
+#define LINEADDRCAPFLAGS_COMPLETIONID 0x00000800
+#define LINEADDRCAPFLAGS_TRANSFERHELD 0x00001000
+#define LINEADDRCAPFLAGS_TRANSFERMAKE 0x00002000
+#define LINEADDRCAPFLAGS_CONFERENCEHELD 0x00004000
+#define LINEADDRCAPFLAGS_CONFERENCEMAKE 0x00008000
+#define LINEADDRCAPFLAGS_PARTIALDIAL 0x00010000
+#define LINEADDRCAPFLAGS_FWDSTATUSVALID 0x00020000
+#define LINEADDRCAPFLAGS_FWDINTEXTADDR 0x00040000
+#define LINEADDRCAPFLAGS_FWDBUSYNAADDR 0x00080000
+#define LINEADDRCAPFLAGS_ACCEPTTOALERT 0x00100000
+#define LINEADDRCAPFLAGS_CONFDROP 0x00200000
+#define LINEADDRCAPFLAGS_PICKUPCALLWAIT 0x00400000
+#if (TAPI_CURRENT_VERSION >= 0x00020000)
+#define LINEADDRCAPFLAGS_PREDICTIVEDIALER 0x00800000
+#define LINEADDRCAPFLAGS_QUEUE 0x01000000
+#define LINEADDRCAPFLAGS_ROUTEPOINT 0x02000000
+#define LINEADDRCAPFLAGS_HOLDMAKESNEW 0x04000000
+#define LINEADDRCAPFLAGS_NOINTERNALCALLS 0x08000000
+#define LINEADDRCAPFLAGS_NOEXTERNALCALLS 0x10000000
+#define LINEADDRCAPFLAGS_SETCALLINGID 0x20000000
+#endif
+#if (TAPI_CURRENT_VERSION >= 0x00020002)
+#define LINEADDRCAPFLAGS_ACDGROUP 0x40000000
+#endif
+#if (TAPI_CURRENT_VERSION >= 0x00030000)
+#define LINEADDRCAPFLAGS_NOPSTNADDRESSTRANSLATION 0x80000000
+#endif
+
/* these are used as Param1 of line_callstate messages */
#define LINECALLSTATE_IDLE 0x00000001
#define LINECALLSTATE_OFFERING 0x00000002
@@ -241,11 +341,21 @@ typedef HANDLE HPHONEAPP, *LPHPHONEAPP;
#define LINECALLSTATE_ONHOLDPENDTRANSFER 0x00002000
#define LINECALLSTATE_DISCONNECTED 0x00004000
#define LINECALLSTATE_UNKNOWN 0x00008000
+
#define LINECONNECTEDMODE_ACTIVE 0x00000001
#define LINECONNECTEDMODE_INACTIVE 0x00000002
+#if (TAPI_CURRENT_VERSION >= 0x00020000)
#define LINECONNECTEDMODE_ACTIVEHELD 0x00000004
#define LINECONNECTEDMODE_INACTIVEHELD 0x00000008
#define LINECONNECTEDMODE_CONFIRMED 0x00000010
+#endif
+
+#if (TAPI_CURRENT_VERSION >= 0x00020000)
+#define LINECALLTREATMENT_SILENCE 0x00000001
+#define LINECALLTREATMENT_RINGBACK 0x00000002
+#define LINECALLTREATMENT_BUSY 0x00000003
+#define LINECALLTREATMENT_MUSIC 0x00000004
+#endif
/* these are Param2 values for state_disconnected line_callstate messages */
#define LINEDISCONNECTMODE_NORMAL 0x00000001
@@ -261,6 +371,7 @@ typedef HANDLE HPHONEAPP, *LPHPHONEAPP;
#define LINEDISCONNECTMODE_INCOMPATIBLE 0x00000400
#define LINEDISCONNECTMODE_UNAVAIL 0x00000800
#define LINEDISCONNECTMODE_NODIALTONE 0x00001000
+#if (TAPI_CURRENT_VERSION >= 0x00020000)
#define LINEDISCONNECTMODE_NUMBERCHANGED 0x00002000
#define LINEDISCONNECTMODE_OUTOFORDER 0x00004000
#define LINEDISCONNECTMODE_TEMPFAILURE 0x00008000
@@ -268,15 +379,41 @@ typedef HANDLE HPHONEAPP, *LPHPHONEAPP;
#define LINEDISCONNECTMODE_BLOCKED 0x00020000
#define LINEDISCONNECTMODE_DONOTDISTURB 0x00040000
#define LINEDISCONNECTMODE_CANCELLED 0x00080000
+#endif
#define LINECALLSELECT_LINE 0x00000001
#define LINECALLSELECT_ADDRESS 0x00000002
#define LINECALLSELECT_CALL 0x00000004
+#if (TAPI_CURRENT_VERSION >= 0x00020001)
#define LINECALLSELECT_DEVICEID 0x00000008
+#endif
+#if (TAPI_CURRENT_VERSION >= 0x00030000)
+#define LINECALLSELECT_CALLID 0x00000010
+#endif
#define LINECALLPRIVILEGE_NONE 0x00000001
#define LINECALLPRIVILEGE_MONITOR 0x00000002
#define LINECALLPRIVILEGE_OWNER 0x00000004
+
+#define LINECALLREASON_DIRECT 0x00000001
+#define LINECALLREASON_FWDBUSY 0x00000002
+#define LINECALLREASON_FWDNOANSWER 0x00000004
+#define LINECALLREASON_FWDUNCOND 0x00000008
+#define LINECALLREASON_PICKUP 0x00000010
+#define LINECALLREASON_UNPARK 0x00000020
+#define LINECALLREASON_REDIRECT 0x00000040
+#define LINECALLREASON_CALLCOMPLETION 0x00000080
+#define LINECALLREASON_TRANSFER 0x00000100
+#define LINECALLREASON_REMINDER 0x00000200
+#define LINECALLREASON_UNKNOWN 0x00000400
+#define LINECALLREASON_UNAVAIL 0x00000800
+#define LINECALLREASON_INTRUDE 0x00001000
+#define LINECALLREASON_PARKED 0x00002000
+#if (TAPI_CURRENT_VERSION >= 0x00020000)
+#define LINECALLREASON_CAMPEDON 0x00004000
+#define LINECALLREASON_ROUTEREQUEST 0x00008000
+#endif
+
#define LINECALLFEATURE_ACCEPT 0x00000001
#define LINECALLFEATURE_ADDTOCONF 0x00000002
#define LINECALLFEATURE_ANSWER 0x00000004
@@ -306,6 +443,570 @@ typedef HANDLE HPHONEAPP, *LPHPHONEAPP;
#define LINECALLFEATURE_SWAPHOLD 0x04000000
#define LINECALLFEATURE_UNHOLD 0x08000000
#define LINECALLFEATURE_RELEASEUSERUSERINFO 0x10000000
+#if (TAPI_CURRENT_VERSION >= 0x00020000)
+#define LINECALLFEATURE_SETTREATMENT 0x20000000
+#define LINECALLFEATURE_SETQOS 0x40000000
+#define LINECALLFEATURE_SETCALLDATA 0x80000000
+#endif
+
+#if (TAPI_CURRENT_VERSION >= 0x00020000)
+#define LINECALLFEATURE2_NOHOLDCONFERENCE 0x00000001
+#define LINECALLFEATURE2_ONESTEPTRANSFER 0x00000002
+#define LINECALLFEATURE2_COMPLCAMPON 0x00000004
+#define LINECALLFEATURE2_COMPLCALLBACK 0x00000008
+#define LINECALLFEATURE2_COMPLINTRUDE 0x00000010
+#define LINECALLFEATURE2_COMPLMESSAGE 0x00000020
+#define LINECALLFEATURE2_TRANSFERNORM 0x00000040
+#define LINECALLFEATURE2_TRANSFERCONF 0x00000080
+#define LINECALLFEATURE2_PARKDIRECT 0x00000100
+#define LINECALLFEATURE2_PARKNONDIRECT 0x00000200
+#endif
+
+#if (TAPI_CURRENT_VERSION >= 0x00030000)
+#define LINECALLHUBTRACKING_NONE 0x00000000
+#define LINECALLHUBTRACKING_PROVIDERLEVEL 0x00000001
+#define LINECALLHUBTRACKING_ALLCALLS 0x00000002
+#endif
+
+#define LINECALLINFOSTATE_OTHER 0x00000001
+#define LINECALLINFOSTATE_DEVSPECIFIC 0x00000002
+#define LINECALLINFOSTATE_BEARERMODE 0x00000004
+#define LINECALLINFOSTATE_RATE 0x00000008
+#define LINECALLINFOSTATE_MEDIAMODE 0x00000010
+#define LINECALLINFOSTATE_APPSPECIFIC 0x00000020
+#define LINECALLINFOSTATE_CALLID 0x00000040
+#define LINECALLINFOSTATE_RELATEDCALLID 0x00000080
+#define LINECALLINFOSTATE_ORIGIN 0x00000100
+#define LINECALLINFOSTATE_REASON 0x00000200
+#define LINECALLINFOSTATE_COMPLETIONID 0x00000400
+#define LINECALLINFOSTATE_NUMOWNERINCR 0x00000800
+#define LINECALLINFOSTATE_NUMOWNERDECR 0x00001000
+#define LINECALLINFOSTATE_NUMMONITORS 0x00002000
+#define LINECALLINFOSTATE_TRUNK 0x00004000
+#define LINECALLINFOSTATE_CALLERID 0x00008000
+#define LINECALLINFOSTATE_CALLEDID 0x00010000
+#define LINECALLINFOSTATE_CONNECTEDID 0x00020000
+#define LINECALLINFOSTATE_REDIRECTIONID 0x00040000
+#define LINECALLINFOSTATE_REDIRECTINGID 0x00080000
+#define LINECALLINFOSTATE_DISPLAY 0x00100000
+#define LINECALLINFOSTATE_USERUSERINFO 0x00200000
+#define LINECALLINFOSTATE_HIGHLEVELCOMP 0x00400000
+#define LINECALLINFOSTATE_LOWLEVELCOMP 0x00800000
+#define LINECALLINFOSTATE_CHARGINGINFO 0x01000000
+#define LINECALLINFOSTATE_TERMINAL 0x02000000
+#define LINECALLINFOSTATE_DIALPARAMS 0x04000000
+#define LINECALLINFOSTATE_MONITORMODES 0x08000000
+#if (TAPI_CURRENT_VERSION >= 0x00020000)
+#define LINECALLINFOSTATE_TREATMENT 0x10000000
+#define LINECALLINFOSTATE_QOS 0x20000000
+#define LINECALLINFOSTATE_CALLDATA 0x40000000
+#endif
+
+#define LINECALLORIGIN_OUTBOUND 0x00000001
+#define LINECALLORIGIN_INTERNAL 0x00000002
+#define LINECALLORIGIN_EXTERNAL 0x00000004
+#define LINECALLORIGIN_UNKNOWN 0x00000010
+#define LINECALLORIGIN_UNAVAIL 0x00000020
+#define LINECALLORIGIN_CONFERENCE 0x00000040
+#define LINECALLORIGIN_INBOUND 0x00000080
+
+#define LINECALLPARAMFLAGS_SECURE 0x00000001
+#define LINECALLPARAMFLAGS_IDLE 0x00000002
+#define LINECALLPARAMFLAGS_BLOCKID 0x00000004
+#define LINECALLPARAMFLAGS_ORIGOFFHOOK 0x00000008
+#define LINECALLPARAMFLAGS_DESTOFFHOOK 0x00000010
+#if (TAPI_CURRENT_VERSION >= 0x00020000)
+#define LINECALLPARAMFLAGS_NOHOLDCONFERENCE 0x00000020
+#define LINECALLPARAMFLAGS_PREDICTIVEDIAL 0x00000040
+#define LINECALLPARAMFLAGS_ONESTEPTRANSFER 0x00000080
+#endif
+
+#define LINECALLPARTYID_BLOCKED 0x00000001
+#define LINECALLPARTYID_OUTOFAREA 0x00000002
+#define LINECALLPARTYID_NAME 0x00000004
+#define LINECALLPARTYID_ADDRESS 0x00000008
+#define LINECALLPARTYID_PARTIAL 0x00000010
+#define LINECALLPARTYID_UNKNOWN 0x00000020
+#define LINECALLPARTYID_UNAVAIL 0x00000040
+
+#if (TAPI_CURRENT_VERSION >= 0x00020000)
+#define LINEPROXYREQUEST_SETAGENTGROUP 0x00000001
+#define LINEPROXYREQUEST_SETAGENTSTATE 0x00000002
+#define LINEPROXYREQUEST_SETAGENTACTIVITY 0x00000003
+#define LINEPROXYREQUEST_GETAGENTCAPS 0x00000004
+#define LINEPROXYREQUEST_GETAGENTSTATUS 0x00000005
+#define LINEPROXYREQUEST_AGENTSPECIFIC 0x00000006
+#define LINEPROXYREQUEST_GETAGENTACTIVITYLIST 0x00000007
+#define LINEPROXYREQUEST_GETAGENTGROUPLIST 0x00000008
+#endif
+
+#if (TAPI_CURRENT_VERSION >= 0x00020002)
+#define LINEPROXYREQUEST_CREATEAGENT 0x00000009
+#define LINEPROXYREQUEST_SETAGENTMEASUREMENTPERIOD 0x0000000A
+#define LINEPROXYREQUEST_GETAGENTINFO 0x0000000B
+#define LINEPROXYREQUEST_CREATEAGENTSESSION 0x0000000C
+#define LINEPROXYREQUEST_GETAGENTSESSIONLIST 0x0000000D
+#define LINEPROXYREQUEST_SETAGENTSESSIONSTATE 0x0000000E
+#define LINEPROXYREQUEST_GETAGENTSESSIONINFO 0x0000000F
+#define LINEPROXYREQUEST_GETQUEUELIST 0x00000010
+#define LINEPROXYREQUEST_SETQUEUEMEASUREMENTPERIOD 0x00000011
+#define LINEPROXYREQUEST_GETQUEUEINFO 0x00000012
+#define LINEPROXYREQUEST_GETGROUPLIST 0x00000013
+#define LINEPROXYREQUEST_SETAGENTSTATEEX 0x00000014
+#endif
+
+#define TAPI_REPLY WM_USER + 99
+
+#define TAPIERR_CONNECTED 0L
+#define TAPIERR_DROPPED -1L
+#define TAPIERR_NOREQUESTRECIPIENT -2L
+#define TAPIERR_REQUESTQUEUEFULL -3L
+#define TAPIERR_INVALDESTADDRESS -4L
+#define TAPIERR_INVALWINDOWHANDLE -5L
+#define TAPIERR_INVALDEVICECLASS -6L
+#define TAPIERR_INVALDEVICEID -7L
+#define TAPIERR_DEVICECLASSUNAVAIL -8L
+#define TAPIERR_DEVICEIDUNAVAIL -9L
+#define TAPIERR_DEVICEINUSE -10L
+#define TAPIERR_DESTBUSY -11L
+#define TAPIERR_DESTNOANSWER -12L
+#define TAPIERR_DESTUNAVAIL -13L
+#define TAPIERR_UNKNOWNWINHANDLE -14L
+#define TAPIERR_UNKNOWNREQUESTID -15L
+#define TAPIERR_REQUESTFAILED -16L
+#define TAPIERR_REQUESTCANCELLED -17L
+#define TAPIERR_INVALPOINTER -18L
+#define TAPIERR_NOTADMIN -19L
+#define TAPIERR_MMCWRITELOCKED -20L
+#define TAPIERR_PROVIDERALREADYINSTALLED -21L
+#define TAPIERR_SCP_ALREADY_EXISTS -22L
+#define TAPIERR_SCP_DOES_NOT_EXIST -23L
+
+#define TAPIMAXDESTADDRESSSIZE 80L
+#define TAPIMAXAPPNAMESIZE 40L
+#define TAPIMAXCALLEDPARTYSIZE 40L
+#define TAPIMAXCOMMENTSIZE 80L
+#define TAPIMAXDEVICECLASSSIZE 40L
+#define TAPIMAXDEVICEIDSIZE 40L
+
+#define PHONEBUTTONFUNCTION_UNKNOWN 0x00000000
+#define PHONEBUTTONFUNCTION_CONFERENCE 0x00000001
+#define PHONEBUTTONFUNCTION_TRANSFER 0x00000002
+#define PHONEBUTTONFUNCTION_DROP 0x00000003
+#define PHONEBUTTONFUNCTION_HOLD 0x00000004
+#define PHONEBUTTONFUNCTION_RECALL 0x00000005
+#define PHONEBUTTONFUNCTION_DISCONNECT 0x00000006
+#define PHONEBUTTONFUNCTION_CONNECT 0x00000007
+#define PHONEBUTTONFUNCTION_MSGWAITON 0x00000008
+#define PHONEBUTTONFUNCTION_MSGWAITOFF 0x00000009
+#define PHONEBUTTONFUNCTION_SELECTRING 0x0000000A
+#define PHONEBUTTONFUNCTION_ABBREVDIAL 0x0000000B
+#define PHONEBUTTONFUNCTION_FORWARD 0x0000000C
+#define PHONEBUTTONFUNCTION_PICKUP 0x0000000D
+#define PHONEBUTTONFUNCTION_RINGAGAIN 0x0000000E
+#define PHONEBUTTONFUNCTION_PARK 0x0000000F
+#define PHONEBUTTONFUNCTION_REJECT 0x00000010
+#define PHONEBUTTONFUNCTION_REDIRECT 0x00000011
+#define PHONEBUTTONFUNCTION_MUTE 0x00000012
+#define PHONEBUTTONFUNCTION_VOLUMEUP 0x00000013
+#define PHONEBUTTONFUNCTION_VOLUMEDOWN 0x00000014
+#define PHONEBUTTONFUNCTION_SPEAKERON 0x00000015
+#define PHONEBUTTONFUNCTION_SPEAKEROFF 0x00000016
+#define PHONEBUTTONFUNCTION_FLASH 0x00000017
+#define PHONEBUTTONFUNCTION_DATAON 0x00000018
+#define PHONEBUTTONFUNCTION_DATAOFF 0x00000019
+#define PHONEBUTTONFUNCTION_DONOTDISTURB 0x0000001A
+#define PHONEBUTTONFUNCTION_INTERCOM 0x0000001B
+#define PHONEBUTTONFUNCTION_BRIDGEDAPP 0x0000001C
+#define PHONEBUTTONFUNCTION_BUSY 0x0000001D
+#define PHONEBUTTONFUNCTION_CALLAPP 0x0000001E
+#define PHONEBUTTONFUNCTION_DATETIME 0x0000001F
+#define PHONEBUTTONFUNCTION_DIRECTORY 0x00000020
+#define PHONEBUTTONFUNCTION_COVER 0x00000021
+#define PHONEBUTTONFUNCTION_CALLID 0x00000022
+#define PHONEBUTTONFUNCTION_LASTNUM 0x00000023
+#define PHONEBUTTONFUNCTION_NIGHTSRV 0x00000024
+#define PHONEBUTTONFUNCTION_SENDCALLS 0x00000025
+#define PHONEBUTTONFUNCTION_MSGINDICATOR 0x00000026
+#define PHONEBUTTONFUNCTION_REPDIAL 0x00000027
+#define PHONEBUTTONFUNCTION_SETREPDIAL 0x00000028
+#define PHONEBUTTONFUNCTION_SYSTEMSPEED 0x00000029
+#define PHONEBUTTONFUNCTION_STATIONSPEED 0x0000002A
+#define PHONEBUTTONFUNCTION_CAMPON 0x0000002B
+#define PHONEBUTTONFUNCTION_SAVEREPEAT 0x0000002C
+#define PHONEBUTTONFUNCTION_QUEUECALL 0x0000002D
+#define PHONEBUTTONFUNCTION_NONE 0x0000002E
+#if (TAPI_CURRENT_VERSION >= 0x00030001)
+#define PHONEBUTTONFUNCTION_SEND 0x0000002F
+#endif
+
+#define PHONEBUTTONMODE_DUMMY 0x00000001
+#define PHONEBUTTONMODE_CALL 0x00000002
+#define PHONEBUTTONMODE_FEATURE 0x00000004
+#define PHONEBUTTONMODE_KEYPAD 0x00000008
+#define PHONEBUTTONMODE_LOCAL 0x00000010
+#define PHONEBUTTONMODE_DISPLAY 0x00000020
+
+#define PHONEBUTTONSTATE_UP 0x00000001
+#define PHONEBUTTONSTATE_DOWN 0x00000002
+#define PHONEBUTTONSTATE_UNKNOWN 0x00000004
+#define PHONEBUTTONSTATE_UNAVAIL 0x00000008
+
+#define PHONEERR_ALLOCATED 0x90000001
+#define PHONEERR_BADDEVICEID 0x90000002
+#define PHONEERR_INCOMPATIBLEAPIVERSION 0x90000003
+#define PHONEERR_INCOMPATIBLEEXTVERSION 0x90000004
+#define PHONEERR_INIFILECORRUPT 0x90000005
+#define PHONEERR_INUSE 0x90000006
+#define PHONEERR_INVALAPPHANDLE 0x90000007
+#define PHONEERR_INVALAPPNAME 0x90000008
+#define PHONEERR_INVALBUTTONLAMPID 0x90000009
+#define PHONEERR_INVALBUTTONMODE 0x9000000A
+#define PHONEERR_INVALBUTTONSTATE 0x9000000B
+#define PHONEERR_INVALDATAID 0x9000000C
+#define PHONEERR_INVALDEVICECLASS 0x9000000D
+#define PHONEERR_INVALEXTVERSION 0x9000000E
+#define PHONEERR_INVALHOOKSWITCHDEV 0x9000000F
+#define PHONEERR_INVALHOOKSWITCHMODE 0x90000010
+#define PHONEERR_INVALLAMPMODE 0x90000011
+#define PHONEERR_INVALPARAM 0x90000012
+#define PHONEERR_INVALPHONEHANDLE 0x90000013
+#define PHONEERR_INVALPHONESTATE 0x90000014
+#define PHONEERR_INVALPOINTER 0x90000015
+#define PHONEERR_INVALPRIVILEGE 0x90000016
+#define PHONEERR_INVALRINGMODE 0x90000017
+#define PHONEERR_NODEVICE 0x90000018
+#define PHONEERR_NODRIVER 0x90000019
+#define PHONEERR_NOMEM 0x9000001A
+#define PHONEERR_NOTOWNER 0x9000001B
+#define PHONEERR_OPERATIONFAILED 0x9000001C
+#define PHONEERR_OPERATIONUNAVAIL 0x9000001D
+#define PHONEERR_RESOURCEUNAVAIL 0x9000001F
+#define PHONEERR_REQUESTOVERRUN 0x90000020
+#define PHONEERR_STRUCTURETOOSMALL 0x90000021
+#define PHONEERR_UNINITIALIZED 0x90000022
+#define PHONEERR_REINIT 0x90000023
+#define PHONEERR_DISCONNECTED 0x90000024
+#define PHONEERR_SERVICE_NOT_RUNNING 0x90000025
+
+#if (TAPI_CURRENT_VERSION >= 0x00020000)
+#define PHONEFEATURE_GETBUTTONINFO 0x00000001
+#define PHONEFEATURE_GETDATA 0x00000002
+#define PHONEFEATURE_GETDISPLAY 0x00000004
+#define PHONEFEATURE_GETGAINHANDSET 0x00000008
+#define PHONEFEATURE_GETGAINSPEAKER 0x00000010
+#define PHONEFEATURE_GETGAINHEADSET 0x00000020
+#define PHONEFEATURE_GETHOOKSWITCHHANDSET 0x00000040
+#define PHONEFEATURE_GETHOOKSWITCHSPEAKER 0x00000080
+#define PHONEFEATURE_GETHOOKSWITCHHEADSET 0x00000100
+#define PHONEFEATURE_GETLAMP 0x00000200
+#define PHONEFEATURE_GETRING 0x00000400
+#define PHONEFEATURE_GETVOLUMEHANDSET 0x00000800
+#define PHONEFEATURE_GETVOLUMESPEAKER 0x00001000
+#define PHONEFEATURE_GETVOLUMEHEADSET 0x00002000
+#define PHONEFEATURE_SETBUTTONINFO 0x00004000
+#define PHONEFEATURE_SETDATA 0x00008000
+#define PHONEFEATURE_SETDISPLAY 0x00010000
+#define PHONEFEATURE_SETGAINHANDSET 0x00020000
+#define PHONEFEATURE_SETGAINSPEAKER 0x00040000
+#define PHONEFEATURE_SETGAINHEADSET 0x00080000
+#define PHONEFEATURE_SETHOOKSWITCHHANDSET 0x00100000
+#define PHONEFEATURE_SETHOOKSWITCHSPEAKER 0x00200000
+#define PHONEFEATURE_SETHOOKSWITCHHEADSET 0x00400000
+#define PHONEFEATURE_SETLAMP 0x00800000
+#define PHONEFEATURE_SETRING 0x01000000
+#define PHONEFEATURE_SETVOLUMEHANDSET 0x02000000
+#define PHONEFEATURE_SETVOLUMESPEAKER 0x04000000
+#define PHONEFEATURE_SETVOLUMEHEADSET 0x08000000
+#endif
+#if (TAPI_CURRENT_VERSION >= 0x00030001)
+#define PHONEFEATURE_GENERICPHONE 0x10000000
+#endif
+
+#define PHONEHOOKSWITCHDEV_HANDSET 0x00000001
+#define PHONEHOOKSWITCHDEV_SPEAKER 0x00000002
+#define PHONEHOOKSWITCHDEV_HEADSET 0x00000004
+
+#define PHONEHOOKSWITCHMODE_ONHOOK 0x00000001
+#define PHONEHOOKSWITCHMODE_MIC 0x00000002
+#define PHONEHOOKSWITCHMODE_SPEAKER 0x00000004
+#define PHONEHOOKSWITCHMODE_MICSPEAKER 0x00000008
+#define PHONEHOOKSWITCHMODE_UNKNOWN 0x00000010
+
+#if (TAPI_CURRENT_VERSION >= 0x00020000)
+#define PHONEINITIALIZEEXOPTION_USEHIDDENWINDOW 0x00000001
+#define PHONEINITIALIZEEXOPTION_USEEVENT 0x00000002
+#define PHONEINITIALIZEEXOPTION_USECOMPLETIONPORT 0x00000003
+#endif
+
+#define PHONELAMPMODE_DUMMY 0x00000001
+#define PHONELAMPMODE_OFF 0x00000002
+#define PHONELAMPMODE_STEADY 0x00000004
+#define PHONELAMPMODE_WINK 0x00000008
+#define PHONELAMPMODE_FLASH 0x00000010
+#define PHONELAMPMODE_FLUTTER 0x00000020
+#define PHONELAMPMODE_BROKENFLUTTER 0x00000040
+#define PHONELAMPMODE_UNKNOWN 0x00000080
+
+#define PHONEPRIVILEGE_MONITOR 0x00000001
+#define PHONEPRIVILEGE_OWNER 0x00000002
+
+#define PHONESTATE_OTHER 0x00000001
+#define PHONESTATE_CONNECTED 0x00000002
+#define PHONESTATE_DISCONNECTED 0x00000004
+#define PHONESTATE_OWNER 0x00000008
+#define PHONESTATE_MONITORS 0x00000010
+#define PHONESTATE_DISPLAY 0x00000020
+#define PHONESTATE_LAMP 0x00000040
+#define PHONESTATE_RINGMODE 0x00000080
+#define PHONESTATE_RINGVOLUME 0x00000100
+#define PHONESTATE_HANDSETHOOKSWITCH 0x00000200
+#define PHONESTATE_HANDSETVOLUME 0x00000400
+#define PHONESTATE_HANDSETGAIN 0x00000800
+#define PHONESTATE_SPEAKERHOOKSWITCH 0x00001000
+#define PHONESTATE_SPEAKERVOLUME 0x00002000
+#define PHONESTATE_SPEAKERGAIN 0x00004000
+#define PHONESTATE_HEADSETHOOKSWITCH 0x00008000
+#define PHONESTATE_HEADSETVOLUME 0x00010000
+#define PHONESTATE_HEADSETGAIN 0x00020000
+#define PHONESTATE_SUSPEND 0x00040000
+#define PHONESTATE_RESUME 0x00080000
+#define PHONESTATE_DEVSPECIFIC 0x00100000
+#define PHONESTATE_REINIT 0x00200000
+#define PHONESTATE_CAPSCHANGE 0x00400000
+#define PHONESTATE_REMOVED 0x00800000
+
+#define PHONESTATUSFLAGS_CONNECTED 0x00000001
+#define PHONESTATUSFLAGS_SUSPENDED 0x00000002
+
+#if (TAPI_CURRENT_VERSION >= 0x00020000)
+typedef struct lineagentactivityentry_tag
+{
+ DWORD dwID;
+ DWORD dwNameSize;
+ DWORD dwNameOffset;
+} LINEAGENTACTIVITYENTRY, *LPLINEAGENTACTIVITYENTRY;
+
+typedef struct lineagentactivitylist_tag
+{
+ DWORD dwTotalSize;
+ DWORD dwNeededSize;
+ DWORD dwUsedSize;
+ DWORD dwNumEntries;
+ DWORD dwListSize;
+ DWORD dwListOffset;
+} LINEAGENTACTIVITYLIST, *LPLINEAGENTACTIVITYLIST;
+
+typedef struct lineagentcaps_tag
+{
+ DWORD dwTotalSize;
+ DWORD dwNeededSize;
+ DWORD dwUsedSize;
+ DWORD dwAgentHandlerInfoSize;
+ DWORD dwAgentHandlerInfoOffset;
+ DWORD dwCapsVersion;
+ DWORD dwFeatures;
+ DWORD dwStates;
+ DWORD dwNextStates;
+ DWORD dwMaxNumGroupEntries;
+ DWORD dwAgentStatusMessages;
+ DWORD dwNumAgentExtensionIDs;
+ DWORD dwAgentExtensionIDListSize;
+ DWORD dwAgentExtensionIDListOffset;
+#if (TAPI_CURRENT_VERSION >= 0x00020002)
+ GUID ProxyGUID;
+#endif
+} LINEAGENTCAPS, *LPLINEAGENTCAPS;
+
+typedef struct lineagentgroupentry_tag
+{
+ struct
+ {
+ DWORD dwGroupID1;
+ DWORD dwGroupID2;
+ DWORD dwGroupID3;
+ DWORD dwGroupID4;
+ } GroupID;
+ DWORD dwNameSize;
+ DWORD dwNameOffset;
+} LINEAGENTGROUPENTRY, *LPLINEAGENTGROUPENTRY;
+
+typedef struct lineagentgrouplist_tag
+{
+ DWORD dwTotalSize;
+ DWORD dwNeededSize;
+ DWORD dwUsedSize;
+ DWORD dwNumEntries;
+ DWORD dwListSize;
+ DWORD dwListOffset;
+} LINEAGENTGROUPLIST, *LPLINEAGENTGROUPLIST;
+
+typedef struct lineagentstatus_tag
+{
+ DWORD dwTotalSize;
+ DWORD dwNeededSize;
+ DWORD dwUsedSize;
+ DWORD dwNumEntries;
+ DWORD dwGroupListSize;
+ DWORD dwGroupListOffset;
+ DWORD dwState;
+ DWORD dwNextState;
+ DWORD dwActivityID;
+ DWORD dwActivitySize;
+ DWORD dwActivityOffset;
+ DWORD dwAgentFeatures;
+ DWORD dwValidStates;
+ DWORD dwValidNextStates;
+} LINEAGENTSTATUS, *LPLINEAGENTSTATUS;
+
+typedef struct lineappinfo_tag
+{
+ DWORD dwMachineNameSize;
+ DWORD dwMachineNameOffset;
+ DWORD dwUserNameSize;
+ DWORD dwUserNameOffset;
+ DWORD dwModuleFilenameSize;
+ DWORD dwModuleFilenameOffset;
+ DWORD dwFriendlyNameSize;
+ DWORD dwFriendlyNameOffset;
+ DWORD dwMediaModes;
+ DWORD dwAddressID;
+} LINEAPPINFO, *LPLINEAPPINFO;
+#endif
+
+#if (TAPI_CURRENT_VERSION >= 0x00020002)
+typedef struct lineagententry_tag
+{
+ HAGENT hAgent;
+ DWORD dwNameSize;
+ DWORD dwNameOffset;
+ DWORD dwIDSize;
+ DWORD dwIDOffset;
+ DWORD dwPINSize;
+ DWORD dwPINOffset;
+} LINEAGENTENTRY, *LPLINEAGENTENTRY;
+
+typedef struct lineagentlist_tag
+{
+ DWORD dwTotalSize;
+ DWORD dwNeededSize;
+ DWORD dwUsedSize;
+ DWORD dwNumEntries;
+ DWORD dwListSize;
+ DWORD dwListOffset;
+} LINEAGENTLIST, *LPLINEAGENTLIST;
+
+typedef struct lineagentinfo_tag
+{
+ DWORD dwTotalSize;
+ DWORD dwNeededSize;
+ DWORD dwUsedSize;
+ DWORD dwAgentState;
+ DWORD dwNextAgentState;
+ DWORD dwMeasurementPeriod;
+ CURRENCY cyOverallCallRate;
+ DWORD dwNumberOfACDCalls;
+ DWORD dwNumberOfIncomingCalls;
+ DWORD dwNumberOfOutgoingCalls;
+ DWORD dwTotalACDTalkTime;
+ DWORD dwTotalACDCallTime;
+ DWORD dwTotalACDWrapUpTime;
+} LINEAGENTINFO, *LPLINEAGENTINFO;
+
+typedef struct lineagentsession_tag
+{
+ HAGENTSESSION hAgentSession;
+ HAGENT hAgent;
+ GUID GroupID;
+ DWORD dwWorkingAddressID;
+} LINEAGENTSESSIONENTRY, *LPLINEAGENTSESSIONENTRY;
+
+typedef struct lineagentsessionlist_tag
+{
+ DWORD dwTotalSize;
+ DWORD dwNeededSize;
+ DWORD dwUsedSize;
+ DWORD dwNumEntries;
+ DWORD dwListSize;
+ DWORD dwListOffset;
+} LINEAGENTSESSIONLIST, *LPLINEAGENTSESSIONLIST;
+
+typedef struct lineagentsessioninfo_tag
+{
+ DWORD dwTotalSize;
+ DWORD dwNeededSize;
+ DWORD dwUsedSize;
+ DWORD dwAgentSessionState;
+ DWORD dwNextAgentSessionState;
+ DATE dateSessionStartTime;
+ DWORD dwSessionDuration;
+ DWORD dwNumberOfCalls;
+ DWORD dwTotalTalkTime;
+ DWORD dwAverageTalkTime;
+ DWORD dwTotalCallTime;
+ DWORD dwAverageCallTime;
+ DWORD dwTotalWrapUpTime;
+ DWORD dwAverageWrapUpTime;
+ CURRENCY cyACDCallRate;
+ DWORD dwLongestTimeToAnswer;
+ DWORD dwAverageTimeToAnswer;
+} LINEAGENTSESSIONINFO, *LPLINEAGENTSESSIONINFO;
+
+typedef struct linequeueentry_tag
+{
+ DWORD dwQueueID;
+ DWORD dwNameSize;
+ DWORD dwNameOffset;
+} LINEQUEUEENTRY, *LPLINEQUEUEENTRY;
+
+typedef struct linequeuelist_tag
+{
+ DWORD dwTotalSize;
+ DWORD dwNeededSize;
+ DWORD dwUsedSize;
+ DWORD dwNumEntries;
+ DWORD dwListSize;
+ DWORD dwListOffset;
+} LINEQUEUELIST, *LPLINEQUEUELIST;
+
+typedef struct linequeueinfo_tag
+{
+ DWORD dwTotalSize;
+ DWORD dwNeededSize;
+ DWORD dwUsedSize;
+ DWORD dwMeasurementPeriod;
+ DWORD dwTotalCallsQueued;
+ DWORD dwCurrentCallsQueued;
+ DWORD dwTotalCallsAbandoned;
+ DWORD dwTotalCallsFlowedIn;
+ DWORD dwTotalCallsFlowedOut;
+ DWORD dwLongestEverWaitTime;
+ DWORD dwCurrentLongestWaitTime;
+ DWORD dwAverageWaitTime;
+ DWORD dwFinalDisposition;
+} LINEQUEUEINFO, *LPLINEQUEUEINFO;
+
+typedef struct lineproxyrequestlist_tag
+{
+ DWORD dwTotalSize;
+ DWORD dwNeededSize;
+ DWORD dwUsedSize;
+ DWORD dwNumEntries;
+ DWORD dwListSize;
+ DWORD dwListOffset;
+} LINEPROXYREQUESTLIST, *LPLINEPROXYREQUESTLIST;
+#endif
+
+#if (TAPI_CURRENT_VERSION >= 0x00030000)
+typedef struct linecallhubtrackinginfo_tag
+{
+ DWORD dwTotalSize;
+ DWORD dwNeededSize;
+ DWORD dwUsedSize;
+ DWORD dwAvailableTracking;
+ DWORD dwCurrentTracking;
+} LINECALLHUBTRACKINGINFO, FAR *LPLINECALLHUBTRACKINGINFO;
+#endif
typedef struct lineaddresscaps_tag {
DWORD dwTotalSize;
@@ -632,6 +1333,177 @@ typedef struct linegeneratetone_tag {
DWORD dwVolume;
} LINEGENERATETONE, *LPLINEGENERATETONE;
+#if (TAPI_CURRENT_VERSION >= 0x00020000)
+typedef struct lineinitializeexparams_tag
+{
+ DWORD dwTotalSize;
+ DWORD dwNeededSize;
+ DWORD dwUsedSize;
+ DWORD dwOptions;
+ union { HANDLE hEvent; HANDLE hCompletionPort; } Handles;
+ DWORD dwCompletionKey;
+} LINEINITIALIZEEXPARAMS, FAR *LPLINEINITIALIZEEXPARAMS;
+
+typedef struct linemessage_tag
+{
+ DWORD hDevice;
+ DWORD dwMessageID;
+ DWORD_PTR dwCallbackInstance;
+ DWORD_PTR dwParam1;
+ DWORD_PTR dwParam2;
+ DWORD_PTR dwParam3;
+} LINEMESSAGE, FAR *LPLINEMESSAGE;
+
+typedef struct lineproxyrequest_tag
+{
+ DWORD dwSize;
+ DWORD dwClientMachineNameSize;
+ DWORD dwClientMachineNameOffset;
+ DWORD dwClientUserNameSize;
+ DWORD dwClientUserNameOffset;
+ DWORD dwClientAppAPIVersion;
+ DWORD dwRequestType;
+ union
+ {
+ struct
+ {
+ DWORD dwAddressID;
+ LINEAGENTGROUPLIST GroupList;
+ } SetAgentGroup;
+ struct
+ {
+ DWORD dwAddressID;
+ DWORD dwAgentState;
+ DWORD dwNextAgentState;
+ } SetAgentState;
+ struct
+ {
+ DWORD dwAddressID;
+ DWORD dwActivityID;
+ } SetAgentActivity;
+ struct
+ {
+ DWORD dwAddressID;
+ LINEAGENTCAPS AgentCaps;
+ } GetAgentCaps;
+ struct
+ {
+ DWORD dwAddressID;
+ LINEAGENTSTATUS AgentStatus;
+ } GetAgentStatus;
+ struct
+ {
+ DWORD dwAddressID;
+ DWORD dwAgentExtensionIDIndex;
+ DWORD dwSize;
+ BYTE Params[1];
+ } AgentSpecific;
+ struct
+ {
+ DWORD dwAddressID;
+ LINEAGENTACTIVITYLIST ActivityList;
+ } GetAgentActivityList;
+ struct
+ {
+ DWORD dwAddressID;
+ LINEAGENTGROUPLIST GroupList;
+ } GetAgentGroupList;
+#if (TAPI_CURRENT_VERSION >= 0x00020002)
+ struct
+ {
+ HAGENT hAgent;
+ DWORD dwAgentIDSize;
+ DWORD dwAgentIDOffset;
+ DWORD dwAgentPINSize;
+ DWORD dwAgentPINOffset;
+ } CreateAgent;
+ struct
+ {
+ HAGENT hAgent;
+ DWORD dwAgentState;
+ DWORD dwNextAgentState;
+ } SetAgentStateEx;
+ struct
+ {
+ HAGENT hAgent;
+ DWORD dwMeasurementPeriod;
+ } SetAgentMeasurementPeriod;
+ struct
+ {
+ HAGENT hAgent;
+ LINEAGENTINFO AgentInfo;
+ } GetAgentInfo;
+ struct
+ {
+ HAGENTSESSION hAgentSession;
+ DWORD dwAgentPINSize;
+ DWORD dwAgentPINOffset;
+ HAGENT hAgent;
+ GUID GroupID;
+ DWORD dwWorkingAddressID;
+ } CreateAgentSession;
+ struct
+ {
+ HAGENT hAgent;
+ LINEAGENTSESSIONLIST SessionList;
+ } GetAgentSessionList;
+ struct
+ {
+ HAGENTSESSION hAgentSession;
+ LINEAGENTSESSIONINFO SessionInfo;
+ } GetAgentSessionInfo;
+ struct
+ {
+ HAGENTSESSION hAgentSession;
+ DWORD dwAgentSessionState;
+ DWORD dwNextAgentSessionState;
+ } SetAgentSessionState;
+ struct
+ {
+ GUID GroupID;
+ LINEQUEUELIST QueueList;
+ } GetQueueList;
+ struct
+ {
+ DWORD dwQueueID;
+ DWORD dwMeasurementPeriod;
+ } SetQueueMeasurementPeriod;
+ struct
+ {
+ DWORD dwQueueID;
+ LINEQUEUEINFO QueueInfo;
+ } GetQueueInfo;
+ struct
+ {
+ LINEAGENTGROUPLIST GroupList;
+ } GetGroupList;
+#endif
+ };
+} LINEPROXYREQUEST, *LPLINEPROXYREQUEST;
+
+typedef struct linereqmakecallW_tag
+{
+ WCHAR szDestAddress[TAPIMAXDESTADDRESSSIZE];
+ WCHAR szAppName[TAPIMAXAPPNAMESIZE];
+ WCHAR szCalledParty[TAPIMAXCALLEDPARTYSIZE];
+ WCHAR szComment[TAPIMAXCOMMENTSIZE];
+} LINEREQMAKECALLW, FAR *LPLINEREQMAKECALLW;
+
+typedef struct linereqmediacallW_tag
+{
+ HWND hWnd;
+ WPARAM wRequestID;
+ WCHAR szDeviceClass[TAPIMAXDEVICECLASSSIZE];
+ unsigned char ucDeviceID[TAPIMAXDEVICEIDSIZE];
+ DWORD dwSize;
+ DWORD dwSecure;
+ WCHAR szDestAddress[TAPIMAXDESTADDRESSSIZE];
+ WCHAR szAppName[TAPIMAXAPPNAMESIZE];
+ WCHAR szCalledParty[TAPIMAXCALLEDPARTYSIZE];
+ WCHAR szComment[TAPIMAXCOMMENTSIZE];
+} LINEREQMEDIACALLW, FAR *LPLINEREQMEDIACALLW;
+#endif /* (TAPI_CURRENT_VERSION >= 0x00020000) */
+
typedef struct linemediacontrolcallstate_tag {
DWORD dwCallStates;
DWORD dwMediaControl;
@@ -798,6 +1670,20 @@ typedef struct phonecaps_tag {
DWORD dwGetDataOffset;
DWORD dwDevSpecificSize;
DWORD dwDevSpecificOffset;
+#if (TAPI_CURRENT_VERSION >= 0x00020000)
+ DWORD dwDeviceClassesSize;
+ DWORD dwDeviceClassesOffset;
+ DWORD dwPhoneFeatures;
+ DWORD dwSettableHandsetHookSwitchModes;
+ DWORD dwSettableSpeakerHookSwitchModes;
+ DWORD dwSettableHeadsetHookSwitchModes;
+ DWORD dwMonitoredHandsetHookSwitchModes;
+ DWORD dwMonitoredSpeakerHookSwitchModes;
+ DWORD dwMonitoredHeadsetHookSwitchModes;
+#endif
+#if (TAPI_CURRENT_VERSION >= 0x00020002)
+ GUID PermanentPhoneGuid;
+#endif
} PHONECAPS, *LPPHONECAPS;
typedef struct phoneextensionid_tag {