ReactOS  0.4.15-dev-499-g1f31905
BtrfsIconOverlay Class Reference

#include <iconoverlay.h>

Inheritance diagram for BtrfsIconOverlay:
Collaboration diagram for BtrfsIconOverlay:

Public Member Functions

 BtrfsIconOverlay ()
 
virtual ~BtrfsIconOverlay ()
 
HRESULT __stdcall QueryInterface (REFIID riid, void **ppObj)
 
ULONG __stdcall AddRef ()
 
ULONG __stdcall Release ()
 
virtual HRESULT __stdcall GetOverlayInfo (PWSTR pwszIconFile, int cchMax, int *pIndex, DWORD *pdwFlags)
 
virtual HRESULT __stdcall GetPriority (int *pPriority)
 
virtual HRESULT __stdcall IsMemberOf (PCWSTR pwszPath, DWORD dwAttrib)
 

Private Attributes

LONG refcount
 

Detailed Description

Definition at line 24 of file iconoverlay.h.

Constructor & Destructor Documentation

◆ BtrfsIconOverlay()

BtrfsIconOverlay::BtrfsIconOverlay ( )
inline

Definition at line 26 of file iconoverlay.h.

26  {
27  refcount = 0;
29  }
LONG objs_loaded
Definition: main.cpp:48
#define InterlockedIncrement
Definition: armddk.h:53

◆ ~BtrfsIconOverlay()

virtual BtrfsIconOverlay::~BtrfsIconOverlay ( )
inlinevirtual

Definition at line 31 of file iconoverlay.h.

31  {
33  }
LONG objs_loaded
Definition: main.cpp:48
#define InterlockedDecrement
Definition: armddk.h:52

Member Function Documentation

◆ AddRef()

ULONG __stdcall BtrfsIconOverlay::AddRef ( void  )
inline

Definition at line 39 of file iconoverlay.h.

39  {
41  }
#define InterlockedIncrement
Definition: armddk.h:53

Referenced by QueryInterface().

◆ GetOverlayInfo()

HRESULT __stdcall BtrfsIconOverlay::GetOverlayInfo ( PWSTR  pwszIconFile,
int  cchMax,
int pIndex,
DWORD pdwFlags 
)
virtual

Definition at line 46 of file iconoverlay.cpp.

46  {
47  if (GetModuleFileNameW(module, pwszIconFile, cchMax) == 0)
48  return E_FAIL;
49 
51  return E_FAIL;
52 
53  if (!pIndex)
54  return E_INVALIDARG;
55 
56  if (!pdwFlags)
57  return E_INVALIDARG;
58 
59  *pIndex = 0;
60  *pdwFlags = ISIOI_ICONFILE | ISIOI_ICONINDEX;
61 
62  return S_OK;
63 }
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:600
#define ISIOI_ICONFILE
Definition: shlobj.h:2523
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define E_FAIL
Definition: ddrawi.h:102
#define E_INVALIDARG
Definition: ddrawi.h:101
UINT cchMax
#define S_OK
Definition: intsafe.h:59
_Out_ PULONG _Out_ PULONG pIndex
Definition: ndis.h:4564
#define ISIOI_ICONINDEX
Definition: shlobj.h:2524
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10

◆ GetPriority()

HRESULT __stdcall BtrfsIconOverlay::GetPriority ( int pPriority)
virtual

Definition at line 65 of file iconoverlay.cpp.

65  {
66  if (!pPriority)
67  return E_INVALIDARG;
68 
69  *pPriority = 0;
70 
71  return S_OK;
72 }
#define E_INVALIDARG
Definition: ddrawi.h:101
#define S_OK
Definition: intsafe.h:59

◆ IsMemberOf()

HRESULT __stdcall BtrfsIconOverlay::IsMemberOf ( PCWSTR  pwszPath,
DWORD  dwAttrib 
)
virtual

Definition at line 74 of file iconoverlay.cpp.

74  {
75  win_handle h;
78  btrfs_get_file_ids bgfi;
79 
81 
82  if (h == INVALID_HANDLE_VALUE)
83  return S_FALSE;
84 
85  Status = NtFsControlFile(h, nullptr, nullptr, nullptr, &iosb, FSCTL_BTRFS_GET_FILE_IDS, nullptr, 0, &bgfi, sizeof(btrfs_get_file_ids));
86 
87  if (!NT_SUCCESS(Status))
88  return S_FALSE;
89 
90  return (bgfi.inode == 0x100 && !bgfi.top) ? S_OK : S_FALSE;
91 }
static PIO_STATUS_BLOCK iosb
Definition: file.c:98
LONG NTSTATUS
Definition: precomp.h:26
#define INVALID_HANDLE_VALUE
Definition: compat.h:400
NTSYSCALLAPI NTSTATUS NTAPI NtFsControlFile(HANDLE FileHandle, HANDLE Event, PIO_APC_ROUTINE ApcRoutine, PVOID ApcContext, PIO_STATUS_BLOCK IoStatusBlock, ULONG FsControlCode, PVOID InputBuffer, ULONG InputBufferLength, PVOID OutputBuffer, ULONG OutputBufferLength)
#define FILE_SHARE_WRITE
Definition: nt_native.h:681
#define FILE_SHARE_READ
Definition: compat.h:125
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
#define S_FALSE
Definition: winerror.h:2357
#define OPEN_EXISTING
Definition: compat.h:435
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define FILE_SHARE_DELETE
Definition: nt_native.h:682
#define FSCTL_BTRFS_GET_FILE_IDS
Definition: btrfsioctl.h:7
Status
Definition: gdiplustypes.h:24
#define S_OK
Definition: intsafe.h:59
#define CreateFileW
Definition: compat.h:409
#define FILE_FLAG_BACKUP_SEMANTICS
Definition: disk.h:41
#define FILE_FLAG_OPEN_REPARSE_POINT
Definition: disk.h:39

◆ QueryInterface()

HRESULT __stdcall BtrfsIconOverlay::QueryInterface ( REFIID  riid,
void **  ppObj 
)

Definition at line 35 of file iconoverlay.cpp.

35  {
36  if (riid == IID_IUnknown || riid == IID_IShellIconOverlayIdentifier) {
37  *ppObj = static_cast<IShellIconOverlayIdentifier*>(this);
38  AddRef();
39  return S_OK;
40  }
41 
42  *ppObj = nullptr;
43  return E_NOINTERFACE;
44 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
ULONG __stdcall AddRef()
Definition: iconoverlay.h:39

Referenced by Factory::CreateInstance().

◆ Release()

ULONG __stdcall BtrfsIconOverlay::Release ( void  )
inline

Definition at line 43 of file iconoverlay.h.

43  {
45 
46  if (rc == 0)
47  delete this;
48 
49  return rc;
50  }
long LONG
Definition: pedump.c:60
#define InterlockedDecrement
Definition: armddk.h:52

Member Data Documentation

◆ refcount

LONG BtrfsIconOverlay::refcount
private

Definition at line 59 of file iconoverlay.h.

Referenced by AddRef(), BtrfsIconOverlay(), and Release().


The documentation for this class was generated from the following files: