ReactOS 0.4.16-dev-820-g96aa1ee
CZZWStr Class Reference

Public Member Functions

 ~CZZWStr ()
 
 CZZWStr ()
 
 CZZWStr (const CZZWStr &)=delete
 
CZZWStroperator= (const CZZWStr &)=delete
 
bool Initialize (LPCWSTR Str)
 
LPWSTR c_str ()
 

Private Attributes

LPWSTR m_sz
 

Detailed Description

Definition at line 16 of file recyclebin_v5.cpp.

Constructor & Destructor Documentation

◆ ~CZZWStr()

CZZWStr::~CZZWStr ( )
inline

Definition at line 21 of file recyclebin_v5.cpp.

21{ SHFree(m_sz); }
LPWSTR m_sz
void WINAPI SHFree(LPVOID pv)
Definition: shellole.c:326

◆ CZZWStr() [1/2]

CZZWStr::CZZWStr ( )
inline

Definition at line 22 of file recyclebin_v5.cpp.

22: m_sz(NULL) {}
#define NULL
Definition: types.h:112

◆ CZZWStr() [2/2]

CZZWStr::CZZWStr ( const CZZWStr )
delete

Member Function Documentation

◆ c_str()

LPWSTR CZZWStr::c_str ( )
inline

Definition at line 36 of file recyclebin_v5.cpp.

36{ return m_sz; }

Referenced by SHELL_SingleFileOperation().

◆ Initialize()

bool CZZWStr::Initialize ( LPCWSTR  Str)
inline

Definition at line 26 of file recyclebin_v5.cpp.

27 {
28 SIZE_T cch = wcslen(Str) + 1;
29 m_sz = (LPWSTR)SHAlloc((cch + 1) * sizeof(*Str));
30 if (!m_sz)
31 return false;
32 CopyMemory(m_sz, Str, cch * sizeof(*Str));
33 m_sz[cch] = UNICODE_NULL; // Double-null terminate
34 return true;
35 }
LPVOID WINAPI SHAlloc(SIZE_T len)
Definition: shellole.c:304
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
static DWORD DWORD void LPSTR DWORD cch
Definition: str.c:202
#define UNICODE_NULL
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define CopyMemory
Definition: winbase.h:1735
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by SHELL_SingleFileOperation().

◆ operator=()

CZZWStr & CZZWStr::operator= ( const CZZWStr )
delete

Member Data Documentation

◆ m_sz

LPWSTR CZZWStr::m_sz
private

Definition at line 18 of file recyclebin_v5.cpp.

Referenced by c_str(), Initialize(), and ~CZZWStr().


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