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

tapi32: Build with msvcrt.

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