diff options
-rw-r--r-- | plugins/MirLua/Modules/WinAPI/src/winapi.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/MirLua/Modules/WinAPI/src/winapi.cpp b/plugins/MirLua/Modules/WinAPI/src/winapi.cpp index 6039e6a10d..28456f2013 100644 --- a/plugins/MirLua/Modules/WinAPI/src/winapi.cpp +++ b/plugins/MirLua/Modules/WinAPI/src/winapi.cpp @@ -1686,6 +1686,13 @@ static int global_CoUninitialize(lua_State *) return(0);
}
+static int global_GetCurrentProcessId(lua_State *L)
+{
+ DWORD pid = GetCurrentProcessId();
+ lua_pushnumber(L, pid);
+ return 1;
+}
+
static luaM_consts consts[] =
{
{ "TRUE", TRUE },
@@ -1941,6 +1948,7 @@ static luaL_Reg winApi[] = { "Beep", global_Beep },
{ "CoInitialize", global_CoInitialize },
{ "CoUninitialize", global_CoUninitialize },
+ { "GetCurrentProcessId", global_GetCurrentProcessId },
{ NULL, NULL }
};
|