internals

Difference between taskkill and taskkill /f

我与影子孤独终老i 提交于 2019-12-10 03:45:21
问题 On Microsoft Technet I can read that taskkill has a /f parameter to kill a process forcefully. I wonder what this does internally, to understand the impact of such an action. taskkill (without /f ) does not simply send a WM_CLOSE message to the process, otherwise my application would ask whether or not to save the open documents. This makes me assume that it already operates on a TerminateProcess (MSDN) level. However, TerminateProcess does not have a parameter for forcing a kill. So, what do

How does windows console subsystem work?

帅比萌擦擦* 提交于 2019-12-10 00:32:52
问题 So how does console subsystem work ? I understand high level stuff such as windows automatically creates console window for programs and then gives handle to console window to which you can write and read with WriteConsole and ReadConsole, but how does window itself work ? does windows use GDI to draw characters into console ? or some hidden internal functions ? what happens behind the curtains ? 回答1: This question is too vague to really answer in a detailed fashion but I'll give it a shot.

Stack and Stack Base Address

血红的双手。 提交于 2019-12-09 23:18:01
问题 In the MEMORY_BASIC_INFORMATION structure one finds two PVOID variables, called BaseAddress and AllocationBase respectively. I'm reading a book on Threading and its going over how to get the stackspace left on the stack in quite some detail, however there's something I'm not sure I understand correctly. The BaseAddress in the structure mentioned above, does it point to the highest address in the current thread stack or the lowest address? Since the stack grows downwards, the lowest would be

Want to know Windows Clipboard Internals

♀尐吖头ヾ 提交于 2019-12-09 18:36:03
问题 I am interested in learning windows system internals and how things work. I am inclined towards learning system programming on windows. With that context, I am curious to know few things on how windows clipboard internally functions: What precisely happens when we select some text, image etc and press Ctrl + C ? What precisely happens when we we press Ctrl + V in different application? Where exactly the copied data resides? Does the copied data go into kernel mode memory - that is shared

What are the inner workings of the Selenium waitFor mechanism?

二次信任 提交于 2019-12-09 16:37:40
问题 I am trying to customize the behavior of Selenium's click command, (via user-extentions.js), by intercepting calls to doClick(locator). Basically I need to delay click actions whenever our application's "busy indicator" is being displayed. (Now the standard answer for this kind of thing is to insert a waitFor into the script for those situations. Indeed, we currently have zillions of them throughout our scripts. I'm trying to eliminate those.) Detecting the page element is the trivial part.

List All Open Files

早过忘川 提交于 2019-12-09 11:04:56
问题 This is an add-on to another question found here. In short: I would like to list all of the open files on a system and retrieve their associated file names . If this is the wrong approach, or if there's another way, please give me a push in the right direction. Or, if I'm missing any details or something's unclear, please yell at me. Like the other question (linked above), I don't care about language (a C or C++ solution wouldn't hurt though), but I'd like for this to work on Windows XP. Also

How does scanf() work inside the OS?

谁都会走 提交于 2019-12-09 05:42:34
问题 I've been wondering how scanf()/printf() actually works in the hardware and OS levels. Where does the data flow and what exactly is the OS doing around these times? What calls does the OS make? And so on... 回答1: scanf() and printf() are functions in libc (the C standard library), and they call the read() and write() operating system syscalls respectively, talking to the file descriptors stdin and stdout respectively (fscanf and fprintf allow you to specify the file stream you want to read

How to store key-value pairs in a file that will be stored in internal memory in Android?

ε祈祈猫儿з 提交于 2019-12-08 04:32:06
问题 I have some information that needs to be stored in internal memory. I will like to store in the form of key-value pairs the way its done in SharedPreferences. I was thinking of creating JsonObject and saving and retrieving in that way. Is there any other way that we can save the data in internal memory in the form of key-value pairs? 回答1: Th standard java way of storing Object data is to use Serialization - that is what it is there for. In Most cases implementing Serializable is fairly

How SqlDataAdapter works internally?

一个人想着一个人 提交于 2019-12-07 09:36:48
问题 I wonder how SqlDataAdapter works internally, especially when using UpdateCommand for updating a huge DataTable (since it's usually a lot faster that just sending sql statements from a loop). Here is some idea I have in mind : It creates a prepared sql statement (using SqlCommand.Prepare() ) with CommandText filled and sql parameters initialized with correct sql types. Then, it loops on datarows that need to be updated, and for each record, it updates parameters values, and call SqlCommand

canEqual() in the scala.Equals trait

送分小仙女□ 提交于 2019-12-06 18:41:04
问题 From the source code scala/Equals.scala (here): package scala trait Equals extends scala.Any { def canEqual(that: scala.Any): scala.Boolean def equals(that: scala.Any): scala.Boolean } In the documentation, it says: A method that should be called from every well-designed equals method that is open to be overridden in a subclass. I randomly picked a class which extends scala.Equals and which is simple enough to understand. I picked scala.Tuple2[+T1, +T2] , which extends the trait scala.Product