* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#include "precomp.h"
+#include <stdarg.h>
+#include <stdio.h>
+#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);
/***********************************************************************
* tapiGetLocationInfoW (TAPI32.@)
'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
'T','e','l','e','p','h','o','n','y','\\','L','o','c','a','t','i','o','n','s',0};
- if(!RegOpenKeyW(HKEY_LOCAL_MACHINE, locations_keyW, &hkey) != ERROR_SUCCESS) {
+ if(RegOpenKeyW(HKEY_LOCAL_MACHINE, locations_keyW, &hkey) == ERROR_SUCCESS) {
valsize = sizeof( DWORD);
if(!RegQueryValueExW(hkey, currentidW, 0, &type, (LPBYTE) &currid, &valsize) &&
type == REG_DWORD) {
/* find a subkey called Location1, Location2... */
- sprintfW( szlockey, locationW, currid);
+ swprintf( szlockey, locationW, currid);
if( !RegOpenKeyW( hkey, szlockey, &hsubkey)) {
if( citycode) {
bufsize=sizeof(buf);
bufsize=sizeof(buf);
if( !RegQueryValueExW( hsubkey, countryW, 0, &type, buf, &bufsize) &&
type == REG_DWORD)
- snprintfW( countrycode, 8, fmtW, *(LPDWORD) buf );
+ swprintf( countrycode, fmtW, *(LPDWORD) buf );
else
countrycode[0] = '\0';
}