diff options
| author | Saikari <[email protected]> | 2026-02-05 22:48:58 +0300 |
|---|---|---|
| committer | Saikari <[email protected]> | 2026-02-05 22:48:58 +0300 |
| commit | bb7879934dca1ef7b26584f4dfadc29462d5a059 (patch) | |
| tree | 3cdb88086027d96f6d3e12dea0038ae361709df4 /core | |
| parent | 728ead07ff58cd9d8330075414cfe21b1034b757 (diff) | |
create policy besides pe parser
Diffstat (limited to 'core')
| -rw-r--r-- | core/src/xmake/engine.c | 2 | ||||
| -rw-r--r-- | core/src/xmake/winos/set_error_mode.c | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/core/src/xmake/engine.c b/core/src/xmake/engine.c index 9c02d8487..ccd77e7e5 100644 --- a/core/src/xmake/engine.c +++ b/core/src/xmake/engine.c @@ -279,6 +279,7 @@ tb_int_t xm_winos_registry_keys(lua_State *lua); tb_int_t xm_winos_registry_values(lua_State *lua); tb_int_t xm_winos_short_path(lua_State *lua); tb_int_t xm_winos_processes(lua_State* lua); +tb_int_t xm_winos_set_error_mode(lua_State *lua); #endif // the utf8 functions @@ -485,6 +486,7 @@ static luaL_Reg const g_winos_functions[] = { { "registry_values", xm_winos_registry_values }, { "short_path", xm_winos_short_path }, { "processes", xm_winos_processes }, + { "seterrormode", xm_winos_set_error_mode }, { tb_null, tb_null }, }; #endif diff --git a/core/src/xmake/winos/set_error_mode.c b/core/src/xmake/winos/set_error_mode.c new file mode 100644 index 000000000..43131d2e2 --- /dev/null +++ b/core/src/xmake/winos/set_error_mode.c @@ -0,0 +1,7 @@ +#include "prefix.h" + +tb_int_t xm_winos_set_error_mode(lua_State *lua) { + tb_size_t mode = (tb_size_t)luaL_checkinteger(lua, 1); + lua_pushinteger(lua, (tb_int_t)SetErrorMode((UINT)mode)); + return 1; +} |
