Questions tagged [handles]

175 questions
2
votes
1 answer

How can I append to a text file?

I have a program written in C++ which accepts text from a user and saves it to a text file using file handles. Here are snippets of the program: The program works fine. The only problem with it is that it does not append the text to the text file.…
Matthew
  • 4,477
  • 21
  • 70
  • 93
2
votes
3 answers

Is auto_handle still the suggested method for determanistic disposal of handles?

A colleague of mine came across an article on codeproject over the weekend which describes the use of the auto_handle method. Given that the article was written in 2006, is that still the right way to handle deterministic disposal for things like…
Jon Cage
  • 36,366
  • 38
  • 137
  • 215
1
vote
2 answers

Check Value of .NET Handle ^

Here's my situation: I have .NET wrapper-objects in a C++/CLI layer that hold pointers to unmanaged C++ objects. I've implemented the finalizer so that it deletes the unmanaged memory pointed to by the wrapper-object on garbage-collection and sets…
Ian
  • 4,169
  • 3
  • 37
  • 62
1
vote
2 answers

Handle declarations

Can anyone tell me what the difference is between these 2 lines of code, which one is better to use? System::String ^MyStr = gcnew System::String(MyStr); System::String ^MyStr;
Gary
  • 318
  • 3
  • 14
1
vote
0 answers

Pywin32 - how to access the data that a "data handle" refers to

I'm trying to gather information about some child windows in a Windows application (written in Visual Studio using C++). I'm using pywinauto and pywin32. In a very small python script, I thought I would get good information using…
mired
  • 51
  • 1
  • 1
  • 4
1
vote
1 answer

How to tell if a specific app is open and retrieve its window handle?

How can we detect that an app is opened and get a handle to its app object? Before, with figure, it was practical to use some findobj on the figure 'Tag'. Then, we could check if it exists or not, and retrieve the content of the figure. But I didn't…
1
vote
1 answer

Which Win32 user-mode handles can be shared among processes?

I've been trying to better understand WinAPIs and the underlying Windows kernel. From what I see so far, HWND (window) handles can be shared among processes. But what about other handles, can they be shared among processes? HMODULE, HINSTANCE,…
MikeF
  • 1,021
  • 9
  • 29
1
vote
1 answer

MATLAB GUI: how to update handles when new objects are created in a subfunction?

I have a problem with my MATLAB GUI. I am not using GUIDE so I am self coding everything for my GUI. I have a Main which generates the a first panel of the GUIDE. This panel contains a button which can create other 2 panels through its related…
fma
  • 219
  • 2
  • 14
1
vote
0 answers

Workaround for java thread handle leak

I was wondering if anyone knows of a workaround to the handle leaks caused by creating and sleeping threads in java, see JDK-8154063. I was thinking that maybe you could close open handles related to a finished thread manually using the jna kernel32…
Snipzwolf
  • 533
  • 1
  • 8
  • 22
1
vote
2 answers

In MATLAB's GUIDE, is guidata(hObject) the same as guidata(handles.output)?

When using GUIDE, in a callback function such as function checkbox_Callback(hObject, eventdata, handles) will guidata(hObject) and guidata(handles.output) return the same struct? Similarly, will guidata(hObject,…
John
  • 59
  • 1
  • 5
1
vote
0 answers

How can I use function handles correctly to plug new values into previous equations?

Im having trouble plugging in values from array s0 into three equations from a previous script(myLorenz). The new s0 values are suppose to be plugged into the S(1), S(2), and S(3) spots in the equations. However Im getting an error message stating…
kal
  • 37
  • 2
  • 14
1
vote
1 answer

Purpose of guihandles in programmatic Matlab GUI design

I'm working on a fairly complex (for me) GUI in Matlab, made programmatically without GUIDE. The different but similar ways to organize GUI objects confuse me. Please tell me where my understanding is incorrect, and if they're actually different at…
skyrmion
  • 11
  • 1
1
vote
2 answers

Highstock navigator handles options do not work

I need some help for the handles in the navigator of highstock. My set options do not work in my example: http://jsfiddle.net/q1xpn6hL/ Please take a look at line 5 to 9: borderColor: '#666', width: 10, height: 35, borderRadius: 2, borderWidth:…
paddibr
  • 77
  • 1
  • 9
1
vote
1 answer

Getting information about handles from hang analysis

I have the following results of !analyze -hang -v on a dump file I have. I see that thread 0 is waiting for some handle to be released, as specified in derived_wait_chain. How can I get more information about this handle? !handle 784.183c returns an…
user884248
  • 2,134
  • 3
  • 32
  • 57
1
vote
2 answers

Windows handle if a control is set to visible = false (.NET)

Quick question, do controls in .NET have handles (hWnd) if they are set to invisible? Marlon
Marlon
  • 2,129
  • 3
  • 21
  • 40