Windows Internals
Windows Internals
Does anyone know any good books about windows internals?
I'm actually looking for a book that has information about all the api calls, system calls, and the way exes are loaded. Both of these can be found on the internet, although I just cant find any information about how windows actually loads exes, I know the "jmp" side of things (just jmp to addressofentrypoint) but Im looking for more details, the PE format doc by microsoft has no information about this.
I'm actually looking for a book that has information about all the api calls, system calls, and the way exes are loaded. Both of these can be found on the internet, although I just cant find any information about how windows actually loads exes, I know the "jmp" side of things (just jmp to addressofentrypoint) but Im looking for more details, the PE format doc by microsoft has no information about this.
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: Windows Internals
It's CALL, not JMP that passes control to an application. Applications are normal procedure calls (think of main() if you will -- it returns just like any other function and even has a return value). You will find everyting about the Windows API here. As of for the book on Windows internals, the obvious choice is Windows Internals, 5th ed., Microsoft Press.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
- JankoSixta
- Posts: 5
- Joined: Mon Jan 26, 2009 11:30 pm
Re: Windows Internals
When searching the Ralf Brown's interrupt list I found this...
http://www.ctyme.com/intr/rb-4249.htm
Sadly they don't point out which parameters exactly we must specify.
http://www.ctyme.com/intr/rb-4249.htm
Sadly they don't point out which parameters exactly we must specify.
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: Windows Internals
Even if it would, I wouldn't recommend using those. The whole purpose of using library calls instead of actual system calls is that system calls get deprecated, changed and so on. A system call that's there in one version of Windows might not be the same or might not be there at all in the next. Library calls work around this using whatever system calls are present and provide backward and forward compatibility.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
Re: Windows Internals
look at reactos and wine.
http://www.reactos.org/en/index.html
http://www.winehq.org/
That's about as close as you're going to be able to get.
http://www.reactos.org/en/index.html
http://www.winehq.org/
That's about as close as you're going to be able to get.
-
- Member
- Posts: 368
- Joined: Sun Sep 23, 2007 4:52 am
Re: Windows Internals
"Linkers and Loaders" by John R. Levine has good information on executable formats, including linking and loading, also on Windows.
- AndrewAPrice
- Member
- Posts: 2306
- Joined: Mon Jun 05, 2006 11:00 pm
- Location: USA (and Australia)
Re: Windows Internals
Don't you have this kind of backwards? Windows is known for it's backwards compatibility of legacy code. My 32-bit Vista can run most Windows 3.1 and 95 programs fine. The ones which fail are ones which depend on old libraries I do not have. Where as a Windows 3.1 program will not compile with the latest Windows platform SDK.Love4Boobies wrote:The whole purpose of using library calls instead of actual system calls is that system calls get deprecated, changed and so on. A system call that's there in one version of Windows might not be the same or might not be there at all in the next. Library calls work around this using whatever system calls are present and provide backward and forward compatibility.
Or maybe you are right and the system calls do change and those old programs are dynamically linked to legacy DLLs which are included with Vista. That seems more logical because NT and the 9x Windows kernels most likely had a completely independent set of system calls. I think you are both right and wrong in different way.
My OS is Perception.
Re: Windows Internals
Hi,
Love4Boobies and your second paragraph is right. Your compiled Windows programs are dynamically linked with DLL's and the legacy functions are provided there. In this way, the actual structure of system calls can change without the library <--> application interface needing to change. In the same way, a compiled user app may use SYSENTER on Vista running on a newer machine, and INT 0x? on Win95 on an older pc.
Cheers,
Adam
Love4Boobies and your second paragraph is right. Your compiled Windows programs are dynamically linked with DLL's and the legacy functions are provided there. In this way, the actual structure of system calls can change without the library <--> application interface needing to change. In the same way, a compiled user app may use SYSENTER on Vista running on a newer machine, and INT 0x? on Win95 on an older pc.
Cheers,
Adam
- JankoSixta
- Posts: 5
- Joined: Mon Jan 26, 2009 11:30 pm
Re: Windows Internals
Actually some legacy functions like Yield() from 3.1 as you write, are deprecated and obsolete. Not every though, I - for example, when programming - use WinExec instead of CreateProcess just because it's simpler if you don't need any special creation parameters.
You're running 16bit 3.1 programs on Vista? Well, they need wowexec (16bit NE) or ntvdm (DOS COM, MZ-EXE,...) in NT kernels to work. Vista IIRC doesn't have NTVDM and the DOS command prompt...
You're running 16bit 3.1 programs on Vista? Well, they need wowexec (16bit NE) or ntvdm (DOS COM, MZ-EXE,...) in NT kernels to work. Vista IIRC doesn't have NTVDM and the DOS command prompt...
Re: Windows Internals
Vista 64-bit doesn't have an NTVDM, and Windows ME was the last OS to have an actual DOS prompt (Vista does have a command prompt of course).JankoSixta wrote:Vista IIRC doesn't have NTVDM and the DOS command prompt...
JAL
- JankoSixta
- Posts: 5
- Joined: Mon Jan 26, 2009 11:30 pm
Re: Windows Internals
Indeed, afaik ME didn't had the choice to reboot to DOS when quitting, apart from 9x.jal wrote:Windows ME was the last OS to have an actual DOS prompt (Vista does have a command prompt of course).JankoSixta wrote:Vista IIRC doesn't have NTVDM and the DOS command prompt...
JAL
I don't know about Vista, but it has something named "PowerShell" as a substitute for the "DOS" subsystem NTVDM, but this is a bit offtopic...
Re: Windows Internals
cmd.exe, the NT command line interpreter (also present in 2000, XP, Vista and Win7) has always been a native Win32 app, and not DOS (as opposed to the command.com from Win9x/ME). Powershell is a replacement cmd.exe. It is available for XP as well. It has nothing to do with replacing NTVDM, which is something entirely different.JankoSixta wrote:I don't know about Vista, but it has something named "PowerShell" as a substitute for the "DOS" subsystem NTVDM, but this is a bit offtopic...
JAL