And use explicit StringCbCopyW().
- StringCbCopyW(path, _countof(path), m_NtPath);
+ StringCbCopyW(path, sizeof(path), m_NtPath);
PathAppendW(path, info->entryName);
LPITEMIDLIST first = ILCloneFirst(pidl);
PathAppendW(path, info->entryName);
LPITEMIDLIST first = ILCloneFirst(pidl);
{
m_shellPidl = ILClone(pidl);
{
m_shellPidl = ILClone(pidl);
- StringCbCopy(m_NtPath, _countof(m_NtPath), L"\\");
+ StringCbCopyW(m_NtPath, sizeof(m_NtPath), L"\\");
if (link.Buffer[1] == L':' && isalphaW(link.Buffer[0]))
{
if (link.Buffer[1] == L':' && isalphaW(link.Buffer[0]))
{
- StringCbCopyNW(path, _countof(path), link.Buffer, link.Length);
+ StringCbCopyNW(path, sizeof(path), link.Buffer, link.Length);
CComPtr<IShellFolder> psfDesktop;
hr = SHGetDesktopFolder(&psfDesktop);
CComPtr<IShellFolder> psfDesktop;
hr = SHGetDesktopFolder(&psfDesktop);
return psfDesktop->ParseDisplayName(NULL, NULL, path, NULL, fullPidl, NULL);
}
return psfDesktop->ParseDisplayName(NULL, NULL, path, NULL, fullPidl, NULL);
}
- StringCbCopyW(path, _countof(path), L"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{845B0FB2-66E0-416B-8F91-314E23F7C12D}");
+ StringCbCopyW(path, sizeof(path), L"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{845B0FB2-66E0-416B-8F91-314E23F7C12D}");
PathAppend(path, link.Buffer);
CComPtr<IShellFolder> psfDesktop;
PathAppend(path, link.Buffer);
CComPtr<IShellFolder> psfDesktop;
{
m_shellPidl = ILClone(pidl);
{
m_shellPidl = ILClone(pidl);
- StringCbCopy(m_NtPath, _countof(m_NtPath), L"\\");
+ StringCbCopyW(m_NtPath, sizeof(m_NtPath), L"\\");
{
m_shellPidl = ILClone(pidl);
{
m_shellPidl = ILClone(pidl);
- StringCbCopy(m_NtPath, _countof(m_NtPath), ntPath);
+ StringCbCopyW(m_NtPath, sizeof(m_NtPath), ntPath);
m_shellPidl = ILClone(pidl);
m_hRoot = NULL;
m_shellPidl = ILClone(pidl);
m_hRoot = NULL;
- StringCbCopy(m_NtPath, _countof(m_NtPath), L"");
+ StringCbCopyW(m_NtPath, sizeof(m_NtPath), L"");
m_shellPidl = ILClone(pidl);
m_hRoot = hRoot;
m_shellPidl = ILClone(pidl);
m_hRoot = hRoot;
- StringCbCopy(m_NtPath, _countof(m_NtPath), ntPath);
+ StringCbCopyW(m_NtPath, sizeof(m_NtPath), ntPath);