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.

1261 questions
162
votes
7 answers

What is a Windows Handle?

What is a "Handle" when discussing resources in Windows? How do they work?
Al C
  • 4,551
  • 5
  • 35
  • 63
120
votes
4 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,250
  • 10
  • 37
  • 58
101
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
  • 6,942
  • 15
  • 51
  • 89
32
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,406
  • 2
  • 21
  • 35
28
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
  • 8,082
  • 5
  • 22
  • 31
28
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
  • 66,219
  • 52
  • 237
  • 318
24
votes
2 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,376
  • 6
  • 34
  • 45
24
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
  • 375
  • 1
  • 2
  • 8
24
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
  • 1,927
  • 3
  • 24
  • 45
23
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.
  • 17,602
  • 25
  • 84
  • 141
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,298
  • 6
  • 42
  • 68
23
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
  • 23,834
  • 23
  • 67
  • 90
23
votes
3 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
  • 281
  • 1
  • 2
  • 10
21
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
  • 10,572
  • 20
  • 83
  • 144
21
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,063
  • 12
  • 37
  • 57
1
2 3
84 85