Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenassisted.c
Go to the documentation of this file.
00001 /* 00002 * TAPI32 Assisted Telephony 00003 * 00004 * Copyright 1999 Andreas Mohr 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 00019 */ 00020 00021 #include "config.h" 00022 #include "wine/port.h" 00023 00024 #include <stdarg.h> 00025 #include <stdio.h> 00026 #include "windef.h" 00027 #include "winbase.h" 00028 #include "wingdi.h" 00029 #include "winreg.h" 00030 #include "objbase.h" 00031 #include "tapi.h" 00032 #include "wine/debug.h" 00033 00034 WINE_DEFAULT_DEBUG_CHANNEL(tapi); 00035 00036 /*********************************************************************** 00037 * tapiGetLocationInfo (TAPI32.@) 00038 */ 00039 DWORD WINAPI tapiGetLocationInfoA(LPSTR lpszCountryCode, LPSTR lpszCityCode) 00040 { 00041 HKEY hkey, hsubkey; 00042 DWORD currid; 00043 DWORD valsize; 00044 DWORD type; 00045 DWORD bufsize; 00046 BYTE buf[100]; 00047 char szlockey[20]; 00048 if(!RegOpenKeyA(HKEY_LOCAL_MACHINE, 00049 "Software\\Microsoft\\Windows\\CurrentVersion\\Telephony\\Locations", 00050 &hkey) != ERROR_SUCCESS) { 00051 valsize = sizeof( DWORD); 00052 if(!RegQueryValueExA(hkey, "CurrentID", 0, &type, (LPBYTE) &currid, 00053 &valsize) && type == REG_DWORD) { 00054 /* find a subkey called Location1, Location2... */ 00055 sprintf( szlockey, "Location%u", currid); 00056 if( !RegOpenKeyA( hkey, szlockey, &hsubkey)) { 00057 if( lpszCityCode) { 00058 bufsize=sizeof(buf); 00059 if( !RegQueryValueExA( hsubkey, "AreaCode", 0, &type, buf, 00060 &bufsize) && type == REG_SZ) { 00061 lstrcpynA( lpszCityCode, (char *) buf, 8); 00062 } else 00063 lpszCityCode[0] = '\0'; 00064 } 00065 if( lpszCountryCode) { 00066 bufsize=sizeof(buf); 00067 if( !RegQueryValueExA( hsubkey, "Country", 0, &type, buf, 00068 &bufsize) && type == REG_DWORD) 00069 snprintf( lpszCountryCode, 8, "%u", *(LPDWORD) buf ); 00070 else 00071 lpszCountryCode[0] = '\0'; 00072 } 00073 TRACE("(%p \"%s\", %p \"%s\"): success.\n", 00074 lpszCountryCode, debugstr_a(lpszCountryCode), 00075 lpszCityCode, debugstr_a(lpszCityCode)); 00076 RegCloseKey( hkey); 00077 RegCloseKey( hsubkey); 00078 return 0; /* SUCCESS */ 00079 } 00080 } 00081 RegCloseKey( hkey); 00082 } 00083 WARN("(%p, %p): failed (no telephony registry entries?).\n", 00084 lpszCountryCode, lpszCityCode); 00085 return TAPIERR_REQUESTFAILED; 00086 } 00087 00088 /*********************************************************************** 00089 * tapiRequestMakeCall (TAPI32.@) 00090 */ 00091 DWORD WINAPI tapiRequestMakeCallA(LPCSTR lpszDestAddress, LPCSTR lpszAppName, 00092 LPCSTR lpszCalledParty, LPCSTR lpszComment) 00093 { 00094 FIXME("(%s, %s, %s, %s): stub.\n", lpszDestAddress, lpszAppName, lpszCalledParty, lpszComment); 00095 return 0; 00096 } Generated on Mon May 28 2012 04:26:11 for ReactOS by
1.7.6.1
|