From 02f6da6423c057f4fc4f2c60aa4bd1ce79418015 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Sun, 24 Jan 2016 09:02:27 +0000 Subject: Mirlua: GetCurrentProcessId winapi function git-svn-id: http://svn.miranda-ng.org/main/trunk@16161 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/Modules/WinAPI/src/winapi.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'plugins/MirLua/Modules') 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 } }; -- cgit v1.2.3