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

#include <cKernel.h>

Inheritance diagram for GrayKernel::CKeStringAS:

Public Member Functions

void InitStr ()
 
void InitStatic (const char *pStr)
 
void InitBuffer (char *pBuffer, USHORT uMaximumLength)
 
bool IsValidStr () const
 
 operator PCHAR ()
 
NTSTATUS ToInteger (ULONG &uValue, ULONG nBase=10) const
 
NTSTATUS FromUnicode (PUNICODE_STRING pStr, bool bAlloc=false)
 
NTSTATUS AppendStr (const char *pStr, USHORT uLenStr)
 
NTSTATUS AppendStr (const ANSI_STRING &str)
 
NTSTATUS AppendStr (const char *pStr)
 
NTSTATUS AppendStr (const WCHAR *pStr, USHORT uLenStr)
 
NTSTATUS AppendStr (const WCHAR *pStr)
 
void FreeSys ()
 

Detailed Description

PCHAR based (ANSI/ASCII) string. MaximumLength = length in bytes/chars. (includes space for '\0')

Member Function Documentation

◆ AppendStr() [1/5]

NTSTATUS GrayKernel::CKeStringAS::AppendStr ( const ANSI_STRING &  str)
inline

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

◆ AppendStr() [2/5]

NTSTATUS GrayKernel::CKeStringAS::AppendStr ( const char *  pStr)
inline

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

◆ AppendStr() [3/5]

NTSTATUS GrayKernel::CKeStringAS::AppendStr ( const char *  pStr,
USHORT  uLenStr 
)
inline

◆ AppendStr() [4/5]

NTSTATUS GrayKernel::CKeStringAS::AppendStr ( const WCHAR *  pStr)
inline

◆ AppendStr() [5/5]

NTSTATUS GrayKernel::CKeStringAS::AppendStr ( const WCHAR *  pStr,
USHORT  uLenStr 
)
inline

Append Unicode string to the ANSI string. uLenStr = bytes use RtlUnicodeStringToAnsiString() ?

◆ FreeSys()

void GrayKernel::CKeStringAS::FreeSys ( )
inline

◆ FromUnicode()

NTSTATUS GrayKernel::CKeStringAS::FromUnicode ( PUNICODE_STRING  pStr,
bool  bAlloc = false 
)
inline

Set this from a Unicode string.

◆ InitBuffer()

void GrayKernel::CKeStringAS::InitBuffer ( char *  pBuffer,
USHORT  uMaximumLength 
)
inline

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

◆ InitStatic()

void GrayKernel::CKeStringAS::InitStatic ( const char *  pStr)
inline
Note
This will fill in the Length field. like strlen()

◆ InitStr()

void GrayKernel::CKeStringAS::InitStr ( )
inline

◆ IsValidStr()

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

◆ operator PCHAR()

GrayKernel::CKeStringAS::operator PCHAR ( )
inline

◆ ToInteger()

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

get uValue from the string.


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