Commit 4dd9f585 authored by Alexandre Julliard's avatar Alexandre Julliard

tapi32: Build with msvcrt.

parent c7f2da4f
...@@ -2,6 +2,8 @@ MODULE = tapi32.dll ...@@ -2,6 +2,8 @@ MODULE = tapi32.dll
IMPORTLIB = tapi32 IMPORTLIB = tapi32
IMPORTS = advapi32 IMPORTS = advapi32
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \ C_SRCS = \
assisted.c \ assisted.c \
line.c \ line.c \
......
...@@ -19,9 +19,6 @@ ...@@ -19,9 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include "config.h"
#include "wine/port.h"
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>
#include "windef.h" #include "windef.h"
...@@ -30,7 +27,6 @@ ...@@ -30,7 +27,6 @@
#include "winreg.h" #include "winreg.h"
#include "objbase.h" #include "objbase.h"
#include "tapi.h" #include "tapi.h"
#include "wine/unicode.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(tapi); WINE_DEFAULT_DEBUG_CHANNEL(tapi);
...@@ -65,7 +61,7 @@ DWORD WINAPI tapiGetLocationInfoW(LPWSTR countrycode, LPWSTR citycode) ...@@ -65,7 +61,7 @@ DWORD WINAPI tapiGetLocationInfoW(LPWSTR countrycode, LPWSTR citycode)
if(!RegQueryValueExW(hkey, currentidW, 0, &type, (LPBYTE) &currid, &valsize) && if(!RegQueryValueExW(hkey, currentidW, 0, &type, (LPBYTE) &currid, &valsize) &&
type == REG_DWORD) { type == REG_DWORD) {
/* find a subkey called Location1, Location2... */ /* find a subkey called Location1, Location2... */
sprintfW( szlockey, locationW, currid); swprintf( szlockey, ARRAY_SIZE(szlockey), locationW, currid);
if( !RegOpenKeyW( hkey, szlockey, &hsubkey)) { if( !RegOpenKeyW( hkey, szlockey, &hsubkey)) {
if( citycode) { if( citycode) {
bufsize=sizeof(buf); bufsize=sizeof(buf);
...@@ -79,7 +75,7 @@ DWORD WINAPI tapiGetLocationInfoW(LPWSTR countrycode, LPWSTR citycode) ...@@ -79,7 +75,7 @@ DWORD WINAPI tapiGetLocationInfoW(LPWSTR countrycode, LPWSTR citycode)
bufsize=sizeof(buf); bufsize=sizeof(buf);
if( !RegQueryValueExW( hsubkey, countryW, 0, &type, buf, &bufsize) && if( !RegQueryValueExW( hsubkey, countryW, 0, &type, buf, &bufsize) &&
type == REG_DWORD) type == REG_DWORD)
snprintfW( countrycode, 8, fmtW, *(LPDWORD) buf ); swprintf( countrycode, 8, fmtW, *(LPDWORD) buf );
else else
countrycode[0] = '\0'; countrycode[0] = '\0';
} }
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include "objbase.h" #include "objbase.h"
#include "tapi.h" #include "tapi.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(tapi); WINE_DEFAULT_DEBUG_CHANNEL(tapi);
...@@ -539,7 +538,7 @@ DWORD WINAPI lineGetCountryW(DWORD id, DWORD version, LPLINECOUNTRYLIST list) ...@@ -539,7 +538,7 @@ DWORD WINAPI lineGetCountryW(DWORD id, DWORD version, LPLINECOUNTRYLIST list)
HKEY hsubkey; HKEY hsubkey;
if (RegEnumKeyW(hkey, i, subkey_name, max_subkey_len) != ERROR_SUCCESS) continue; if (RegEnumKeyW(hkey, i, subkey_name, max_subkey_len) != ERROR_SUCCESS) continue;
if (id && (atoiW(subkey_name) != id)) continue; if (id && (wcstol(subkey_name, NULL, 10) != id)) continue;
if (RegOpenKeyW(hkey, subkey_name, &hsubkey) != ERROR_SUCCESS) continue; if (RegOpenKeyW(hkey, subkey_name, &hsubkey) != ERROR_SUCCESS) continue;
RegQueryValueExW(hsubkey, international_ruleW, NULL, NULL, NULL, &size_int); RegQueryValueExW(hsubkey, international_ruleW, NULL, NULL, NULL, &size_int);
...@@ -566,7 +565,7 @@ DWORD WINAPI lineGetCountryW(DWORD id, DWORD version, LPLINECOUNTRYLIST list) ...@@ -566,7 +565,7 @@ DWORD WINAPI lineGetCountryW(DWORD id, DWORD version, LPLINECOUNTRYLIST list)
list->dwUsedSize += len + sizeof(LINECOUNTRYENTRY); list->dwUsedSize += len + sizeof(LINECOUNTRYENTRY);
if (id) i = 0; if (id) i = 0;
entry[i].dwCountryID = atoiW(subkey_name); entry[i].dwCountryID = wcstol(subkey_name, NULL, 10);
size = sizeof(DWORD); size = sizeof(DWORD);
RegQueryValueExW(hsubkey, country_codeW, NULL, NULL, (BYTE *)&entry[i].dwCountryCode, &size); RegQueryValueExW(hsubkey, country_codeW, NULL, NULL, (BYTE *)&entry[i].dwCountryCode, &size);
entry[i].dwNextCountryID = 0; entry[i].dwNextCountryID = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment