RLib  5.7
RLib - an opensource, lightweight and multi-platform framework for cpp programming
System::AppBase Class Reference

表示当前程序的基础类 More...

Classes

struct  SystemInformation
 系统信息结构 More...
 

Static Public Member Functions

static HANDLE GetCurrentProcess ()
 获取当前进程句柄 More...
 
static DWORD GetCurrentProcessId ()
 获取当前进程ID More...
 
static HANDLE GetCurrentThread ()
 获取执行线程句柄 More...
 
static DWORD GetCurrentThreadId ()
 获取执行线程ID More...
 
static SystemInformationGetSystemInfo ()
 获取系统信息, 不保证方法的线程安全性 More...
 
static RLIB_RESTRICT_RETURN void * Allocate (intptr_t size RLIB_INTERNAL_DEBUG_PARAM)
 在全局共享内存池上分配内存 More...
 
static RLIB_RESTRICT_RETURN void * Reallocate (void *p, intptr_t size)
 在全局共享内存池上重新分配内存 More...
 
static void Collect (void *)
 回收全局共享内存池上分配的内存 More...
 
static IO::MemoryPoolGetUsingPool ()
 返回全局共享内存池指针 More...
 
static bool IsDebuggerPresent ()
 指示当前进程是否为调试状态 More...
 
static LPCWSTR GetAbsolutePath ()
 获取可执行文件的绝对地址, Unicode Only More...
 
static unsigned short LengthOfAbsolutePath ()
 获取 GetAbsolutePath() 返回字符串的长度 More...
 
static LPCWSTR GetCurrentPath ()
 获取系统环境中当前目录的值, Unicode Only More...
 
static unsigned short LengthOfCurrentPath ()
 获取 GetCurrentPath() 返回字符串的长度 More...
 
static LPCWSTR GetProcessCommandLine ()
 获取可执行文件的启动命令, Unicode Only More...
 
static unsigned short LengthOfProcessCommandLine ()
 获取 GetProcessCommandLine() 返回字符串的长度 More...
 
static LPCTSTR GetStartupPath ()
 获取可执行文件的路径,不包括可执行文件的名称 More...
 
static intptr_t LengthOfStartupPath ()
 获取可执行文件的路径长度,不包括可执行文件的名称 More...
 
static LPCTSTR GetImageFileName ()
 获取可执行文件的名称 More...
 
static intptr_t LengthOfImageFileName ()
 获取可执行文件的名称 More...
 
static void * GetImageBaseAddress ()
 获取映像基址 More...
 
static void * GetPEBAddress ()
 获取PEB结构指针 More...
 
static RLIB_NO_RETURN void Exit (DWORD code=0)
 退出当前进程 More...
 
static RLIB_NO_RETURN void ExitThread (DWORD code=0)
 退出当前线程并释放线程内存 More...
 
static RLIB_NO_RETURN void RtlExitThread (DWORD code=0)
 退出当前线程并释放线程内存 More...
 
static bool GenerateCrashDump (PEXCEPTION_POINTERS exceptionInfo)
 生成异常转储文件 More...
 
static LPCTSTR CaptureStack (LPTSTR buffer, uintptr_t count, LPCTSTR prefix=nullptr)
 捕获栈信息 More...
 
static PVOID AddExceptionHandler (ULONG firstHandler, LONG(NTAPI *exceptionHandler)(PEXCEPTION_POINTERS exceptionInfo))
 注册异常回调 More...
 
static void EnableCrashDump ()
 当程序异常时自动生成异常转储文件 More...
 
static bool IsFatalException (PEXCEPTION_POINTERS exceptionInfo)
 判断是否为致命性异常 More...
 
static void PrintException (PEXCEPTION_POINTERS exceptionInfo)
 以对话框形式展示异常信息, 仅 DEBUG 模式有效 More...
 
static int GetEnvironmentVersion ()
 获取当前 RLib 版本号 More...
 
static LPCTSTR GetBuildTimestamp ()
 获取当前 RLib 编译时间戳 More...
 

Detailed Description

表示当前程序的基础类

Member Function Documentation

PVOID AppBase::AddExceptionHandler ( ULONG  firstHandler,
LONG(NTAPI *exceptionHandler)(PEXCEPTION_POINTERS exceptionInfo)   
)
static

注册异常回调

RLIB_RESTRICT_RETURN LPVOID AppBase::Allocate ( intptr_t size  RLIB_INTERNAL_DEBUG_PARAM)
static

在全局共享内存池上分配内存

LPCTSTR AppBase::CaptureStack ( LPTSTR  buffer,
uintptr_t  count,
LPCTSTR  prefix = nullptr 
)
static

捕获栈信息

void AppBase::Collect ( void *  )
static

回收全局共享内存池上分配的内存

void AppBase::EnableCrashDump ( )
static

当程序异常时自动生成异常转储文件

void AppBase::Exit ( DWORD  code = 0)
static

退出当前进程

void AppBase::ExitThread ( DWORD  code = 0)
static

退出当前线程并释放线程内存

bool AppBase::GenerateCrashDump ( PEXCEPTION_POINTERS  exceptionInfo)
static

生成异常转储文件

LPCWSTR AppBase::GetAbsolutePath ( )
static

获取可执行文件的绝对地址, Unicode Only

LPCTSTR AppBase::GetBuildTimestamp ( )
static

获取当前 RLib 编译时间戳

LPCWSTR AppBase::GetCurrentPath ( )
static

获取系统环境中当前目录的值, Unicode Only

static HANDLE System::AppBase::GetCurrentProcess ( )
inlinestatic

获取当前进程句柄

DWORD AppBase::GetCurrentProcessId ( )
static

获取当前进程ID

static HANDLE System::AppBase::GetCurrentThread ( )
inlinestatic

获取执行线程句柄

DWORD AppBase::GetCurrentThreadId ( )
static

获取执行线程ID

int AppBase::GetEnvironmentVersion ( )
static

获取当前 RLib 版本号

LPVOID AppBase::GetImageBaseAddress ( )
static

获取映像基址

LPCTSTR AppBase::GetImageFileName ( )
static

获取可执行文件的名称

void * AppBase::GetPEBAddress ( )
static

获取PEB结构指针

LPCWSTR AppBase::GetProcessCommandLine ( )
static

获取可执行文件的启动命令, Unicode Only

LPCTSTR AppBase::GetStartupPath ( )
static

获取可执行文件的路径,不包括可执行文件的名称

AppBase::SystemInformation * AppBase::GetSystemInfo ( )
static

获取系统信息, 不保证方法的线程安全性

MemoryPool * AppBase::GetUsingPool ( )
static

返回全局共享内存池指针

bool AppBase::IsDebuggerPresent ( )
static

指示当前进程是否为调试状态

bool AppBase::IsFatalException ( PEXCEPTION_POINTERS  exceptionInfo)
static

判断是否为致命性异常

unsigned short AppBase::LengthOfAbsolutePath ( )
static

获取 GetAbsolutePath() 返回字符串的长度

unsigned short AppBase::LengthOfCurrentPath ( )
static

获取 GetCurrentPath() 返回字符串的长度

intptr_t AppBase::LengthOfImageFileName ( )
static

获取可执行文件的名称

unsigned short AppBase::LengthOfProcessCommandLine ( )
static

获取 GetProcessCommandLine() 返回字符串的长度

intptr_t AppBase::LengthOfStartupPath ( )
static

获取可执行文件的路径长度,不包括可执行文件的名称

void AppBase::PrintException ( PEXCEPTION_POINTERS  exceptionInfo)
static

以对话框形式展示异常信息, 仅 DEBUG 模式有效

RLIB_RESTRICT_RETURN LPVOID AppBase::Reallocate ( void *  p,
intptr_t  size 
)
static

在全局共享内存池上重新分配内存

void AppBase::RtlExitThread ( DWORD  code = 0)
static

退出当前线程并释放线程内存


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