reenan
September 23rd, 2007, 10:56 PM
Hello,
I am new to the world of windows programming. I am trying to figure out how the graphics system in windows actually work. From many articles, I read that the dlls have a particular code fragment for system call, as given below:
mov eax, function_index
lea edx, [esp+4]
int 0x2E
ret parameter_number * 4
I am using windows gdi programming book by Mr.Feng Yuan as a reference. I tried to use the code snippets given along with the book, to write a program to list the system calls in gdi32.dll. But I could not find any such code fragment. In fact, when i used a dissassembler to view gdi32.dll, I found the following code pattern being used:
mov eax, function_index
mov edx, 7FFE0300H
call [edx]
ret <value>
Does these two code fragments represent the same? What does the address '7FFE0300' represent? why there is no int 2e call?
I modified my program to search for the above pattern of assembly code at a particular symbol address, and the symbols displayed were the system calls itself. (I used imagehlp library for enumerating the symbols). That is, i got the same output as given in the book. Then why is there a difference in the assembly code? I am working on windows server 2003. I will be extremely thankful if I could get a reply for this.
Thanks,
reenan
I am new to the world of windows programming. I am trying to figure out how the graphics system in windows actually work. From many articles, I read that the dlls have a particular code fragment for system call, as given below:
mov eax, function_index
lea edx, [esp+4]
int 0x2E
ret parameter_number * 4
I am using windows gdi programming book by Mr.Feng Yuan as a reference. I tried to use the code snippets given along with the book, to write a program to list the system calls in gdi32.dll. But I could not find any such code fragment. In fact, when i used a dissassembler to view gdi32.dll, I found the following code pattern being used:
mov eax, function_index
mov edx, 7FFE0300H
call [edx]
ret <value>
Does these two code fragments represent the same? What does the address '7FFE0300' represent? why there is no int 2e call?
I modified my program to search for the above pattern of assembly code at a particular symbol address, and the symbols displayed were the system calls itself. (I used imagehlp library for enumerating the symbols). That is, i got the same output as given in the book. Then why is there a difference in the assembly code? I am working on windows server 2003. I will be extremely thankful if I could get a reply for this.
Thanks,
reenan