Files
mir_server/sdk/system/PathThreadLocale.h
aixianling 5c9f1dae4a init
2025-01-09 17:45:40 +08:00

16 lines
665 B
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
/************************************************************************
线程locale自动设置的功能库
由于libc中的setlocale的设定是仅影响当前线程的但每次创建线程均手动设置比较麻烦
无法再更底层的库中进行通用化管理,因此提供一套代码补丁,按需在工程中进行设置。
通过向CreateThread函数打代码补丁从而实现对创建线程函数的Hook并在创建线程后立刻为
线程设置locale以及mbcp。
************************************************************************/
int InstallThreadLocalePath(const char *lc);