regedit: Write-strings warnings fix.
This commit is contained in:
parent
4f49201413
commit
feb11af7af
|
@ -252,6 +252,19 @@ static BOOL CreateListColumns(HWND hWndListView)
|
||||||
static void OnGetDispInfo(NMLVDISPINFO* plvdi)
|
static void OnGetDispInfo(NMLVDISPINFO* plvdi)
|
||||||
{
|
{
|
||||||
static TCHAR buffer[200];
|
static TCHAR buffer[200];
|
||||||
|
static TCHAR reg_szT[] = {'R','E','G','_','S','Z',0},
|
||||||
|
reg_expand_szT[] = {'R','E','G','_','E','X','P','A','N','D','_','S','Z',0},
|
||||||
|
reg_binaryT[] = {'R','E','G','_','B','I','N','A','R','Y',0},
|
||||||
|
reg_dwordT[] = {'R','E','G','_','D','W','O','R','D',0},
|
||||||
|
reg_dword_big_endianT[] = {'R','E','G','_','D','W','O','R','D','_',
|
||||||
|
'B','I','G','_','E','N','D','I','A','N',0},
|
||||||
|
reg_multi_szT[] = {'R','E','G','_','M','U','L','T','I','_','S','Z',0},
|
||||||
|
reg_linkT[] = {'R','E','G','_','L','I','N','K',0},
|
||||||
|
reg_resource_listT[] = {'R','E','G','_','R','E','S','O','U','R','C','E','_','L','I','S','T',0},
|
||||||
|
reg_noneT[] = {'R','E','G','_','N','O','N','E',0},
|
||||||
|
not_setT[] = {'(','v','a','l','u','e',' ','n','o','t',' ','s','e','t',')',0},
|
||||||
|
emptyT[] = {0};
|
||||||
|
static const TCHAR unknownT[] = {'u','n','k','n','o','w','n','(','%','d',')',0};
|
||||||
|
|
||||||
plvdi->item.pszText = NULL;
|
plvdi->item.pszText = NULL;
|
||||||
plvdi->item.cchTextMax = 0;
|
plvdi->item.cchTextMax = 0;
|
||||||
|
@ -263,43 +276,43 @@ static void OnGetDispInfo(NMLVDISPINFO* plvdi)
|
||||||
case 1:
|
case 1:
|
||||||
switch (((LINE_INFO*)plvdi->item.lParam)->dwValType) {
|
switch (((LINE_INFO*)plvdi->item.lParam)->dwValType) {
|
||||||
case REG_SZ:
|
case REG_SZ:
|
||||||
plvdi->item.pszText = _T("REG_SZ");
|
plvdi->item.pszText = reg_szT;
|
||||||
break;
|
break;
|
||||||
case REG_EXPAND_SZ:
|
case REG_EXPAND_SZ:
|
||||||
plvdi->item.pszText = _T("REG_EXPAND_SZ");
|
plvdi->item.pszText = reg_expand_szT;
|
||||||
break;
|
break;
|
||||||
case REG_BINARY:
|
case REG_BINARY:
|
||||||
plvdi->item.pszText = _T("REG_BINARY");
|
plvdi->item.pszText = reg_binaryT;
|
||||||
break;
|
break;
|
||||||
case REG_DWORD:
|
case REG_DWORD:
|
||||||
plvdi->item.pszText = _T("REG_DWORD");
|
plvdi->item.pszText = reg_dwordT;
|
||||||
break;
|
break;
|
||||||
case REG_DWORD_BIG_ENDIAN:
|
case REG_DWORD_BIG_ENDIAN:
|
||||||
plvdi->item.pszText = _T("REG_DWORD_BIG_ENDIAN");
|
plvdi->item.pszText = reg_dword_big_endianT;
|
||||||
break;
|
break;
|
||||||
case REG_MULTI_SZ:
|
case REG_MULTI_SZ:
|
||||||
plvdi->item.pszText = _T("REG_MULTI_SZ");
|
plvdi->item.pszText = reg_multi_szT;
|
||||||
break;
|
break;
|
||||||
case REG_LINK:
|
case REG_LINK:
|
||||||
plvdi->item.pszText = _T("REG_LINK");
|
plvdi->item.pszText = reg_linkT;
|
||||||
break;
|
break;
|
||||||
case REG_RESOURCE_LIST:
|
case REG_RESOURCE_LIST:
|
||||||
plvdi->item.pszText = _T("REG_RESOURCE_LIST");
|
plvdi->item.pszText = reg_resource_listT;
|
||||||
break;
|
break;
|
||||||
case REG_NONE:
|
case REG_NONE:
|
||||||
plvdi->item.pszText = _T("REG_NONE");
|
plvdi->item.pszText = reg_noneT;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
wsprintf(buffer, _T("unknown(%d)"), plvdi->item.lParam);
|
wsprintf(buffer, unknownT, plvdi->item.lParam);
|
||||||
plvdi->item.pszText = buffer;
|
plvdi->item.pszText = buffer;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
plvdi->item.pszText = _T("(value not set)");
|
plvdi->item.pszText = not_setT;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
plvdi->item.pszText = _T("");
|
plvdi->item.pszText = emptyT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue