;;陆麟写的开放WIN32环境下的中断的VXD. ;;直到目前的WIN98+MULTIMEDIA UPDATE 1仍有效 ;;盗版请留下我的名字:) .386p BLD_COFF EQU 1 IS_32 EQU 1 MASM6 EQU 1 include vmm.inc include shell.inc Declare_Virtual_Device INT1f,6,0,ctrlproc,Undefined_Device_ID,1000000h,,, Vxd_DATA_SEG msgt db "INT1f.VXD written by lulin",0 msgc db "You are entering int1f!",0 idt df 0 Vxd_DATA_ENDS VxD_CODE_SEG BeginProc v1f ;;中断处理程序 pushad VMMcall Get_Cur_VM_Handle mov eax,MB_OK xor esi,esi mov edx,esi mov ecx,offset32 msgc mov edi,offset32 msgt VxDcall SHELL_Message popad iretd ;;绕过VMM的服务返回.否则就无法实现开放给WIN32APP. EndProc v1f BeginProc doinit mov edx,offset32 v1f mov ecx,28h mov eax,1fh VMMcall Set_PM_Int_Vector sidt fword ptr idt ;;没办法.只有直接操纵IDT. mov eax,1fh ;;关键是MS把WIN32下的中断操作给否决了.不再提供. shl eax,3 add eax,dword ptr idt[2] add eax,5 mov ebx,eax mov byte ptr [ebx],0efh lidt fword ptr idt clc ret EndProc doinit VxD_CODE_ENDS VxD_LOCKED_CODE_SEG BeginProc ctrlproc Control_Dispatch Thread_Init,doinit clc ret EndProc ctrlproc VxD_LOCKED_CODE_ENDS VxD_REAL_INIT_SEG ;;也要留点版权信息:) mov ah,9 mov dx,offset msg movzx edx,dx int 21h xor ax,ax xor bx,bx xor si,si xor edx,edx ret msg db "Now Initlization INT1f.VXD",0dh,0ah db "Written by lulin. All rights reserved.",0dh,0ah db "1998.8.30",'$' VxD_REAL_INIT_ENDS end