Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayKernel::CKeStringU Struct Reference

#include <cKernel.h>

Inheritance diagram for GrayKernel::CKeStringU:
GrayKernel::CKeStringUS

Public Member Functions

 CKeStringU ()
 
 CKeStringU (PCWSTR pStr)
 
 ~CKeStringU ()
 
void FreeString ()
 
NTSTATUS AppendStr (PCWSTR pStr, USHORT nLengthStr)
 
NTSTATUS AppendStr (PCWSTR pStr)
 
NTSTATUS AppendStr (const UNICODE_STRING &str)
 
void AppendStr (NTSTATUS &lStatus, PCWSTR pStr)
 
void AppendStr (NTSTATUS &lStatus, PCWSTR pStr, USHORT nLengthStr)
 
void AppendStr (NTSTATUS &lStatus, const UNICODE_STRING &str)
 
NTSTATUS AppendInteger (ULONG uValue, ULONG uBase=10)
 
void AppendInteger (NTSTATUS &lStatus, ULONG uValue, ULONG uBase=10)
 
NTSTATUS CreateStr (PCWSTR pStr, USHORT nLengthStr)
 
NTSTATUS CreateStr (const UNICODE_STRING &str)
 
NTSTATUS CreateStr (PCWSTR pStr)
 
- Public Member Functions inherited from GrayKernel::CKeStringUS
void UpcaseString ()
 
void InitStr ()
 
void InitStatic (const WCHAR *pStr, USHORT wLength)
 
void InitStatic (const WCHAR *pStr)
 
void InitBuffer (PWSTR pBuffer, USHORT uMaximumLength)
 
void InitBufferZ (PWSTR pBuffer, USHORT uMaximumLength)
 
bool IsValidStr () const
 
 operator PCWSTR () const
 
 operator PWSTR ()
 
PWSTR DetachStr ()
 
COMPARE_t CompareStr (const UNICODE_STRING &rString2, BOOLEAN bCaseInSensitive=false) const
 
NTSTATUS FromInteger (IN ULONG uValue, IN ULONG uBase=10)
 
NTSTATUS ToInteger (ULONG &uValue, ULONG nBase=10) const
 
NTSTATUS FromInt64 (IN ULONGLONG Value, IN ULONG nBase=10)
 
NTSTATUS FromAnsi (PANSI_STRING pStr, bool bAlloc=false)
 
NTSTATUS AppendStr (const UNICODE_STRING &str)
 
NTSTATUS AppendStr (PCWSTR pwSource)
 
void AppendStr (NTSTATUS &lStatus, PCWSTR pwSource)
 
NTSTATUS AppendInteger (ULONG uValue, ULONG uBase=10)
 
void FreeSys ()
 

Static Public Attributes

static const ULONG CKeStringU_TAG = 'KStU'
 

Protected Member Functions

void FreeStringLast ()
 

Detailed Description

Dynamically allocated UNICODE string. UNICODE_STRING = { Length, MaximumLength, Buffer } Similar to ANSI_STRING,_CSTRING MaximumLength = length in bytes. (includes space for '\0')

Constructor & Destructor Documentation

◆ CKeStringU() [1/2]

GrayKernel::CKeStringU::CKeStringU ( )
inline

◆ CKeStringU() [2/2]

GrayKernel::CKeStringU::CKeStringU ( PCWSTR  pStr)
inline

◆ ~CKeStringU()

GrayKernel::CKeStringU::~CKeStringU ( )
inline

Member Function Documentation

◆ AppendInteger() [1/2]

void GrayKernel::CKeStringU::AppendInteger ( NTSTATUS &  lStatus,
ULONG  uValue,
ULONG  uBase = 10 
)
inline

◆ AppendInteger() [2/2]

NTSTATUS GrayKernel::CKeStringU::AppendInteger ( ULONG  uValue,
ULONG  uBase = 10 
)
inline

◆ AppendStr() [1/6]

NTSTATUS GrayKernel::CKeStringU::AppendStr ( const UNICODE_STRING &  str)
inline

◆ AppendStr() [2/6]

void GrayKernel::CKeStringU::AppendStr ( NTSTATUS &  lStatus,
const UNICODE_STRING &  str 
)
inline

◆ AppendStr() [3/6]

void GrayKernel::CKeStringU::AppendStr ( NTSTATUS &  lStatus,
PCWSTR  pStr 
)
inline

◆ AppendStr() [4/6]

void GrayKernel::CKeStringU::AppendStr ( NTSTATUS &  lStatus,
PCWSTR  pStr,
USHORT  nLengthStr 
)
inline

◆ AppendStr() [5/6]

NTSTATUS GrayKernel::CKeStringU::AppendStr ( PCWSTR  pStr)
inline

◆ AppendStr() [6/6]

NTSTATUS GrayKernel::CKeStringU::AppendStr ( PCWSTR  pStr,
USHORT  nLengthStr 
)
inline

nLengthStr = pre-computed length of the string in bytes.

◆ CreateStr() [1/3]

NTSTATUS GrayKernel::CKeStringU::CreateStr ( const UNICODE_STRING &  str)
inline

◆ CreateStr() [2/3]

NTSTATUS GrayKernel::CKeStringU::CreateStr ( PCWSTR  pStr)
inline

Detaches any existing string! could leak.

◆ CreateStr() [3/3]

NTSTATUS GrayKernel::CKeStringU::CreateStr ( PCWSTR  pStr,
USHORT  nLengthStr 
)
inline
Note
pStr is copied. ASSUME Buffer is un-initialized. don't need to call InitStr()

◆ FreeString()

void GrayKernel::CKeStringU::FreeString ( )
inline

◆ FreeStringLast()

void GrayKernel::CKeStringU::FreeStringLast ( )
inlineprotected

Member Data Documentation

◆ CKeStringU_TAG

const ULONG GrayKernel::CKeStringU::CKeStringU_TAG = 'KStU'
static

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