[CONTROL]

- Use strsafe functions. CID 515200

svn path=/trunk/; revision=73699
This commit is contained in:
Kamil Hornicek 2017-02-05 10:28:42 +00:00
parent 82fdf83109
commit 4b762458f9

View file

@ -15,6 +15,7 @@
#include <winuser.h>
#include <winreg.h>
#include <shellapi.h>
#include <strsafe.h>
#include "resource.h"
@ -41,8 +42,8 @@ OpenShellFolder(LPWSTR lpFolderCLSID)
* Open a shell folder using "explorer.exe". The passed CLSIDs
* are all subfolders of the "Control Panel" shell folder.
*/
wcscpy(szParameters, L"/n,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}");
wcscat(szParameters, lpFolderCLSID);
StringCbCopy(szParameters, sizeof(szParameters), L"/n,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}");
StringCbCat(szParameters,sizeof(szParameters), lpFolderCLSID);
return (INT_PTR)ShellExecuteW(NULL,
L"open",