Mercurial > hg > CbC > CbC_gcc
diff gcc/ada/libgnat/s-tsmona__mingw.adb @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
line wrap: on
line diff
--- a/gcc/ada/libgnat/s-tsmona__mingw.adb Fri Oct 27 22:46:09 2017 +0900 +++ b/gcc/ada/libgnat/s-tsmona__mingw.adb Thu Oct 25 07:37:49 2018 +0900 @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2012-2017, AdaCore -- +-- Copyright (C) 2012-2018, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -50,15 +50,20 @@ -- Get -- --------- - function Get (Addr : access System.Address) return String is + function Get (Addr : System.Address; + Load_Addr : access System.Address) + return String + is Res : DWORD; hModule : aliased HANDLE; Path : String (1 .. 1_024); begin + Load_Addr.all := System.Null_Address; + if GetModuleHandleEx (GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, - Addr.all, + Addr, hModule'Access) = Win32.TRUE then Res := GetModuleFileName (hModule, Path'Address, Path'Length);