驅動程式 - Windows Driver Model (WDM) - 使用範例 - Pascal (DDDK) - make.bat



del /s /q main.sys
del /s /q main.dcu
del /s /q main.obj
"c:\dddk\bin\dcc32.exe" -U"c:\dddk\inc" -B -CG -JP -$A-,C-,D-,G-,H-,I-,L-,P-,V-,W+,Y- main.pas
"c:\dddk\bin\omf2d.exe" main.obj
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj"
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEDbgPrint=_DbgPrint
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEExAllocatePool=_ExAllocatePool@8
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEExAllocatePoolWithQuota=_ExAllocatePoolWithQuota@8
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEExAllocatePoolWithTag=_ExAllocatePoolWithTag@12
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEExFreePool=_ExFreePool@4
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEInterlockedExchange=@InterlockedExchange@8
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEIoAttachDeviceToDeviceStack=_IoAttachDeviceToDeviceStack@8
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEIoCallDriver=_IoCallDriver@8
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEIoCompleteRequest=_IoCompleteRequest@8
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEIoCreateDevice=_IoCreateDevice@28
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEIoCreateSymbolicLink=_IoCreateSymbolicLink@8
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEIoCsqInitialize=_IoCsqInitialize@28
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEIoCsqInsertIrp=_IoCsqInsertIrp@12
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEIoDeleteDevice=_IoDeleteDevice@4
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEIoDeleteSymbolicLink=_IoDeleteSymbolicLink@4
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEIoDetachDevice=_IoDetachDevice@4
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEIoGetCurrentProcess=_IoGetCurrentProcess@0
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEIoInitializeTimer=_IoInitializeTimer@12
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEIoStartNextPacket=_IoStartNextPacket@8
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEIoStartPacket=_IoStartPacket@16
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEIoStartTimer=_IoStartTimer@4
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEIoStopTimer=_IoStopTimer@4
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEKeAcquireSpinLock=_KeAcquireSpinLock@8
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEKeCancelTimer=_KeCancelTimer@4
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEKeDelayExecutionThread=_KeDelayExecutionThread@12
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEKeInitializeDpc=_KeInitializeDpc@12
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEKeInitializeEvent=_KeInitializeEvent@12
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEKeInitializeMutex=_KeInitializeMutex@8
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEKeInitializeSemaphore=_KeInitializeSemaphore@12
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEKeInitializeSpinLock=_KeInitializeSpinLock@4
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEKeInitializeTimer=_KeInitializeTimer@4
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEKeRaiseIrql=_KeRaiseIrql@8
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEKeReadStateSemaphore=_KeReadStateSemaphore@4
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEKeReleaseMutex=_KeReleaseMutex@8
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEKeReleaseSemaphore=_KeReleaseSemaphore@16
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEKeReleaseSpinLock=_KeReleaseSpinLock@8
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEKeReleaseSpinLock=_KeReleaseSpinLock@8
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEKeServiceDescriptorTable=_KeServiceDescriptorTable
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEKeSetEvent=_KeSetEvent@12
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEKeSetTimerEx=_KeSetTimerEx@20
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEKeSetTimer=_KeSetTimer@16
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEKeWaitForSingleObject=_KeWaitForSingleObject@20 
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEMmMapLockedPagesSpecifyCache=_MmMapLockedPagesSpecifyCache@24
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEObDereferenceObject=_ObDereferenceObject@4
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEObReferenceObjectByHandle=_ObReferenceObjectByHandle@24
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEProbeForRead=_ProbeForRead@12
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEPsCreateSystemThread=_PsCreateSystemThread@28
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEPsTerminateSystemThread=_PsTerminateSystemThread@4
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CERtlInitUnicodeString=_RtlInitUnicodeString@8
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CERtlZeroMemory=_RtlZeroMemory@8
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEZwClose=_ZwClose@4
"c:\dddk\bin\omf2d.exe" "c:\dddk\inc\dddk.obj" /U- /CEZwOpenProcess=_ZwOpenProcess@16
"c:\dddk\bin\link.exe" /nologo /align:32 /base:0x10000 /subsystem:native /debug /debugtype:cv /pdb:main.pdb /driver /force:unresolved /force:multiple /entry:DriverEntry "c:\dddk\inc\dddk.obj" "c:\dddk\lib\ntoskrnl.lib" "c:\dddk\lib\hal.lib" main.obj /out:main.sys

if exist app.pas (
    del /s /q app.exe
    "c:\dddk\bin\dcc32.exe" -U"c:\dddk\inc" /b /dReleaseCompilation app.pas
)