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

#include <cKernel.h>

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

Public Member Functions

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 ()
 

Detailed Description

static string. (has no constructor/destructor) MaximumLength = length in bytes. (includes space for '\0')

Member Function Documentation

◆ AppendInteger()

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

◆ AppendStr() [1/3]

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

Append the string for as much room as we have. then fail STATUS_BUFFER_TOO_SMALL

◆ AppendStr() [2/3]

void GrayKernel::CKeStringUS::AppendStr ( NTSTATUS &  lStatus,
PCWSTR  pwSource 
)
inline

Append the string for as much room as we have. then fail STATUS_BUFFER_TOO_SMALL

◆ AppendStr() [3/3]

NTSTATUS GrayKernel::CKeStringUS::AppendStr ( PCWSTR  pwSource)
inline

Append the string for as much room as we have. then fail STATUS_BUFFER_TOO_SMALL

◆ CompareStr()

COMPARE_t GrayKernel::CKeStringUS::CompareStr ( const UNICODE_STRING &  rString2,
BOOLEAN  bCaseInSensitive = false 
) const
inline

◆ DetachStr()

PWSTR GrayKernel::CKeStringUS::DetachStr ( )
inline

Detach from the string. could leak.

◆ FreeSys()

void GrayKernel::CKeStringUS::FreeSys ( )
inline

◆ FromAnsi()

NTSTATUS GrayKernel::CKeStringUS::FromAnsi ( PANSI_STRING  pStr,
bool  bAlloc = false 
)
inline

Set this from a ANSI string.

◆ FromInt64()

NTSTATUS GrayKernel::CKeStringUS::FromInt64 ( IN ULONGLONG  Value,
IN ULONG  nBase = 10 
)
inline

◆ FromInteger()

NTSTATUS GrayKernel::CKeStringUS::FromInteger ( IN ULONG  uValue,
IN ULONG  uBase = 10 
)
inline

◆ InitBuffer()

void GrayKernel::CKeStringUS::InitBuffer ( PWSTR  pBuffer,
USHORT  uMaximumLength 
)
inline

uMaximumLength = bytes = sizeof(*pBuffer); // includes space for trailing null

◆ InitBufferZ()

void GrayKernel::CKeStringUS::InitBufferZ ( PWSTR  pBuffer,
USHORT  uMaximumLength 
)
inline

zero the buffer first.

◆ InitStatic() [1/2]

void GrayKernel::CKeStringUS::InitStatic ( const WCHAR *  pStr)
inline

Detaches any existing Buffer! could leak in CKeStringU case.

Note
This will fill in the Length field. like wcslen()

◆ InitStatic() [2/2]

void GrayKernel::CKeStringUS::InitStatic ( const WCHAR *  pStr,
USHORT  wLength 
)
inline

wLength = string length not including the null.

◆ InitStr()

void GrayKernel::CKeStringUS::InitStr ( )
inline

Detaches any existing Buffer! could leak in CKeStringU case.

◆ IsValidStr()

bool GrayKernel::CKeStringUS::IsValidStr ( ) const
inline

◆ operator PCWSTR()

GrayKernel::CKeStringUS::operator PCWSTR ( ) const
inline

◆ operator PWSTR()

GrayKernel::CKeStringUS::operator PWSTR ( )
inline

◆ ToInteger()

NTSTATUS GrayKernel::CKeStringUS::ToInteger ( ULONG &  uValue,
ULONG  nBase = 10 
) const
inline

Get a ULONG from this string.

◆ UpcaseString()

void GrayKernel::CKeStringUS::UpcaseString ( )
inline

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