From 1ad2087e38ba71aee2c6e8e8808115d6feda1273 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Tue, 24 Sep 2002 03:09:12 +0000 Subject: [PATCH] Convert HKEY to a void*. --- dlls/comcat/comcat_main.c | 2 +- dlls/shell32/shellpath.c | 28 ++++++++++++++-------------- dlls/shell32/shellreg.c | 2 +- include/windef.h | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/dlls/comcat/comcat_main.c b/dlls/comcat/comcat_main.c index 913cee23eef..7c17e364350 100644 --- a/dlls/comcat/comcat_main.c +++ b/dlls/comcat/comcat_main.c @@ -53,7 +53,7 @@ static const WCHAR tm_valname[15] = { 'e', 'l', 0 }; static const WCHAR tm_value[5] = { 'B', 'o', 't', 'h', 0 }; static struct regsvr_entry regsvr_entries[6] = { - { HKEY_CLASSES_ROOT, 0, clsid_keyname }, + { (int)HKEY_CLASSES_ROOT, 0, clsid_keyname }, { 0, 1, class_keyname }, { 1, 1, NULL, class_name }, { 1, 1, ips32_keyname }, diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c index 8531f6a9ea5..aa9d3e87da1 100644 --- a/dlls/shell32/shellpath.c +++ b/dlls/shell32/shellpath.c @@ -690,7 +690,7 @@ static const CSIDL_DATA CSIDL_Data[] = "Desktop" }, { /* CSIDL_INTERNET */ - 0, 1, /* FIXME */ + 0, (HKEY)1, /* FIXME */ NULL, NULL, }, @@ -735,7 +735,7 @@ static const CSIDL_DATA CSIDL_Data[] = "SendTo" }, { /* CSIDL_BITBUCKET (is this c:\recycled ?) */ - 0, 1, /* FIXME */ + 0, (HKEY)1, /* FIXME */ NULL, "recycled" }, @@ -745,17 +745,17 @@ static const CSIDL_DATA CSIDL_Data[] = "Start Menu" }, { /* CSIDL_MYDOCUMENTS */ - 0, 1, /* FIXME */ + 0, (HKEY)1, /* FIXME */ NULL, NULL, }, { /* CSIDL_MYMUSIC */ - 0, 1, /* FIXME */ + 0, (HKEY)1, /* FIXME */ NULL, NULL, }, { /* CSIDL_MYVIDEO */ - 0, 1, /* FIXME */ + 0, (HKEY)1, /* FIXME */ NULL, NULL, }, @@ -770,12 +770,12 @@ static const CSIDL_DATA CSIDL_Data[] = "Desktop" }, { /* CSIDL_DRIVES */ - 0, 1, /* FIXME */ + 0, (HKEY)1, /* FIXME */ NULL, "My Computer" }, { /* CSIDL_NETWORK */ - 0, 1, /* FIXME */ + 0, (HKEY)1, /* FIXME */ NULL, "Network Neighborhood" }, @@ -830,12 +830,12 @@ static const CSIDL_DATA CSIDL_Data[] = "Local Settings\\Application Data", }, { /* CSIDL_ALTSTARTUP */ - 0, 1, /* FIXME */ + 0, (HKEY)1, /* FIXME */ NULL, NULL }, { /* CSIDL_COMMON_ALTSTARTUP */ - 0, 1, /* FIXME */ + 0, (HKEY)1, /* FIXME */ NULL, NULL }, @@ -910,17 +910,17 @@ static const CSIDL_DATA CSIDL_Data[] = "Program Files\\Common Files" /* ? */ }, { /* CSIDL_COMMON_TEMPLATES */ - 0, 1, /* FIXME */ + 0, (HKEY)1, /* FIXME */ NULL, NULL }, { /* CSIDL_COMMON_DOCUMENTS */ - 0, 1, /* FIXME */ + 0, (HKEY)1, /* FIXME */ NULL, NULL }, { /* CSIDL_COMMON_ADMINTOOLS */ - 0, 1, /* FIXME */ + 0, (HKEY)1, /* FIXME */ NULL, NULL }, @@ -930,7 +930,7 @@ static const CSIDL_DATA CSIDL_Data[] = "Start Menu\\Programs\\Administrative Tools" }, { /* CSIDL_CONNECTIONS */ - 0, 1, /* FIXME */ + 0, (HKEY)1, /* FIXME */ NULL, NULL }, @@ -1020,7 +1020,7 @@ BOOL WINAPI SHGetSpecialFolderPathA ( ERR("folder unknown or not allowed\n"); return FALSE; } - if (CSIDL_Data[folder].hRootKey == 1) + if (CSIDL_Data[folder].hRootKey == (HKEY)1) { FIXME("folder unknown, please add.\n"); return FALSE; diff --git a/dlls/shell32/shellreg.c b/dlls/shell32/shellreg.c index 4f22c760bc6..a6d7f46d304 100644 --- a/dlls/shell32/shellreg.c +++ b/dlls/shell32/shellreg.c @@ -156,7 +156,7 @@ HRESULT WINAPI SHRegCloseKey (HKEY hkey) */ static inline void fix_win16_hkey( HKEY *hkey ) { - if (*hkey == 0 || *hkey == 1) *hkey = HKEY_CLASSES_ROOT; + if (*hkey == 0 || *hkey == (HKEY)1) *hkey = HKEY_CLASSES_ROOT; } /****************************************************************************** diff --git a/include/windef.h b/include/windef.h index e0c8e456e16..825101d8d0b 100644 --- a/include/windef.h +++ b/include/windef.h @@ -82,7 +82,7 @@ DECLARE_OLD_HANDLE(HFONT); DECLARE_HANDLE(HHOOK); DECLARE_OLD_HANDLE(HICON); DECLARE_OLD_HANDLE(HINSTANCE); -DECLARE_OLD_HANDLE(HKEY); +DECLARE_HANDLE(HKEY); DECLARE_HANDLE(HKL); DECLARE_OLD_HANDLE(HMENU); DECLARE_HANDLE(HMETAFILE);