mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
[explorer_new]
use strsafe functions svn path=/trunk/; revision=61712
This commit is contained in:
parent
d0a842e852
commit
93b5f39fd8
3 changed files with 15 additions and 7 deletions
|
@ -220,12 +220,14 @@ GetExplorerRegValueSet(IN HKEY hKey,
|
|||
DWORD dwType, dwSize;
|
||||
BOOL Ret = FALSE;
|
||||
|
||||
_tcscpy(szBuffer,
|
||||
StringCbCopy(szBuffer, sizeof(szBuffer),
|
||||
TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer"));
|
||||
_tcscat(szBuffer,
|
||||
_T("\\"));
|
||||
_tcscat(szBuffer,
|
||||
lpSubKey);
|
||||
if (FAILED(StringCbCat(szBuffer, sizeof(szBuffer),
|
||||
_T("\\"))))
|
||||
return FALSE;
|
||||
if (FAILED(StringCbCat(szBuffer, sizeof(szBuffer),
|
||||
lpSubKey)))
|
||||
return FALSE;
|
||||
|
||||
dwSize = sizeof(szBuffer);
|
||||
if (RegOpenKeyEx(hKey,
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <shlwapi.h>
|
||||
#include <shlguid_undoc.h>
|
||||
#include <uxtheme.h>
|
||||
#include <strsafe.h>
|
||||
|
||||
#include "tmschema.h"
|
||||
#include "resource.h"
|
||||
|
|
|
@ -99,8 +99,13 @@ typedef struct
|
|||
BOOL LaunchCPanel(HWND hwnd, LPCTSTR applet)
|
||||
{
|
||||
TCHAR szParams[MAX_PATH];
|
||||
_tcscpy(szParams, TEXT("shell32.dll,Control_RunDLL "));
|
||||
_tcscat(szParams, applet);
|
||||
|
||||
StringCbCopy(szParams, sizeof(szParams),
|
||||
TEXT("shell32.dll,Control_RunDLL "));
|
||||
if (FAILED(StringCbCat(szParams, sizeof(szParams),
|
||||
applet)))
|
||||
return FALSE;
|
||||
|
||||
return (ShellExecute(hwnd, TEXT("open"), TEXT("rundll32.exe"), szParams, NULL, SW_SHOWDEFAULT) > (HINSTANCE)32);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue