-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8083d62
commit ae62786
Showing
121 changed files
with
9,663 additions
and
0 deletions.
There are no files selected for viewing
243 changes: 243 additions & 0 deletions
243
WDK-Samples/Microsoft Windows 3.1 DDK/SAMPLES/CONTENTS.TXT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,243 @@ | ||
|
||
* PLEASE NOTE: This is sample code that was written to illustrate possible | ||
* usage of services that are documented in the Windows Device Development | ||
* Kit. Microsoft does not guarantee the accuracy or reliability of this | ||
* code. | ||
|
||
|
||
Please see the README.TXT file, and source files for more detailed | ||
information on each VxD. | ||
|
||
============================================================================= | ||
EATPAGES.386 | ||
|
||
This VxD demonstrates the use of the Linked List services, as well | ||
as the System Page Allocator functions. The VxD will simply allocate | ||
half of the free physical pages at boot time, and free them at | ||
system exit. This can be useful to simulate low memory conditions. | ||
|
||
Uses the following services: | ||
VMMCall _GetDemandPageInfo | ||
VMMCall _PageAllocate | ||
VMMCall _PageFree | ||
VMMCall List_Create | ||
VMMCall List_Allocate | ||
VMMCall List_Attach_Tail | ||
VMMCall List_Get_First | ||
VMMCall List_Get_Next | ||
VMMCall List_Remove | ||
VMMCall List_Deallocate | ||
|
||
============================================================================= | ||
GENERIC.386 | ||
|
||
The basic structure of a VxD is illustrated by this VxD. As written, | ||
it can be loaded although it performs no function. This VxD can be | ||
used as a base set of source files to start a VxD project. | ||
|
||
============================================================================= | ||
GPTRAP.386 | ||
|
||
This VxD uses the Hook_PM_Fault to catch GP faults. When this VxD receives | ||
control because of a GP fault, it will execute an INT 1. If execution is | ||
continued, control is passed to the next handler in the fault handler chain. | ||
|
||
The "VxDStub" code for this VxD is an example in itself. The stub hooks | ||
INT 2Fh then terminates with stay resident. When Windows later loads, | ||
this TSR responds to the INT 2Fh, AX=1605h (Windows initialization) | ||
broadcast. The TSR returns a structure that will cause the VxD to be loaded. | ||
Thus, no "device=" line is required in the SYSTEM.INI file. | ||
|
||
Uses the following services: | ||
VMMCall Hook_PM_Fault | ||
|
||
============================================================================= | ||
VDIALOG.386 | ||
|
||
The purpose of this sample VxD is to demonstrate the basic use of the | ||
Install_IO_Handler and Shell_Resolve_Contention function calls. The | ||
Install_IO_Handler call enables this VxD to trap IN and OUT's to a port | ||
from any VM. The Shell_Resolve_Contention call is then used to display a | ||
dialog box when another VM attempts to use a port that is already assigned | ||
to another VM. | ||
|
||
This VxD also demonstrates the use of Enable_Local_Trapping and | ||
Disable_Local_Trapping to allow the owner of the port in question to | ||
freely do I/O to the port without overhead. | ||
|
||
Uses the following services: | ||
VMMCall Install_IO_Handler | ||
VMMCall Enable_Local_Trapping | ||
VMMCall Disable_Local_Trapping | ||
|
||
VxDCall Shell_Resolve_Contention | ||
|
||
============================================================================= | ||
VFINTD.386 | ||
|
||
This sample has been provided to demonstrate the technique of | ||
handling the virtualization of a particular IRQ. | ||
|
||
Uses the following services: | ||
VxDCall VPICD_Virtualize_IRQ | ||
VxDCall VPICD_Set_Int_Request | ||
VxDCall VPICD_Clear_Int_Request | ||
VxDCall VPICD_Phys_EOI | ||
|
||
============================================================================= | ||
VIDLED.386 | ||
|
||
This VxD demonstrates how to use the Call_When_Idle function. | ||
|
||
Uses the following services: | ||
VMMCall Call_When_Idle | ||
|
||
============================================================================= | ||
VITD.386 | ||
|
||
This VxD provides a simulation of a hardware interval timer for virtual | ||
machines. To install it, build VITD.386, place the final VITD.386 in | ||
the Windows SYSTEM directory, and add a "device=VITD.386" line in the | ||
[386enh] section of the SYSTEM.INI and restart Windows. | ||
|
||
Please see the README.TXT file, and source files for more detailed | ||
information. | ||
|
||
Uses the following services: | ||
VMMCall _Allocate_Device_CB_Area | ||
VMMCall Fatal_Memory_Error | ||
VMMCall Install_Mult_IO_Handlers | ||
VMMCall Get_VM_Exec_Time | ||
VMMCall Cancel_Time_Out | ||
VMMCall Call_Priority_VM_Event | ||
VMMCall Begin_Nest_Exec | ||
VMMCall Exec_Int | ||
VMMCall End_Nest_Exec | ||
|
||
VxDCall VTD_Get_Version | ||
VxDCall VTD_Begin_Min_Int_Period | ||
VxDCall VTD_Get_Interrupt_Period | ||
VxDCall VTD_End_Min_Int_Period | ||
|
||
============================================================================= | ||
VKXD.386 | ||
|
||
This VxD makes the F9 key act as the ALT-ENTER keypress sequence. | ||
It shows how to use the Force_Keys API of the Virtual Keyboard | ||
Device (VKD). | ||
|
||
Uses the following services: | ||
VxDCall VKD_Define_Hot_Key | ||
VxDCall VKD_Cancel_Hot_Key_State | ||
VxDCall VKD_Force_Keys | ||
|
||
============================================================================= | ||
VMIOD.386 | ||
|
||
This VxD can be used to monitor the I/O traffic associated with a particular | ||
device. Specifically, IN's and OUT's to a single I/O port will trigger | ||
debugging output on the secondary monitor of the system. Note that you | ||
must have a secondary monitor to use this VxD. | ||
|
||
Uses the following services: | ||
VMMCall Install_IO_Handler | ||
VMMCall Get_Profile_Hex_Int | ||
VMMCall Clear_Mono_Screen | ||
VMMCall Set_Mono_Cur_Pos | ||
VMMCall Out_Mono_String | ||
|
||
============================================================================= | ||
VMIRQD.386 | ||
|
||
This VxD can be used to monitor the activity associated with a particular | ||
hardware interrupt (IRQ). Specifically, hardware interrupts, EOIs, IRETs, | ||
virtual interrupts, and mask changes associated with a particular IRQ | ||
will trigger debugging output on the secondary monitor of the system. | ||
Note that you must have a secondary monitor to use this VxD. | ||
|
||
Uses the following services: | ||
VMMCall Get_Profile_Decimal_Int | ||
VMMCall Clear_Mono_Screen | ||
VMMCall Set_Mono_Cur_Pos | ||
VMMCall Out_Mono_String | ||
|
||
VxDCall VPICD_Virtualize_IRQ | ||
VxDCall VPICD_Set_Int_Request | ||
VxDCall VPICD_Clear_Int_Request | ||
VxDCall VPICD_Phys_EOI | ||
|
||
============================================================================= | ||
VMPAGES.386 | ||
|
||
This VxD demonstrates how to export a VxD service (in this case GetVMPgCount), | ||
to an application. | ||
|
||
Uses the following services: | ||
VMMCall _GetVMPgCount | ||
|
||
============================================================================= | ||
VNMID.386 | ||
|
||
This VxD shows how to hook the NMI (Non-maskable interrupt). It | ||
currently does not actually DO anything with the NMI except to | ||
chain to the previous handler. | ||
|
||
Uses the following services: | ||
VMMCall Get_NMI_Handler_Addr | ||
VMMCall Set_NMI_Handler_Addr | ||
VMMCall Hook_NMI_Event | ||
|
||
============================================================================= | ||
VPOSTD.386 | ||
|
||
This collection of programs demonstrates one way a VxD can cause a message | ||
to be posted to a Windows application. This example also shows a fairly | ||
useful implementation of real and protected mode APIs. | ||
|
||
Uses the following services: | ||
VMMCall _Allocate_Device_CB_Area | ||
VMMCall Fatal_Memory_Error | ||
VMMCall Get_Sys_VM_Handle | ||
VMMCall Test_Sys_VM_Handle | ||
VMMCall Get_Crit_Section_Status | ||
VMMCall Call_When_VM_Ints_Enabled | ||
VMMCall Call_Priority_VM_Event | ||
VMMCall Begin_Nest_Exec | ||
VMMCall Simulate_Push | ||
VMMCall Simulate_Far_Call | ||
VMMCall Resume_Exec | ||
VMMCall End_Nest_Exec | ||
|
||
============================================================================= | ||
VWATCHD.386 | ||
|
||
VwatchD is a Virtual Device that demonstrates the basic structure of | ||
a VxD. This VxD issues a Trace_Out (ie: sends messages to the COMx: | ||
port) at it's entry points. By watching the messages it displays, you | ||
can study the situations which cause the various VxD entry points to | ||
be called. | ||
|
||
This VxD shows all major entry points, VERY simple APIs (separate APIs | ||
for V86 mode as well as PM mode), and a "debug_dump" section. | ||
|
||
Uses the following services: | ||
VMMCall _Allocate_Device_CB_Area | ||
VMMCall Get_System_Time | ||
|
||
VxDCall VwatchD_Get_Version | ||
|
||
============================================================================= | ||
VWFD.386 | ||
|
||
This VxD, when installed on a system running Windows in enhanced mode, | ||
allows DOS applications to determine if they are running in a window | ||
or full-screen. TSTWF.ASM is a sample DOS program that uses the VWFD | ||
API. | ||
|
||
Uses the following services: | ||
VMMCall _Allocate_Device_CB_Area | ||
VMMCall Fatal_Memory_Error | ||
VMMCall Hook_Device_Service | ||
VMMCall Get_Next_VM_Handle | ||
VMMCall Test_Cur_VM_Handle | ||
25 changes: 25 additions & 0 deletions
25
WDK-Samples/Microsoft Windows 3.1 DDK/SAMPLES/EATPAGES/EATPAGES
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# sample make file for building EatPages virtual device for Windows | ||
|
||
# comment this definition out with a "#", if building a non-debugging version | ||
Debug=-DDEBUG | ||
|
||
all : eatpages.386 | ||
|
||
vxdstub.obj: vxdstub.asm | ||
masm -I..\include vxdstub; | ||
|
||
vxdstub.exe: vxdstub.obj | ||
link vxdstub.obj; | ||
|
||
|
||
eatpages.obj : eatpages.asm ..\include\debug.inc ..\include\vmm.inc | ||
masm5 -p -w2 -Mx $(Debug) -I..\include eatpages.asm; | ||
|
||
OBJS = eatpages.obj | ||
|
||
eatpages.386: eatpages.def $(OBJS) vxdstub.exe | ||
link386 @eatpages.lnk | ||
addhdr eatpages.386 | ||
mapsym32 eatpages | ||
copy eatpages.386 eatpages.exe | ||
Oops, something went wrong.