201 {
202
203 if (exepath == nilptr) {
204
205 if (rtlp.rtl_osid == 0) {
206 if (false == Win32Api.Psapi32.load()) {
207 return nilptr;
208 }
209
210 long handle =
open();
211
212 if (handle > 0) {
213 byte [] path = new byte[Win32Api.Kernel32.MAX_PATH];
214 int [] pl = new int[1];
215 long [] hm = new long[1];
216
217 pl[0] = Win32Api.Kernel32.MAX_PATH;
218 int up = 0;
219
220 if (Win32Api.Psapi32.EnumProcessModules(handle, hm, 8, up)) {
221 int len = Win32Api.Psapi32.GetModuleFileNameExA(handle, hm[0], path, Win32Api.Kernel32.MAX_PATH);
222
223 if (len > 0) {
224 try {
227
228 }
229 }
230 }
231
233 }
234 }
235 }
236
238 }
void closeHandle(long handle)