handle

How to get the handles of all open App Designer apps (uifigures)?

↘锁芯ラ 提交于 2019-12-11 12:03:47
问题 As mentioned in a related answer, it is possible to get the handles of all open figures using: hFigs = findall(groot, 'Type', 'figure'); but this results in a list that contains both "old" figure and "new" uifigure handles. How can I separate hFigs into two lists, one containing only figure and the other only uifigure references? 回答1: To distinguish between figure and uifigure objects programatically, we can use a slight adaptation of what I suggested here: function tf = isUIFigure(hFigList)

Save axes handle when plotting In MATLAB

一世执手 提交于 2019-12-11 11:57:30
问题 I have script handling figures so that I can print and input them in a latex document with scale = 1 and everything looks nice. In this context I want to save the figure, axes and legend handles. Is there a way to save them like when using fig = figure . I know two 'hacks' 1) nfig = nfig+1; fig = figure(nfig); plot() ax = gca leg = legend() 2) nfig = nfig+1; fig = figure(nfig); ax = subplot(1,1,1) plot() leg = legend() My script function fig_set(fig,ax,leg,width,heigth,font_size) %% fig_set

C# get parent process from window handle

家住魔仙堡 提交于 2019-12-11 10:37:12
问题 I have a C# windows application and ultimately launches a dialog from an interop component. The problem is that this dialog window sometimes appears behind the c# application's main window, forcing a user to alt-tab to find it. I've put measures into place to find this dialog window and bring it forward... private static extern bool SetForegroundWindow(IntPtr hWnd); public class SearchData { public string Wndclass; public string Title; public IntPtr hWnd; } private static extern bool

Way of getting control handle from TMessage

冷暖自知 提交于 2019-12-11 07:27:14
问题 Is there anyway to get the control handle or other information with i can indentify a control having only TMessage variable? Question is Delphi related. the thing im doing is that im hooking several controls wndproc with one function and i need to find what control message is that. code: unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, VirtualTrees, XML.VerySimple, Vcl.StdCtrls,

Make jQuery-ui draggable handle cover entire page

帅比萌擦擦* 提交于 2019-12-11 07:02:28
问题 What would be the best way to make an element draggable when clicking anywhere in the window? Would I have to use a container <div> that covers the whole window? I tried making the body draggable but that didn't work. The problem with using a container <div> is that it moves and therefore doesn't cover the whole of the screen any more after it has been dragged. What about making a really vast container <div> that spans a large number of pixels in every direction so you would never get to the

WinAPI: OpenProcess() returns error 5 with SeDebugPrivilege enabled for host process

ぐ巨炮叔叔 提交于 2019-12-11 06:54:03
问题 I've got a routine where I process-walk to obtain the HANDLE of each process as I 'walk' down the list (which works fine), but my issue lies when I do: HANDLE h = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pe32.th32ProcessID) where PROCESS_ALL_ACCESS is the access token, handle inheritance is set to FALSE , and pe32 is a PROCESSENTRY32 GetLastError() returns error code 5, and all the handles that are made are addresses which do not correspond to any appropriate process in Spy++32/64 (I've tried

Find Out If Two HANDLEs are Hardlinks to the Same File

别说谁变了你拦得住时间么 提交于 2019-12-11 05:44:56
问题 (This question is a toughie... it might require knowledge of NTFS and/or the use of NT Native APIs; be warned.) :) If I'm given two HANDLE s to two files, how can I definitively (not just with high probability) find out if the two HANDLE s belong to the exact same file and stream on the disk? This means, for example, checking the 8-byte NTFS file IDs isn't enough, because two HANDLE s with the same file ID can be pointing to different data streams of the same file, and I need to find out if

C# Get list of handles, AcessViolationException

时光怂恿深爱的人放手 提交于 2019-12-11 02:37:46
问题 Info: .Net 4.5 Tested on: Win7 64 bit Win10 64 bit (Virtual Box) I am trying to get a list of handles of an external process and return their names as string so I can close a specific one afterwards. Therefore i wrote this function using the Win32API which will check if the handle is the handle i want to close: ` const int CNST_SYSTEM_HANDLE_INFORMATION = 16; const uint STATUS_INFO_LENGTH_MISMATCH = 0xc0000004; public static string getObjectTypeName(Win32API.SYSTEM_HANDLE_INFORMATION shHandle

How to obtain a subset of functions from a function handle that is a vector of functions in Matlab

做~自己de王妃 提交于 2019-12-10 17:14:48
问题 In Matlab, I have a function handle defined as a vector like this F = @(x) [... coeff1*x(1)*x(4); ... coeff2*x(3); ... coeff3*x(7)*x(3) ... ]; In reality it has 150 rows. I need to extract different subsets the functions in the rows. For example make a new handle from the rows 3:17 of those in F . But I can't just go indexing a handle. Is there a solution? Edit: I need the subset as a new handle, in other words I can not evaluate the entire F and just select the solution rows. Thanks in

Is there a way to automatically close certain handles on a fork()?

懵懂的女人 提交于 2019-12-10 16:29:59
问题 Background: I've got a large existing process (it happens to be on AIX, so basically POSIX semantics) that's part of an even larger system. The existing processes are designed to run continuously. A new requirement for this process is to handle a new kind of complex input stream. In order to reduce risk, I've decided to fork/exec a child process to do the actual input processing, which isolates the existing main process from problems such as crashes or hangs on malformed input data. The child