diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2016-01-24 09:02:27 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2016-01-24 09:02:27 +0000 |
commit | 02f6da6423c057f4fc4f2c60aa4bd1ce79418015 (patch) | |
tree | 38fd8928155d5b839af5ed1e38576b5f6392e7fe | |
parent | 4d1349db1c91c1cb9ca6e3e984081ab0b1195757 (diff) |
Mirlua: GetCurrentProcessId winapi function
git-svn-id: http://svn.miranda-ng.org/main/trunk@16161 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-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 }
};
|