internals

What is the most esoteric internal feature you have found or read about?

For me it is the security cookie created for each process to prevent buffer-overflow attacks. Tracking its creation with a debugger, it's created by xoring the Thread ID, the Process ID, the PerformanceCount the TickCount and more... And then if by any chance the most word is zero, then the least word is copied into it... ...

Windows CE internals, TEB (Thread Environment Block)

Hello everybody, I'm not sure if it's a good place to ask such a question. I'm trying to port some low level library (dbghelp) to wince and I need access to some api that aren't available on wince. I need to access TEB (Thread Environment Block). There are a couple of API's available on PC that do that, but there is no such thing on WinC...

Create a process from a driver

Hi All! Is there a way to create a user-mode process from kernel-mode on Windows NT platform (XP-W7)? EDIT: I must install only the driver. This is a specific of the project. ...

How to know when \Registry\Machine\Software key is loaded?

I want to access \Registry\Machine\Software key from a driver. The driver is loaded prior to the registry key. Do I have to poll the key availability? Or there is something I can wait for? ...

SQL Server 2008 File Write Behaviors

Sort of a 101 question: with multiple files in a user defined filegroup, what is SQL Servers behavior when inserting rows? Round robin? Write until full and move on to the next? I have found some interesting posts regarding tempDb on this subject that suggest round robin, but nothing conclusive. ...

Redirect ConfigurationManager to Another File

I am looking to redirect the standard .Net ConfigurationManager class to another file; entirely. The path is determined at runtime so I can't use configSource or such (this is not a duplicate question - I have looked at the others). I am essentially trying to duplicate what ASP.Net is doing behind the covers. Thus not only my classes sh...

What's a pushlock?

Pushlocks are used internally by windows as synchronization primitives for some of its operations, specifically as part of the memory manager. What exactly is a pushlock? How is it different from a spinlock? ...

Alignment along 4-byte boundaries

I recently got thinking about alignment... It's something that we don't ordinarily have to consider, but I've realized that some processors require objects to be aligned along 4-byte boundaries. What exactly does this mean, and which specific systems have alignment requirements? Suppose I have an arbitrary pointer: unsigned char* ptr...

Accessing a pointer in an object's internal structure

I'm using the pyOpenSSL interface to the OpenSSL library but it is missing some functions I need and I can't or don't want to modify it to support these methods (for various reasons). So what I want to achieve, is to retrieve the OpenSSL object pointer. After that, I will be able to call the missing functions through ctypes. What is the...

What is INT 21h?

Inspired by this question http://stackoverflow.com/questions/1237489/how-can-i-force-gdb-to-disassemble I wondered about the INT 21h as a concept. Now, I have some very rusty knowledge of the internals, but not so many details. I remember that in C64 you had regular Interrupts and Non Maskable Interrupts, but my knowledge stops here. C...

How does a syscall actually happen on linux?

Inspired by this question http://stackoverflow.com/questions/1237489/how-can-i-force-gdb-to-disassemble and related to this one http://stackoverflow.com/questions/1245809/what-is-int-21h How does an actually system call happen under linux? what happens when the call is performed, until the actual kernel routine is invoked ? ...

How does scanf() work inside the OS?

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... ...

Oracle: How are sequences implemented?

To meet some odd business requirements, I'm going to have to implement my own sequence-like counters. I'm going to make a first cut of this in the obvious way, but I would like to understand a bit more about how Oracle implements sequences. For example, can they use latches instead of locks? I've been unable to find much about this on...

Where did the text segment get its name?

Traditional assembler, and higher level compilers work with several memory segments, according to intended use. Hence, there is a data segment, a stack segment, a bss, and text segment. The text segment is also called the code segment. Text segment? For machine code? I have asked all the old-timers I could find, how something as unr...

Best book to learn MFC internals

Hi All, Which book you suggest by which any bit experienced MFC programmer can learn much dipper, about internal design or architecture and structures and how the whole things works. If anyone knows any book or online reference... Thanks, Bhavesh Bagadiya ...

Limitations to modifying rt.jar

What are the limitations when modifying classes in rt.jar. I realize this is generally specific to the version and vendor of the JRE. I've found that Hotspot in the Sun 1.6 VM, for instance, doesn't like if you add fields to java.lang.Object as it has hard-coded assumptions about the size of Object. However, if I modify significant po...

Does the Order By clause recalculate the value in SQL Server?

When I use a calculation or a subquery in my ORDER clause which is already in my SELECT clause, does SQL know to just order by that column? Or does it recalculate everything for each row when sorting? For instance, lets say I'm writing a terrible query like this: SELECT EmployeeName, (SELECT COUNT(*) FROM Employee e2 WHERE MgrID = Empl...

Does Events Handlers in JavaScript for one event fired as FIFO, LIFO or in parallel?

Does Events Handlers in JavaScript for one event fired as FIFO, LIFO or in parallel? ...

What is "AllInternalsVisible" parameter of assembly:InternalsVisibleTo attribute?

Hi, My intellisense is coming up with a boolean named parameter "AllInternalsVisible=" in an [assembly:InternalsVisibleTo("AssemblyName")] declaration. Just position the cursor after the second double-quote and hit Ctrl-space. What is that - I cannot find any documentation on MSDN about that. I am using VS2005 and .Net 2.0. As a ...

how does linq2sql keep track of database objects?

Hi, When using Linq2sql everything automagically works. My experience is that going with the flow is not always the best solution and to understand how something internally works is better so you use the technique optimally. So, my question is about linq2sql. If I do a query and get some database objects, or I create a new one, someho...