uLib  User mode C/C++ extended API library for Win32 programmers.
UString Class Reference

#include <uLib/StrFunc.h>

Inheritance diagram for UString:

Detailed Description

UString is a UNICODE_STRING class with automatic Ansi conversion.

Programmers can rely on Buffer being NUL terminated, since it is either initialized with a PCWSTR,
or converted/copied into a buffer overallocated to hold a NUL character past the Length specification.

Definition at line 632 of file StrFunc.h.

Public Functions

 UString ()
 
 UString (WCSTR Src)
 
 UString (ACSTR Src)
 
 UString (const UNICODE_STRING &Src)
 
 UString (size_t Len)
 
void Clear ()
 
virtual ~UString ()
 
UStringoperator= (WCSTR Src)
 
UStringoperator= (ACSTR Src)
 
UStringoperator= (const UNICODE_STRING &Src)
 
void Set (WCSTR Src)
 
bool Set (ACSTR Src)
 
bool Set (const UNICODE_STRING &Src)
 
 operator PWSTR ()
 
 operator PCWSTR ()
 
 operator UNICODE_STRING ()
 
 operator PUNICODE_STRING ()
 

Protected Attributes

WORD Flags
 

Constructor & Destructor Documentation

◆ UString() [1/5]

UString::UString ( )

Definition at line 1405 of file StrFunc.cpp.

◆ UString() [2/5]

UString::UString ( WCSTR  Src)

Definition at line 1410 of file StrFunc.cpp.

◆ UString() [3/5]

UString::UString ( ACSTR  Src)

Convert from Ansi string.

Definition at line 1417 of file StrFunc.cpp.

◆ UString() [4/5]

UString::UString ( const UNICODE_STRING &  Src)

Ensure NUL termination.

Definition at line 1424 of file StrFunc.cpp.

◆ UString() [5/5]

UString::UString ( size_t  Len)

Alloc a zero filled Buffer of Len + 1(NUL) WCHARs.

Definition at line 1431 of file StrFunc.cpp.

◆ ~UString()

UString::~UString ( )
virtual

Definition at line 1438 of file StrFunc.cpp.

Member Function Documentation

◆ Clear()

void UString::Clear ( )
inline

Definition at line 648 of file StrFunc.h.

◆ operator=() [1/3]

UString & UString::operator= ( WCSTR  Src)

Definition at line 1501 of file StrFunc.cpp.

◆ operator=() [2/3]

UString & UString::operator= ( ACSTR  Src)

Convert from Ansi string.

Definition at line 1507 of file StrFunc.cpp.

◆ operator=() [3/3]

UString & UString::operator= ( const UNICODE_STRING &  Src)

Ensure NUL termination.

Definition at line 1513 of file StrFunc.cpp.

◆ Set() [1/3]

void UString::Set ( WCSTR  Src)

Definition at line 1443 of file StrFunc.cpp.

◆ Set() [2/3]

bool UString::Set ( ACSTR  Src)

Convert from Ansi string.

Definition at line 1449 of file StrFunc.cpp.

◆ Set() [3/3]

bool UString::Set ( const UNICODE_STRING &  Src)

Ensure NUL termination.

Definition at line 1462 of file StrFunc.cpp.

◆ operator PWSTR()

UString::operator PWSTR ( )
inline

Definition at line 659 of file StrFunc.h.

◆ operator PCWSTR()

UString::operator PCWSTR ( )
inline

Definition at line 660 of file StrFunc.h.

◆ operator UNICODE_STRING()

UString::operator UNICODE_STRING ( )
inline

Shallow copy (points to same Buffer).

Definition at line 661 of file StrFunc.h.

◆ operator PUNICODE_STRING()

UString::operator PUNICODE_STRING ( )
inline

Returns this.

Definition at line 662 of file StrFunc.h.

Member Data Documentation

◆ Flags

WORD UString::Flags
protected

Definition at line 634 of file StrFunc.h.


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