mirror of
https://github.com/reactos/reactos.git
synced 2025-07-28 19:02:29 +00:00
[NTOBJSHEX] Formatting only
This commit is contained in:
parent
4c25af5bd4
commit
ba03ffd645
9 changed files with 404 additions and 390 deletions
|
@ -1,9 +1,8 @@
|
|||
/*
|
||||
* PROJECT: ReactOS shell extensions
|
||||
* LICENSE: GPL - See COPYING in the top level directory
|
||||
* FILE: dll/shellext/ntobjshex/ntobjfolder.cpp
|
||||
* PURPOSE: NT Object Namespace shell extension
|
||||
* PROGRAMMERS: David Quintana <gigaherz@gmail.com>
|
||||
* PROJECT: NT Object Namespace shell extension
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Folder view class placeholder file
|
||||
* COPYRIGHT: Copyright 2015-2017 David Quintana <gigaherz@gmail.com>
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/*
|
||||
* PROJECT: ReactOS shell extensions
|
||||
* LICENSE: GPL - See COPYING in the top level directory
|
||||
* FILE: dll/shellext/ntobjshex/ntobjfolder.h
|
||||
* PURPOSE: NT Object Namespace shell extension
|
||||
* PROGRAMMERS: David Quintana <gigaherz@gmail.com>
|
||||
* PROJECT: NT Object Namespace shell extension
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Folder view class header and implementation
|
||||
* COPYRIGHT: Copyright 2015-2017 David Quintana <gigaherz@gmail.com>
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
extern const GUID CLSID_NtObjectFolder;
|
||||
|
@ -30,8 +30,10 @@ public:
|
|||
*pViewMode = FVM_DETAILS;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
case SFVM_COLUMNCLICK:
|
||||
return S_FALSE;
|
||||
|
||||
case SFVM_BACKGROUNDENUM:
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -699,6 +701,7 @@ public:
|
|||
{
|
||||
case DFM_MERGECONTEXTMENU:
|
||||
return S_OK;
|
||||
|
||||
case DFM_INVOKECOMMAND:
|
||||
case DFM_INVOKECOMMANDEX:
|
||||
case DFM_GETDEFSTATICID: // Required for Windows 7 to pick a default
|
||||
|
|
|
@ -1,19 +1,8 @@
|
|||
/*
|
||||
* Copyright 2004, 2005 Martin Fuchs
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* PROJECT: NT Object Namespace shell extension
|
||||
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
|
||||
* PURPOSE: NT Object Namespace enumeration functions
|
||||
* COPYRIGHT: Copyright 2004-2005 Martin Fuchs <martin-fuchs@gmx.net>
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
|
|
|
@ -1,20 +1,10 @@
|
|||
/*
|
||||
* Copyright 2004 Martin Fuchs
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
* PROJECT: NT Object Namespace shell extension
|
||||
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
|
||||
* PURPOSE: NT Object Namespace enumeration header
|
||||
* COPYRIGHT: Copyright 2004 Martin Fuchs <martin-fuchs@gmx.net>
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
/*
|
||||
* PROJECT: ReactOS shell extensions
|
||||
* LICENSE: GPL - See COPYING in the top level directory
|
||||
* FILE: dll/shellext/ntobjshex/ntobjfolder.cpp
|
||||
* PURPOSE: NT Object Namespace shell extension
|
||||
* PROGRAMMERS: David Quintana <gigaherz@gmail.com>
|
||||
* PROJECT: NT Object Namespace shell extension
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: NT Object Namespace folder class implementation
|
||||
* COPYRIGHT: Copyright 2015-2017 David Quintana <gigaherz@gmail.com>
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
|
@ -68,21 +67,25 @@ HRESULT STDMETHODCALLTYPE CNtObjectFolderExtractIcon::GetIconLocation(
|
|||
*piIndex = -((uFlags & GIL_OPENICON) ? IDI_NTOBJECTDIROPEN : IDI_NTOBJECTDIR);
|
||||
*pwFlags = flags;
|
||||
return S_OK;
|
||||
|
||||
case DEVICE_OBJECT:
|
||||
GetModuleFileNameW(g_hInstance, szIconFile, cchMax);
|
||||
*piIndex = -IDI_NTOBJECTDEVICE;
|
||||
*pwFlags = flags;
|
||||
return S_OK;
|
||||
|
||||
case PORT_OBJECT:
|
||||
GetModuleFileNameW(g_hInstance, szIconFile, cchMax);
|
||||
*piIndex = -IDI_NTOBJECTPORT;
|
||||
*pwFlags = flags;
|
||||
return S_OK;
|
||||
|
||||
case KEY_OBJECT:
|
||||
GetModuleFileNameW(g_hInstance, szIconFile, cchMax);
|
||||
*piIndex = -IDI_REGISTRYKEY;
|
||||
*pwFlags = flags;
|
||||
return S_OK;
|
||||
|
||||
default:
|
||||
GetModuleFileNameW(g_hInstance, szIconFile, cchMax);
|
||||
*piIndex = -IDI_NTOBJECTITEM;
|
||||
|
@ -226,9 +229,11 @@ HRESULT STDMETHODCALLTYPE CNtObjectFolder::GetDefaultColumnState(
|
|||
case NTOBJECT_COLUMN_NAME:
|
||||
*pcsFlags = SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT;
|
||||
return S_OK;
|
||||
|
||||
case NTOBJECT_COLUMN_TYPE:
|
||||
*pcsFlags = SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT;
|
||||
return S_OK;
|
||||
|
||||
case NTOBJECT_COLUMN_LINKTARGET:
|
||||
*pcsFlags = SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT | SHCOLSTATE_SLOW;
|
||||
return S_OK;
|
||||
|
@ -322,11 +327,15 @@ HRESULT STDMETHODCALLTYPE CNtObjectFolder::GetDetailsOf(
|
|||
switch (iColumn)
|
||||
{
|
||||
case NTOBJECT_COLUMN_NAME:
|
||||
{
|
||||
psd->fmt = LVCFMT_LEFT;
|
||||
|
||||
MakeStrRetFromString(info->entryName, info->entryNameLength, &(psd->str));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
case NTOBJECT_COLUMN_TYPE:
|
||||
{
|
||||
psd->fmt = LVCFMT_LEFT;
|
||||
|
||||
if (info->objectType < 0)
|
||||
|
@ -341,6 +350,8 @@ HRESULT STDMETHODCALLTYPE CNtObjectFolder::GetDetailsOf(
|
|||
else
|
||||
MakeStrRetFromString(ObjectTypeNames[info->objectType], &(psd->str));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
case NTOBJECT_COLUMN_LINKTARGET:
|
||||
{
|
||||
psd->fmt = LVCFMT_LEFT;
|
||||
|
@ -376,6 +387,7 @@ HRESULT STDMETHODCALLTYPE CNtObjectFolder::GetDetailsOf(
|
|||
// TODO: Make localizable
|
||||
MakeStrRetFromString(L"Object Name", &(psd->str));
|
||||
return S_OK;
|
||||
|
||||
case NTOBJECT_COLUMN_TYPE:
|
||||
psd->fmt = LVCFMT_LEFT;
|
||||
psd->cxChar = 20;
|
||||
|
@ -383,6 +395,7 @@ HRESULT STDMETHODCALLTYPE CNtObjectFolder::GetDetailsOf(
|
|||
// TODO: Make localizable
|
||||
MakeStrRetFromString(L"Object Type", &(psd->str));
|
||||
return S_OK;
|
||||
|
||||
case NTOBJECT_COLUMN_LINKTARGET:
|
||||
psd->fmt = LVCFMT_LEFT;
|
||||
psd->cxChar = 30;
|
||||
|
@ -407,10 +420,12 @@ HRESULT STDMETHODCALLTYPE CNtObjectFolder::MapColumnToSCID(
|
|||
pscid->fmtid = storage;
|
||||
pscid->pid = PID_STG_NAME;
|
||||
return S_OK;
|
||||
|
||||
case NTOBJECT_COLUMN_TYPE:
|
||||
pscid->fmtid = storage;
|
||||
pscid->pid = PID_STG_STORAGETYPE;
|
||||
return S_OK;
|
||||
|
||||
case NTOBJECT_COLUMN_LINKTARGET:
|
||||
pscid->fmtid = GUID_NtObjectColumns;
|
||||
pscid->pid = NTOBJECT_COLUMN_LINKTARGET;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/*
|
||||
* PROJECT: ReactOS shell extensions
|
||||
* LICENSE: GPL - See COPYING in the top level directory
|
||||
* FILE: dll/shellext/ntobjshex/ntobjfolder.h
|
||||
* PURPOSE: NT Object Namespace shell extension
|
||||
* PROGRAMMERS: David Quintana <gigaherz@gmail.com>
|
||||
* PROJECT: NT Object Namespace shell extension
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: NT Object Namespace folder class header
|
||||
* COPYRIGHT: Copyright 2015-2017 David Quintana <gigaherz@gmail.com>
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
extern const GUID CLSID_NtObjectFolder;
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
/*
|
||||
* PROJECT: ReactOS shell extensions
|
||||
* LICENSE: GPL - See COPYING in the top level directory
|
||||
* FILE: dll/shellext/ntobjshex/ntobjshex.cpp
|
||||
* PURPOSE: NT Object Namespace shell extension
|
||||
* PROGRAMMERS: David Quintana <gigaherz@gmail.com>
|
||||
* PROJECT: NT Object Namespace shell extension
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: Shell extension entry point and exports
|
||||
* COPYRIGHT: Copyright 2015-2017 David Quintana <gigaherz@gmail.com>
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
/*
|
||||
* PROJECT: ReactOS shell extensions
|
||||
* LICENSE: GPL - See COPYING in the top level directory
|
||||
* FILE: dll/shellext/ntobjshex/regfolder.cpp
|
||||
* PURPOSE: NT Object Namespace shell extension
|
||||
* PROGRAMMERS: David Quintana <gigaherz@gmail.com>
|
||||
* PROJECT: NT Object Namespace shell extension
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: System Registry folder class implementation
|
||||
* COPYRIGHT: Copyright 2015-2017 David Quintana <gigaherz@gmail.com>
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
|
@ -70,11 +69,13 @@ HRESULT STDMETHODCALLTYPE CRegistryFolderExtractIcon::GetIconLocation(
|
|||
*piIndex = -IDI_REGISTRYKEY;
|
||||
*pwFlags = flags;
|
||||
return S_OK;
|
||||
|
||||
case REG_ENTRY_VALUE:
|
||||
GetModuleFileNameW(g_hInstance, szIconFile, cchMax);
|
||||
*piIndex = -IDI_REGISTRYVALUE;
|
||||
*pwFlags = flags;
|
||||
return S_OK;
|
||||
|
||||
default:
|
||||
GetModuleFileNameW(g_hInstance, szIconFile, cchMax);
|
||||
*piIndex = -IDI_NTOBJECTITEM;
|
||||
|
@ -163,9 +164,11 @@ HRESULT STDMETHODCALLTYPE CRegistryFolder::GetDefaultColumnState(
|
|||
case REGISTRY_COLUMN_NAME:
|
||||
*pcsFlags = SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT;
|
||||
return S_OK;
|
||||
|
||||
case REGISTRY_COLUMN_TYPE:
|
||||
*pcsFlags = SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT;
|
||||
return S_OK;
|
||||
|
||||
case REGISTRY_COLUMN_VALUE:
|
||||
*pcsFlags = SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT | SHCOLSTATE_SLOW;
|
||||
return S_OK;
|
||||
|
@ -265,6 +268,7 @@ HRESULT STDMETHODCALLTYPE CRegistryFolder::GetDetailsOf(
|
|||
switch (iColumn)
|
||||
{
|
||||
case REGISTRY_COLUMN_NAME:
|
||||
{
|
||||
psd->fmt = LVCFMT_LEFT;
|
||||
|
||||
if (info->entryNameLength > 0)
|
||||
|
@ -272,8 +276,10 @@ HRESULT STDMETHODCALLTYPE CRegistryFolder::GetDetailsOf(
|
|||
return MakeStrRetFromString(info->entryName, info->entryNameLength, &(psd->str));
|
||||
}
|
||||
return MakeStrRetFromString(L"(Default)", &(psd->str));
|
||||
}
|
||||
|
||||
case REGISTRY_COLUMN_TYPE:
|
||||
{
|
||||
psd->fmt = LVCFMT_LEFT;
|
||||
|
||||
if (info->entryType == REG_ENTRY_ROOT)
|
||||
|
@ -294,8 +300,10 @@ HRESULT STDMETHODCALLTYPE CRegistryFolder::GetDetailsOf(
|
|||
}
|
||||
|
||||
return MakeStrRetFromString(RegistryTypeNames[info->entryType], &(psd->str));
|
||||
}
|
||||
|
||||
case REGISTRY_COLUMN_VALUE:
|
||||
{
|
||||
psd->fmt = LVCFMT_LEFT;
|
||||
|
||||
PCWSTR strValueContents;
|
||||
|
@ -316,6 +324,7 @@ HRESULT STDMETHODCALLTYPE CRegistryFolder::GetDetailsOf(
|
|||
return hr;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (iColumn)
|
||||
|
@ -327,6 +336,7 @@ HRESULT STDMETHODCALLTYPE CRegistryFolder::GetDetailsOf(
|
|||
// TODO: Make localizable
|
||||
MakeStrRetFromString(L"Object Name", &(psd->str));
|
||||
return S_OK;
|
||||
|
||||
case REGISTRY_COLUMN_TYPE:
|
||||
psd->fmt = LVCFMT_LEFT;
|
||||
psd->cxChar = 20;
|
||||
|
@ -334,6 +344,7 @@ HRESULT STDMETHODCALLTYPE CRegistryFolder::GetDetailsOf(
|
|||
// TODO: Make localizable
|
||||
MakeStrRetFromString(L"Content Type", &(psd->str));
|
||||
return S_OK;
|
||||
|
||||
case REGISTRY_COLUMN_VALUE:
|
||||
psd->fmt = LVCFMT_LEFT;
|
||||
psd->cxChar = 20;
|
||||
|
@ -358,10 +369,12 @@ HRESULT STDMETHODCALLTYPE CRegistryFolder::MapColumnToSCID(
|
|||
pscid->fmtid = storage;
|
||||
pscid->pid = PID_STG_NAME;
|
||||
return S_OK;
|
||||
|
||||
case REGISTRY_COLUMN_TYPE:
|
||||
pscid->fmtid = storage;
|
||||
pscid->pid = PID_STG_STORAGETYPE;
|
||||
return S_OK;
|
||||
|
||||
case REGISTRY_COLUMN_VALUE:
|
||||
pscid->fmtid = storage;
|
||||
pscid->pid = PID_STG_CONTENTS;
|
||||
|
@ -457,6 +470,7 @@ HRESULT CRegistryFolder::FormatValueData(DWORD contentType, PVOID td, DWORD cont
|
|||
*strContents = strValue;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
case REG_SZ:
|
||||
case REG_EXPAND_SZ:
|
||||
{
|
||||
|
@ -465,6 +479,7 @@ HRESULT CRegistryFolder::FormatValueData(DWORD contentType, PVOID td, DWORD cont
|
|||
*strContents = strValue;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
case REG_MULTI_SZ:
|
||||
{
|
||||
PCWSTR separator = L" "; // To match regedit
|
||||
|
@ -499,6 +514,7 @@ HRESULT CRegistryFolder::FormatValueData(DWORD contentType, PVOID td, DWORD cont
|
|||
*strContents = strValue;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
case REG_DWORD:
|
||||
{
|
||||
DWORD bufferLength = 64 * sizeof(WCHAR);
|
||||
|
@ -508,6 +524,7 @@ HRESULT CRegistryFolder::FormatValueData(DWORD contentType, PVOID td, DWORD cont
|
|||
*strContents = strValue;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
case REG_QWORD:
|
||||
{
|
||||
DWORD bufferLength = 64 * sizeof(WCHAR);
|
||||
|
@ -517,6 +534,7 @@ HRESULT CRegistryFolder::FormatValueData(DWORD contentType, PVOID td, DWORD cont
|
|||
*strContents = strValue;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
case REG_BINARY:
|
||||
{
|
||||
DWORD bufferLength = (contentsLength * 3 + 1) * sizeof(WCHAR);
|
||||
|
@ -532,6 +550,7 @@ HRESULT CRegistryFolder::FormatValueData(DWORD contentType, PVOID td, DWORD cont
|
|||
*strContents = strValue;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
PCWSTR strFormat = L"<Unimplemented value type %d>";
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/*
|
||||
* PROJECT: ReactOS shell extensions
|
||||
* LICENSE: GPL - See COPYING in the top level directory
|
||||
* FILE: dll/shellext/ntobjshex/regfolder.h
|
||||
* PURPOSE: NT Object Namespace shell extension
|
||||
* PROGRAMMERS: David Quintana <gigaherz@gmail.com>
|
||||
* PROJECT: NT Object Namespace shell extension
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: System Registry folder class header
|
||||
* COPYRIGHT: Copyright 2015-2017 David Quintana <gigaherz@gmail.com>
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
extern const GUID CLSID_RegistryFolder;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue