Questions tagged [handle]

Handle is an abstraction of a resource or a reference to an entity. It can have different implementations: a pointer, an index in a table etc.

1348 questions
174
votes
7 answers

What is a Windows Handle?

What is a "Handle" when discussing resources in Windows? How do they work?
Al C
  • 5,175
  • 6
  • 44
  • 74
130
votes
6 answers

Finding the handle to a WPF window

Windows forms had a property win1.Handle which, if I recall, returns the handle of the main window handle? Is there an equivalent way to get the handle of a WPF Window? I found the following code online, IntPtr windowHandle = new…
Evan
  • 4,450
  • 10
  • 40
  • 58
115
votes
8 answers

What is a handle in C++?

I have been told that a handle is sort of a pointer, but not, and that it allows you to keep a reference to an object, rather than the object itself. What is a more elaborate explanation?
Xenoprimate
  • 7,691
  • 15
  • 58
  • 95
35
votes
1 answer

Jquery UI sortable, button is not working as handle

I am trying to sort tr's in a table. code $("table tbody").sortable({ handle: 'button' //handle: 'img' }).disableSelection(); live fiddle now the problem is when using img as handle its working fine but when using button as handle its not…
Uttara
  • 2,496
  • 3
  • 24
  • 35
33
votes
3 answers

What is the range of a Windows HANDLE on a 64 bits application?

On WinAPI, the HANDLE type is defined as a void*, thus on a 64 bit application the HANDLE value may range from 0 to 18446744073709551615. But is that true in practice? Does any documentation specify the integral range of such a HANDLE? If for…
Denilson Amorim
  • 9,642
  • 6
  • 27
  • 31
32
votes
4 answers

What is the difference between: Handle, Pointer and Reference

How does a handle differ from a pointer to an object and also why can't we have a reference to a reference?
quantum231
  • 2,420
  • 3
  • 31
  • 53
32
votes
8 answers

Under which circumstances does the System process (PID 4) retain an open file handle?

My application running on a Windows server makes use of a Jet/Access database. For some reasons around every two weeks that database file gets locked by the System process (PID 4, seems to be fixed) After some googling I found some other users…
Daniel Rikowski
  • 71,375
  • 57
  • 251
  • 329
27
votes
7 answers

How to find that Mutex in C# is acquired?

How can I find from mutex handle in C# that a mutex is acquired? When mutex.WaitOne(timeout) timeouts, it returns false. However, how can I find that from the mutex handle? (Maybe using p/invoke.) UPDATE: public class InterProcessLock :…
TN.
  • 18,874
  • 30
  • 99
  • 157
26
votes
16 answers

pointer vs handles in C (are the terms used to convey separate things?)

Recently, I read a white paper by an individual who refers to a pointer to a struct as a handle. The author was clearly someone who had written C code on the windows platform previously. Googling indicates that windows programmers interact with…
Setjmp
  • 27,279
  • 27
  • 74
  • 92
26
votes
4 answers

how to properly reuse a curl handle

I want to properly reuse a curl handle, so that it won't give me errors and function normally. Suppose I have this piece of code: CURL *curl; curl_global_init(CURL_GLOBAL_ALL); curl = curl_easy_init(); curl_easy_setopt(curl,…
user1494517
  • 311
  • 1
  • 3
  • 11
26
votes
6 answers

How do I retrieve a specific product in Shopify Liquid?

I have a list of product handles, and I want to fetch the product based on this handle. It seems there is no way to tell Liquid to go and get a single product. I could do this with the API, but if I use the API then I have to use JavaScript, and I…
jayshields
  • 395
  • 1
  • 3
  • 9
25
votes
3 answers

How to handle a webview confirm dialog?

I'm displaying a webpage in a WebView and on the webpage, there is a button. When you click the button, a confirmation dialog is supposed to popup, but it doesn't show in my WebView. It does popup if I go to the same webpage in the android…
brockoli
  • 4,516
  • 7
  • 38
  • 45
24
votes
4 answers

Register to be default app for custom file type

Register to be able to open files of custom type. Say i have .cool files, and if the user tries to open it, Android asks if they would like to open it with my application. How?
Aymon Fournier
  • 4,323
  • 12
  • 42
  • 59
23
votes
1 answer

How can I tell if a given hWnd is still valid?

I'm using a third-party class that spawns an instance of Internet Explorer. This class has a property, hWnd, that returns the hWnd of the process. Later on down the line, I may want to reuse the instance of the application if it still exists, so I…
Ian P
  • 12,840
  • 6
  • 48
  • 70
22
votes
3 answers

What is a "handle"?

Possible Duplicates: What is a Windows Handle? What exactly is “handle” ? I see references to window handles, controls which have a reference to a window handle, etc. But I don't know what a handle is. I especially would like to know what it is,…
richard
  • 12,263
  • 23
  • 95
  • 151
1
2 3
89 90