Remove unecessary cast
This commit is contained in:
parent
0f933b16c3
commit
0c5a42153b
@ -307,11 +307,11 @@ void RegExtDlg::getRegisteredExts()
|
|||||||
//TCHAR valName[extNameLen];
|
//TCHAR valName[extNameLen];
|
||||||
TCHAR valData[extNameLen];
|
TCHAR valData[extNameLen];
|
||||||
int valDataLen = extNameLen * sizeof(TCHAR);
|
int valDataLen = extNameLen * sizeof(TCHAR);
|
||||||
int valType;
|
DWORD valType;
|
||||||
HKEY hKey2Check;
|
HKEY hKey2Check;
|
||||||
extNameActualLen = extNameLen;
|
extNameActualLen = extNameLen;
|
||||||
::RegOpenKeyEx(HKEY_CLASSES_ROOT, extName, 0, KEY_ALL_ACCESS, &hKey2Check);
|
::RegOpenKeyEx(HKEY_CLASSES_ROOT, extName, 0, KEY_ALL_ACCESS, &hKey2Check);
|
||||||
::RegQueryValueEx(hKey2Check, TEXT(""), nullptr, reinterpret_cast<LPDWORD>(&valType), reinterpret_cast<LPBYTE>(valData), reinterpret_cast<LPDWORD>(&valDataLen));
|
::RegQueryValueEx(hKey2Check, TEXT(""), nullptr, &valType, reinterpret_cast<LPBYTE>(valData), reinterpret_cast<LPDWORD>(&valDataLen));
|
||||||
|
|
||||||
if ((valType == REG_SZ) && (!lstrcmp(valData, nppName)))
|
if ((valType == REG_SZ) && (!lstrcmp(valData, nppName)))
|
||||||
::SendDlgItemMessage(_hSelf, IDC_REGEXT_REGISTEREDEXTS_LIST, LB_ADDSTRING, 0, reinterpret_cast<LPARAM>(extName));
|
::SendDlgItemMessage(_hSelf, IDC_REGEXT_REGISTEREDEXTS_LIST, LB_ADDSTRING, 0, reinterpret_cast<LPARAM>(extName));
|
||||||
@ -372,8 +372,8 @@ bool RegExtDlg::deleteExts(const TCHAR *ext2Delete)
|
|||||||
{
|
{
|
||||||
TCHAR valData[extNameLen];
|
TCHAR valData[extNameLen];
|
||||||
int valDataLen = extNameLen*sizeof(TCHAR);
|
int valDataLen = extNameLen*sizeof(TCHAR);
|
||||||
int valType;
|
DWORD valType;
|
||||||
int res = ::RegQueryValueEx(hKey, nppBackup, nullptr, (LPDWORD)&valType, (LPBYTE)valData, (LPDWORD)&valDataLen);
|
int res = ::RegQueryValueEx(hKey, nppBackup, nullptr, &valType, (LPBYTE)valData, (LPDWORD)&valDataLen);
|
||||||
|
|
||||||
if (res == ERROR_SUCCESS)
|
if (res == ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -1804,12 +1804,12 @@ void Notepad_plus::command(int id)
|
|||||||
|
|
||||||
TCHAR valData[MAX_PATH] = {'\0'};
|
TCHAR valData[MAX_PATH] = {'\0'};
|
||||||
int valDataLen = MAX_PATH * sizeof(TCHAR);
|
int valDataLen = MAX_PATH * sizeof(TCHAR);
|
||||||
int valType;
|
DWORD valType;
|
||||||
HKEY hKey2Check = nullptr;
|
HKEY hKey2Check = nullptr;
|
||||||
generic_string appEntry = TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\");
|
generic_string appEntry = TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\");
|
||||||
appEntry += appName;
|
appEntry += appName;
|
||||||
::RegOpenKeyEx(HKEY_LOCAL_MACHINE, appEntry.c_str(), 0, KEY_READ, &hKey2Check);
|
::RegOpenKeyEx(HKEY_LOCAL_MACHINE, appEntry.c_str(), 0, KEY_READ, &hKey2Check);
|
||||||
::RegQueryValueEx(hKey2Check, TEXT(""), nullptr, reinterpret_cast<LPDWORD>(&valType), reinterpret_cast<LPBYTE>(valData), reinterpret_cast<LPDWORD>(&valDataLen));
|
::RegQueryValueEx(hKey2Check, TEXT(""), nullptr, &valType, reinterpret_cast<LPBYTE>(valData), reinterpret_cast<LPDWORD>(&valDataLen));
|
||||||
|
|
||||||
|
|
||||||
generic_string fullCurrentPath = TEXT("\"");
|
generic_string fullCurrentPath = TEXT("\"");
|
||||||
|
Loading…
Reference in New Issue
Block a user