├── 10 ├── Splitter │ ├── Bin │ │ ├── Spliter.inf │ │ └── 无标题.png │ ├── Source │ │ ├── Pin.cpp │ │ ├── Pin.h │ │ ├── Spliter.cpp │ │ ├── Spliter.h │ │ ├── Spliter.rc │ │ ├── filter.cpp │ │ ├── filter.h │ │ ├── makefile │ │ └── sources │ ├── Spliter.vcproj │ └── 关于.docx └── 读我.txt ├── 11 ├── ASIO │ ├── Source │ │ ├── V-ASIO.def │ │ ├── asiosample.txt │ │ ├── asiosmpl.cpp │ │ ├── asiosmpl.h │ │ ├── objfre_win7_x86 │ │ │ └── i386 │ │ │ │ └── asiosmpl.obj.oacr.root.x86fre.pft.xml │ │ └── sources │ ├── V-ASIO_User.vcproj │ └── common │ │ ├── asio.cpp │ │ ├── asio.h │ │ ├── asiodrvr.cpp │ │ ├── asiodrvr.h │ │ ├── asiosys.h │ │ ├── combase.cpp │ │ ├── combase.h │ │ ├── debugmessage.cpp │ │ ├── dllentry.cpp │ │ ├── iasiodrv.h │ │ ├── register.cpp │ │ └── wxdebug.h ├── AsioSimTool │ ├── AsioSimTool.cpp │ ├── AsioSimTool.vcproj │ ├── PlayMusicFile.cpp │ ├── PlayMusicFile.h │ ├── ReadMe.txt │ ├── asio.h │ ├── asiolist.cpp │ ├── asiolist.h │ ├── asiotool.h │ ├── command.cpp │ ├── command.h │ ├── stdafx.cpp │ └── stdafx.h ├── Bin │ ├── V-ASIO.inf │ └── i386 │ │ ├── V-ASIO.pdb │ │ └── V-ASIO.sys ├── Kernel │ ├── Source │ │ ├── ASIO.c │ │ ├── MAKEFILE │ │ ├── Main.c │ │ ├── Main.h │ │ ├── objfre_win7_x86 │ │ │ └── i386 │ │ │ │ ├── asio.obj.oacr.root.x86fre.pft.xml │ │ │ │ └── main.obj.oacr.root.x86fre.pft.xml │ │ ├── public.h │ │ └── sources │ └── V-ASIO.vcproj ├── install.bat ├── uninstall.bat └── 关于.docx ├── 13 ├── Inf │ ├── AddReg.inf │ ├── CopyFiles.inf │ ├── DelFiles.inf │ ├── DelReg.inf │ ├── ProfileItems.inf │ ├── RenFiles.inf │ ├── Services.inf │ ├── Services_DEL.inf │ ├── ini.inf │ └── test.txt └── InfRun.exe ├── 14 ├── DrvInst.exe └── DrvInst │ ├── DrvDeletePage.cpp │ ├── DrvDeletePage.h │ ├── DrvInst.cpp │ ├── DrvInst.h │ ├── DrvInst.rc │ ├── DrvInst.vcproj │ ├── DrvInstPage.cpp │ ├── DrvInstPage.h │ ├── DrvInstSheetEx.cpp │ ├── DrvInstSheetEx.h │ ├── FinishPage.cpp │ ├── FinishPage.h │ ├── HIDPage.cpp │ ├── HIDPage.h │ ├── ReadMe.txt │ ├── StartPage.cpp │ ├── StartPage.h │ ├── XHyperLink.cpp │ ├── XHyperLink.h │ ├── res │ ├── DrvInst.ico │ ├── DrvInst.rc2 │ ├── ICON.ico │ ├── background.bmp │ ├── baner16.bmp │ ├── header.bmp │ └── water16.bmp │ ├── resource.h │ ├── setup.cpp │ ├── setup.h │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── 01 ├── HelloDRIVER │ ├── HelloDRIVER.c │ ├── HelloDRIVER.h │ ├── MAKEFILE │ ├── ReadMe.txt │ └── SOURCES └── HelloWorld │ ├── HelloWorld.c │ ├── MAKEFILE │ ├── ReadMe.txt │ └── SOURCES ├── 04 ├── CY001_ClsInst │ ├── CY001_ClsInst.def │ ├── MAKEFILE │ ├── classInst_CY001.c │ ├── classinst_CY001.rc │ ├── resource.h │ └── sources ├── Common │ ├── IoCtl.h │ ├── NewDelete.h │ ├── Structure.h │ └── public.h ├── WDF_CY001 │ ├── CY001.vcproj │ ├── Debug.c │ ├── Device.c │ ├── DeviceIO.c │ ├── Main.c │ ├── Pnp_Pwr.c │ ├── ReadWrite.c │ ├── Util.c │ ├── makefile │ ├── public.h │ ├── readme.txt │ └── sources └── 安装 │ ├── AMD64 │ ├── CY001.sys │ ├── CY001_ClsInst.dll │ └── WdfCoInstaller01009.dll │ ├── CY001(1Interface).hex │ ├── CY001(2Interfaces).hex │ ├── CY001.inf │ ├── DrvInst.exe │ ├── UsbKitApp.exe │ └── i386 │ ├── CY001.sys │ ├── CY001_ClsInst.dll │ └── WdfCoInstaller01009.dll ├── 05 ├── 1394_kmdf │ ├── dirs │ └── vdev_hybrid │ │ ├── Bin │ │ ├── WDF │ │ │ ├── WUDFUpdate_01009.dll │ │ │ ├── WUDFUpdate_01009_chk.dll │ │ │ ├── WdfCoInstaller01009.dll │ │ │ └── WdfCoInstaller01009_chk.dll │ │ ├── WDF1394.exe │ │ ├── kmdf1394vdev.sys │ │ ├── umdf1394vdev.dll │ │ ├── wdf1394vdev.inf │ │ └── 关于.docx │ │ ├── dirs │ │ ├── exe │ │ ├── 1394.c │ │ ├── 1394.h │ │ ├── async.c │ │ ├── async.h │ │ ├── debug.c │ │ ├── debug.h │ │ ├── isoch.c │ │ ├── isoch.h │ │ ├── local.h │ │ ├── makefile │ │ ├── pch.h │ │ ├── resource.h │ │ ├── sources │ │ ├── umdf1394vdev.dll │ │ ├── util.c │ │ ├── util.h │ │ ├── wdf1394.c │ │ ├── wdf1394.ico │ │ └── wdf1394.rc │ │ ├── inc │ │ ├── wdf_common.h │ │ └── wdf_vdev_api.h │ │ ├── kmdf │ │ ├── kmdf_vdev.c │ │ ├── kmdf_vdev.h │ │ ├── kmdf_vdev.rc │ │ ├── kmdf_vdev_api.c │ │ ├── kmdf_vdev_async.c │ │ ├── kmdf_vdev_debug.h │ │ ├── kmdf_vdev_ioctl.c │ │ ├── kmdf_vdev_isoch.c │ │ ├── kmdf_vdev_pnp.c │ │ ├── kmdf_vdev_sample.h │ │ ├── kmdf_vdev_utils.c │ │ ├── makefile │ │ ├── makefile.inc │ │ ├── sources │ │ └── wdf1394vdev.inx │ │ ├── umdf │ │ ├── exports.def │ │ ├── makefile │ │ ├── makefile.inc │ │ ├── sources │ │ ├── umdf_vdev.h │ │ ├── umdf_vdev.rc │ │ ├── umdf_vdev_com.cpp │ │ ├── umdf_vdev_com.h │ │ ├── umdf_vdev_device.cpp │ │ ├── umdf_vdev_device.h │ │ ├── umdf_vdev_dll.cpp │ │ ├── umdf_vdev_driver.cpp │ │ ├── umdf_vdev_driver.h │ │ ├── umdf_vdev_parallelqueue.cpp │ │ ├── umdf_vdev_parallelqueue.h │ │ ├── umdf_vdev_sequentialqueue.cpp │ │ └── umdf_vdev_sequentialqueue.h │ │ └── wdf1394vdev.htm └── 读我.txt ├── 06 ├── Common │ ├── IoCtl.h │ ├── NewDelete.h │ ├── Structure.h │ └── public.h ├── UsbBaseClass │ ├── DrvClass.cpp │ ├── DrvClass.h │ ├── Main.cpp │ ├── UsbBaseClass.vcproj │ ├── class.cpp │ ├── makefile │ ├── readme.txt │ └── sources ├── WDF_CY001 │ ├── CY001.vcproj │ ├── CY001Drv.cpp │ ├── CY001Drv.h │ ├── Debug.c │ ├── Device.cpp │ ├── DeviceIO.cpp │ ├── DrvClass.cpp │ ├── DrvClass.h │ ├── Main.cpp │ ├── NewDelete.h │ ├── Pnp_Pwr.cpp │ ├── ReadWrite.cpp │ ├── Util.cpp │ ├── makefile │ ├── public.h │ ├── readme.txt │ ├── sources │ └── subClass.h ├── WDM │ ├── MAKEFILE │ ├── SOURCES │ ├── SRVINSTW.EXE │ ├── WDM++.cpp │ └── 读我.txt └── simClass │ ├── Main.cpp │ ├── makefile │ ├── readme.txt │ ├── simClass.vcproj │ └── sources ├── 09 ├── inverted_call │ ├── AppDrv.dsp │ ├── AppDrv.dsw │ ├── DIRS │ ├── TestApp │ │ ├── Resource.h │ │ ├── StdAfx.cpp │ │ ├── StdAfx.h │ │ ├── TestApp.aps │ │ ├── TestApp.clw │ │ ├── TestApp.cpp │ │ ├── TestApp.dsp │ │ ├── TestApp.h │ │ ├── TestApp.plg │ │ ├── TestApp.rc │ │ └── vssver.scc │ ├── driver │ │ ├── Driver.dsp │ │ ├── Driver.plg │ │ ├── MAKEFILE │ │ ├── comm-ioctl.h │ │ ├── comm.cpp │ │ ├── comm.h │ │ ├── sources │ │ └── vssver.scc │ └── service │ │ ├── AppSrv.cpp │ │ ├── AppSrv.dsp │ │ ├── AppSrv.h │ │ ├── AppSrv.plg │ │ ├── AppSrv.rc │ │ ├── MAKEFILE │ │ ├── NTServMsg.mc │ │ ├── NTService.cpp │ │ ├── NTService.h │ │ ├── Resource.h │ │ ├── StdAfx.cpp │ │ ├── StdAfx.h │ │ ├── ntservmsg.h │ │ ├── reflectorservice.cpp │ │ ├── reflectorservice.h │ │ ├── sources │ │ └── vssver.scc └── 读我.txt ├── my_build.bat ├── my_clean.bat └── 读我.doc /01/HelloDRIVER/HelloDRIVER.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/01/HelloDRIVER/HelloDRIVER.c -------------------------------------------------------------------------------- /01/HelloDRIVER/HelloDRIVER.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/01/HelloDRIVER/HelloDRIVER.h -------------------------------------------------------------------------------- /01/HelloDRIVER/MAKEFILE: -------------------------------------------------------------------------------- 1 | !INCLUDE $(NTMAKEENV)\makefile.def 2 | 3 | -------------------------------------------------------------------------------- /01/HelloDRIVER/ReadMe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/01/HelloDRIVER/ReadMe.txt -------------------------------------------------------------------------------- /01/HelloDRIVER/SOURCES: -------------------------------------------------------------------------------- 1 | TARGETNAME = HelloDRIVER 2 | TARGETTYPE = DRIVER 3 | TARGETPATH = OBJ 4 | 5 | SOURCES = HelloDRIVER.c 6 | 7 | -------------------------------------------------------------------------------- /01/HelloWorld/HelloWorld.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/01/HelloWorld/HelloWorld.c -------------------------------------------------------------------------------- /01/HelloWorld/MAKEFILE: -------------------------------------------------------------------------------- 1 | !INCLUDE $(NTMAKEENV)\makefile.def 2 | 3 | -------------------------------------------------------------------------------- /01/HelloWorld/ReadMe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/01/HelloWorld/ReadMe.txt -------------------------------------------------------------------------------- /01/HelloWorld/SOURCES: -------------------------------------------------------------------------------- 1 | TARGETNAME = HelloWorld 2 | TARGETTYPE = DRIVER 3 | TARGETPATH = OBJ 4 | 5 | SOURCES = HelloWorld.c 6 | 7 | -------------------------------------------------------------------------------- /04/CY001_ClsInst/CY001_ClsInst.def: -------------------------------------------------------------------------------- 1 | LIBRARY CY001_ClsInst 2 | 3 | EXPORTS 4 | CY001ClassInstaller -------------------------------------------------------------------------------- /04/CY001_ClsInst/MAKEFILE: -------------------------------------------------------------------------------- 1 | # 2 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 3 | # file to this component. This file merely indirects to the real make file 4 | # that is shared by all the driver components of the Windows NT DDK 5 | # 6 | 7 | !INCLUDE $(NTMAKEENV)\makefile.def 8 | 9 | -------------------------------------------------------------------------------- /04/CY001_ClsInst/classInst_CY001.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/04/CY001_ClsInst/classInst_CY001.c -------------------------------------------------------------------------------- /04/CY001_ClsInst/classinst_CY001.rc: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include "resource.h" 4 | #include 5 | #include 6 | 7 | #define VER_FILETYPE VFT_APP 8 | #define VER_FILESUBTYPE VFT2_UNKNOWN 9 | #define VER_FILEDESCRIPTION_STR "Class Installer for CY001" 10 | #define VER_INTERNALNAME_STR "CY001ClsInst.dll" 11 | #define VER_ORIGINALFILENAME_STR "CY001ClsInst.dll" 12 | 13 | #include 14 | 15 | 16 | 17 | ///////////////////////////////////////////////////////////////////////////// 18 | // 19 | // Dialog 20 | // 21 | 22 | DLG_TOASTER_PORTSETTINGS DIALOGEX 0, 0, 110, 100 23 | STYLE DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTION | 24 | WS_SYSMENU 25 | CAPTION "CY001" 26 | FONT 18, "MS Shell Dlg" 27 | BEGIN 28 | LTEXT "Hello CY001!", 29 | IDC_STATIC,35,24,171,27,0,0 30 | END 31 | -------------------------------------------------------------------------------- /04/CY001_ClsInst/resource.h: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (c) 1999-2000 Microsoft Corporation 4 | 5 | Module Name: 6 | 7 | Resource.h 8 | 9 | Abstract: 10 | 11 | Resource def. 12 | 13 | Environment: 14 | 15 | user mode only 16 | 17 | Notes: 18 | 19 | THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY 20 | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR 22 | PURPOSE. 23 | 24 | Copyright (c) 1999-2000 Microsoft Corporation. All Rights Reserved. 25 | 26 | 27 | Revision History: 28 | 29 | --*/ 30 | 31 | #define IDI_CLASS_ICON 100 32 | 33 | #define DLG_TOASTER_PORTSETTINGS 200 34 | 35 | #define IDC_STATIC 202 36 | 37 | #define IDC_FRIENDLYNAME 203 38 | 39 | -------------------------------------------------------------------------------- /04/CY001_ClsInst/sources: -------------------------------------------------------------------------------- 1 | TARGETNAME=CY001_ClsInst 2 | TARGETTYPE=DYNLINK 3 | 4 | MSC_WARNING_LEVEL=/W4 /WX 5 | 6 | DLLENTRY=_DllMainCRTStartup 7 | 8 | INCLUDES=$(DDK_INC_PATH); 9 | 10 | USE_MSVCRT=1 11 | 12 | SOURCES=classinst_CY001.c \ 13 | classinst_CY001.rc 14 | 15 | TARGETLIBS= $(SDK_LIB_PATH)\setupapi.lib \ 16 | $(SDK_LIB_PATH)\kernel32.lib \ 17 | $(SDK_LIB_PATH)\advapi32.lib \ 18 | $(SDK_LIB_PATH)\user32.lib \ 19 | $(SDK_LIB_PATH)\comctl32.lib 20 | 21 | DLLBASE=0x2000000 22 | 23 | _NT_TARGET_VERSION=$(_NT_TARGET_VERSION_WINXP) 24 | -------------------------------------------------------------------------------- /04/Common/IoCtl.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/04/Common/IoCtl.h -------------------------------------------------------------------------------- /04/Common/NewDelete.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/04/Common/NewDelete.h -------------------------------------------------------------------------------- /04/Common/Structure.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/04/Common/Structure.h -------------------------------------------------------------------------------- /04/Common/public.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/04/Common/public.h -------------------------------------------------------------------------------- /04/WDF_CY001/CY001.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 15 | 16 | 17 | 18 | 19 | 26 | 39 | 40 | 47 | 60 | 61 | 62 | 63 | 64 | 65 | 70 | 73 | 74 | 77 | 78 | 81 | 82 | 85 | 86 | 89 | 90 | 93 | 94 | 97 | 98 | 99 | 104 | 107 | 108 | 109 | 114 | 117 | 118 | 121 | 122 | 125 | 126 | 127 | 130 | 131 | 134 | 135 | 136 | 137 | 138 | 139 | -------------------------------------------------------------------------------- /04/WDF_CY001/Debug.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/04/WDF_CY001/Debug.c -------------------------------------------------------------------------------- /04/WDF_CY001/Device.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/04/WDF_CY001/Device.c -------------------------------------------------------------------------------- /04/WDF_CY001/DeviceIO.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/04/WDF_CY001/DeviceIO.c -------------------------------------------------------------------------------- /04/WDF_CY001/Main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/04/WDF_CY001/Main.c -------------------------------------------------------------------------------- /04/WDF_CY001/Pnp_Pwr.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/04/WDF_CY001/Pnp_Pwr.c -------------------------------------------------------------------------------- /04/WDF_CY001/ReadWrite.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/04/WDF_CY001/ReadWrite.c -------------------------------------------------------------------------------- /04/WDF_CY001/Util.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/04/WDF_CY001/Util.c -------------------------------------------------------------------------------- /04/WDF_CY001/makefile: -------------------------------------------------------------------------------- 1 | # 2 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 3 | # file to this component. This file merely indirects to the real make file 4 | # that is shared by all the driver components of the Windows NT DDK 5 | # 6 | 7 | !INCLUDE $(NTMAKEENV)\makefile.def 8 | 9 | 10 | -------------------------------------------------------------------------------- /04/WDF_CY001/public.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/04/WDF_CY001/public.h -------------------------------------------------------------------------------- /04/WDF_CY001/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/04/WDF_CY001/readme.txt -------------------------------------------------------------------------------- /04/WDF_CY001/sources: -------------------------------------------------------------------------------- 1 | TARGETNAME=CY001 2 | TARGETTYPE=DRIVER 3 | 4 | MSC_WARNING_LEVEL=/W0 5 | 6 | INCLUDES = .\ 7 | 8 | NO_BINPLACE=1 9 | 10 | KMDF_VERSION=1 11 | 12 | TARGETLIBS = $(DDK_LIB_PATH)\usbd.lib 13 | INCLUDES = ..\common 14 | 15 | SOURCES=Main.c\ 16 | Device.c\ 17 | Pnp_Pwr.c\ 18 | DeviceIO.c\ 19 | ReadWrite.c\ 20 | Util.c 21 | -------------------------------------------------------------------------------- /04/安装/AMD64/CY001.sys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/04/安装/AMD64/CY001.sys -------------------------------------------------------------------------------- /04/安装/AMD64/CY001_ClsInst.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/04/安装/AMD64/CY001_ClsInst.dll -------------------------------------------------------------------------------- /04/安装/AMD64/WdfCoInstaller01009.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/04/安装/AMD64/WdfCoInstaller01009.dll -------------------------------------------------------------------------------- /04/安装/CY001.inf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/04/安装/CY001.inf -------------------------------------------------------------------------------- /04/安装/DrvInst.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/04/安装/DrvInst.exe -------------------------------------------------------------------------------- /04/安装/UsbKitApp.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/04/安装/UsbKitApp.exe -------------------------------------------------------------------------------- /04/安装/i386/CY001.sys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/04/安装/i386/CY001.sys -------------------------------------------------------------------------------- /04/安装/i386/CY001_ClsInst.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/04/安装/i386/CY001_ClsInst.dll -------------------------------------------------------------------------------- /04/安装/i386/WdfCoInstaller01009.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/04/安装/i386/WdfCoInstaller01009.dll -------------------------------------------------------------------------------- /05/1394_kmdf/dirs: -------------------------------------------------------------------------------- 1 | DIRS= \ 2 | vdev_hybrid -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/Bin/WDF/WUDFUpdate_01009.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/05/1394_kmdf/vdev_hybrid/Bin/WDF/WUDFUpdate_01009.dll -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/Bin/WDF/WUDFUpdate_01009_chk.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/05/1394_kmdf/vdev_hybrid/Bin/WDF/WUDFUpdate_01009_chk.dll -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/Bin/WDF/WdfCoInstaller01009.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/05/1394_kmdf/vdev_hybrid/Bin/WDF/WdfCoInstaller01009.dll -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/Bin/WDF/WdfCoInstaller01009_chk.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/05/1394_kmdf/vdev_hybrid/Bin/WDF/WdfCoInstaller01009_chk.dll -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/Bin/WDF1394.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/05/1394_kmdf/vdev_hybrid/Bin/WDF1394.exe -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/Bin/kmdf1394vdev.sys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/05/1394_kmdf/vdev_hybrid/Bin/kmdf1394vdev.sys -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/Bin/umdf1394vdev.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/05/1394_kmdf/vdev_hybrid/Bin/umdf1394vdev.dll -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/Bin/wdf1394vdev.inf: -------------------------------------------------------------------------------- 1 | ;/*++ 2 | ; 3 | ;Copyright (c) Microsoft Corporation. All rights reserved. 4 | ; 5 | ;Module Name: 6 | ; 7 | ; wdf1394vdev.INF 8 | ; 9 | ;Abstract: 10 | ; INF file for installing 1394 virtual device hybrid w/ the umdf component 11 | ; as an upper filter. 12 | ; 13 | ; 14 | ;--*/ 15 | [Version] 16 | signature="$CHICAGO$" 17 | Class=Sample 18 | ClassGuid={78A1C341-4539-11d3-B88D-00C04FAD5171} 19 | Provider=%MSFTWDF% 20 | CatalogFile=KmdfSamples.cat 21 | DriverVer=01/06/2011,6.1.7600.16385 22 | 23 | [SourceDisksNames] 24 | 1 = %MediaDescription%,,,"" 25 | 26 | [SourceDisksFiles] 27 | kmdf1394vdev.sys=1 28 | umdf1394vdev.dll=1 29 | WudfUpdate_01009.dll=1, wdf 30 | wdfcoinstaller01009.dll=1, wdf 31 | 32 | 33 | [DestinationDirs] 34 | DefaultDestDir = 12 35 | UMDF1394VDEV.CopyDriver=12,UMDF 36 | 37 | ; =================== Class Sections =========================== 38 | [ClassInstall32] 39 | Addreg=1394DevicesClassReg 40 | 41 | [1394DevicesClassReg] 42 | HKR,,,,%ClassName% 43 | HKR,,Icon,,-21 44 | HKR,,Security,,"D:P(A;;GA;;;SY)(A;;GA;;;BA)" ; ACL allowing System and Admin 45 | 46 | [Manufacturer] 47 | %MSFTWDF%=Microsoft,NTx86 48 | 49 | [ControlFlags] 50 | ExcludeFromSelect=* 51 | 52 | ; =================== Microsoft ======================== 53 | 54 | [Microsoft.NTx86] 55 | %kmdf1394vdevDeviceDesc%=KMDF1394VDEV,V1394\1394_VIRTUAL_DEVICE 56 | 57 | ; =================== 1394 Hybrid Installation ====================== 58 | 59 | [KMDF1394VDEV.NT] 60 | CopyFiles=KMDF1394VDEV.CopyDriver, UMDF1394VDEV.CopyDriver 61 | 62 | [KMDF1394VDEV.NT.HW] 63 | AddReg=kmdf1394vdev_Device_AddReg 64 | 65 | [KMDF1394VDEV.NT.CoInstallers] 66 | AddReg=CoInstaller_AddReg 67 | CopyFiles=CoInstaller_CopyFiles 68 | 69 | [KMDF1394VDEV.NT.Services] 70 | AddService=KMDF1394VDEV,0x00000002,KMDF1394VDEV_ServiceInstall 71 | AddService=WUDFRd,,WUDFRd_ServiceInstall 72 | 73 | [KMDF1394VDEV.NT.Wdf] 74 | KmdfService = KMDF1394VDEV, KMDF1394VDEV_wdfsect 75 | UmdfService = "umdf1394vdev", umdf1394vdev_Install 76 | UmdfServiceOrder = umdf1394vdev 77 | 78 | [kmdf1394vdev_Device_AddReg] 79 | ; Load the redirector as an upperfilter on this specific device. 80 | ; 0x00010008 - FLG_ADDREG_TYPE_MULTI_SZ | FLG_ADDREG_APPEND 81 | HKR,,"UpperFilters",0x00010008,"WUDFRd" 82 | 83 | [CoInstaller_CopyFiles] 84 | wdfcoinstaller01009.dll 85 | WudfUpdate_01009.dll 86 | 87 | [CoInstaller_AddReg] 88 | HKR,,CoInstallers32,0x00010000,"wdfcoinstaller01009.dll,WdfCoInstaller","WUDFUpdate_01009.dll" 89 | 90 | [KMDF1394VDEV_ServiceInstall] 91 | DisplayName=%kmdf1394vdevDeviceDesc% 92 | ServiceType=1 93 | StartType=3 94 | ErrorControl=1 95 | ServiceBinary=%12%\kmdf1394vdev.sys 96 | 97 | [WUDFRd_ServiceInstall] 98 | DisplayName=%WudfRd_SvcDesc% 99 | ServiceType=1 100 | StartType=3 101 | ErrorControl=1 102 | ServiceBinary=%12%\WUDFRd.sys 103 | 104 | [KMDF1394VDEV.CopyDriver] 105 | kmdf1394vdev.sys 106 | 107 | [UMDF1394VDEV.CopyDriver] 108 | umdf1394vdev.dll 109 | 110 | ;================ WDF installation ================== 111 | 112 | [umdf1394vdev_Install] 113 | UmdfLibraryVersion=1.9.0 114 | DriverCLSID= "{d202f373-3aae-45ee-ae73-45766cef14b4}" 115 | ServiceBinary= "%12%\UMDF\umdf1394vdev.dll" 116 | 117 | [KMDF1394VDEV_wdfsect] 118 | KmdfLibraryVersion = 1.9 119 | 120 | [DestinationDirs] 121 | CoInstaller_CopyFiles = 11 122 | 123 | ; 124 | ; Strings 125 | ; 126 | [Strings] 127 | MSFTWDF ="Microsoft (WDF)" 128 | MediaDescription ="Microsoft Sample Driver Installation Media" 129 | ClassName="1394 Test Devices" 130 | WudfRd_SvcDesc ="WDF Hybrid Reflector" 131 | kmdf1394vdevDeviceDesc ="1394 Test Devices" 132 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/Bin/关于.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/05/1394_kmdf/vdev_hybrid/Bin/关于.docx -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/dirs: -------------------------------------------------------------------------------- 1 | DIRS= \ 2 | exe \ 3 | kmdf \ 4 | umdf -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/exe/1394.h: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (c) 1998 Microsoft Corporation 4 | 5 | Module Name: 6 | 7 | 1394.h 8 | 9 | Abstract 10 | 11 | 1394 api wrappers 12 | 13 | --*/ 14 | 15 | VOID 16 | DisplayLocalHost ( 17 | HWND hWnd, 18 | PGET_LOCAL_HOST_INFORMATION pGetLocalHostInfo); 19 | 20 | INT_PTR CALLBACK 21 | BusResetDlgProc( 22 | HWND hDlg, 23 | UINT uMsg, 24 | WPARAM wParam, 25 | LPARAM lParam 26 | ); 27 | 28 | void 29 | w1394_BusReset( 30 | HWND hWnd, 31 | __in PSTR szDeviceName 32 | ); 33 | 34 | void 35 | w1394_GetGenerationCount( 36 | HWND hWnd, 37 | __in PSTR szDeviceName 38 | ); 39 | 40 | INT_PTR CALLBACK 41 | GetLocalHostInfoDlgProc( 42 | HWND hDlg, 43 | UINT uMsg, 44 | WPARAM wParam, 45 | LPARAM lParam 46 | ); 47 | 48 | void 49 | w1394_GetLocalHostInfo( 50 | HWND hWnd, 51 | __in PSTR szDeviceName 52 | ); 53 | 54 | INT_PTR CALLBACK 55 | Get1394AddressFromDeviceObjectDlgProc( 56 | HWND hDlg, 57 | UINT uMsg, 58 | WPARAM wParam, 59 | LPARAM lParam 60 | ); 61 | 62 | void 63 | w1394_Get1394AddressFromDeviceObject( 64 | HWND hWnd, 65 | __in PSTR szDeviceName 66 | ); 67 | 68 | void 69 | w1394_Control( 70 | HWND hWnd, 71 | __in PSTR szDeviceName 72 | ); 73 | 74 | INT_PTR CALLBACK 75 | GetMaxSpeedBetweenDevicesDlgProc( 76 | HWND hDlg, 77 | UINT uMsg, 78 | WPARAM wParam, 79 | LPARAM lParam 80 | ); 81 | 82 | void 83 | w1394_GetMaxSpeedBetweenDevices( 84 | HWND hWnd, 85 | __in PSTR szDeviceName 86 | ); 87 | 88 | void 89 | w1394_GetConfigurationInfo( 90 | HWND hWnd, 91 | __in PSTR szDeviceName 92 | ); 93 | 94 | INT_PTR CALLBACK 95 | SetDeviceXmitPropertiesDlgProc( 96 | HWND hDlg, 97 | UINT uMsg, 98 | WPARAM wParam, 99 | LPARAM lParam 100 | ); 101 | 102 | void 103 | w1394_SetDeviceXmitProperties( 104 | HWND hWnd, 105 | __in PSTR szDeviceName 106 | ); 107 | 108 | INT_PTR CALLBACK 109 | SendPhyConfigDlgProc( 110 | HWND hDlg, 111 | UINT uMsg, 112 | WPARAM wParam, 113 | LPARAM lParam 114 | ); 115 | 116 | void 117 | w1394_SendPhyConfigPacket( 118 | HWND hWnd, 119 | __in PSTR szDeviceName 120 | ); 121 | 122 | /* Commenting this code. This function is not defined. 123 | The application is not calling it 124 | 125 | void 126 | w1394_GetSpeedTopologyMaps( 127 | HWND hWnd, 128 | PSTR szDeviceName 129 | ); 130 | */ 131 | 132 | INT_PTR CALLBACK 133 | BusResetNotificationDlgProc( 134 | HWND hDlg, 135 | UINT uMsg, 136 | WPARAM wParam, 137 | LPARAM lParam 138 | ); 139 | 140 | void 141 | w1394_BusResetNotification( 142 | HWND hWnd, 143 | __in PSTR szDeviceName 144 | ); 145 | 146 | INT_PTR CALLBACK 147 | SetLocalHostInfoDlgProc( 148 | HWND hDlg, 149 | UINT uMsg, 150 | WPARAM wParam, 151 | LPARAM lParam 152 | ); 153 | 154 | void 155 | w1394_SetLocalHostInfo( 156 | HWND hWnd, 157 | __in PSTR szDeviceName 158 | ); 159 | 160 | 161 | 162 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/exe/async.h: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (c) 1998 Microsoft Corporation 4 | 5 | Module Name: 6 | 7 | async.h 8 | 9 | Abstract 10 | 11 | 1394 async wrappers 12 | 13 | --*/ 14 | 15 | INT_PTR CALLBACK 16 | AllocateAddressRangeDlgProc( 17 | HWND hDlg, 18 | UINT uMsg, 19 | WPARAM wParam, 20 | LPARAM lParam 21 | ); 22 | 23 | void 24 | w1394_AllocateAddressRange( 25 | HWND hWnd, 26 | __in PSTR szDeviceName 27 | ); 28 | 29 | INT_PTR CALLBACK 30 | FreeAddressRangeDlgProc( 31 | HWND hDlg, 32 | UINT uMsg, 33 | WPARAM wParam, 34 | LPARAM lParam 35 | ); 36 | 37 | void 38 | w1394_FreeAddressRange( 39 | HWND hWnd, 40 | __in PSTR szDeviceName 41 | ); 42 | 43 | INT_PTR CALLBACK 44 | AsyncReadDlgProc( 45 | HWND hDlg, 46 | UINT uMsg, 47 | WPARAM wParam, 48 | LPARAM lParam 49 | ); 50 | 51 | void 52 | w1394_AsyncRead( 53 | HWND hWnd, 54 | __in PSTR szDeviceName 55 | ); 56 | 57 | INT_PTR CALLBACK 58 | AsyncWriteDlgProc( 59 | HWND hDlg, 60 | UINT uMsg, 61 | WPARAM wParam, 62 | LPARAM lParam 63 | ); 64 | 65 | void 66 | w1394_AsyncWrite( 67 | HWND hWnd, 68 | __in PSTR szDeviceName 69 | ); 70 | 71 | INT_PTR CALLBACK 72 | AsyncLockDlgProc( 73 | HWND hDlg, 74 | UINT uMsg, 75 | WPARAM wParam, 76 | LPARAM lParam 77 | ); 78 | 79 | void 80 | w1394_AsyncLock( 81 | HWND hWnd, 82 | __in PSTR szDeviceName 83 | ); 84 | 85 | INT_PTR CALLBACK 86 | AsyncStreamDlgProc( 87 | HWND hDlg, 88 | UINT uMsg, 89 | WPARAM wParam, 90 | LPARAM lParam 91 | ); 92 | 93 | void 94 | w1394_AsyncStream( 95 | HWND hWnd, 96 | __in PSTR szDeviceName 97 | ); 98 | /* 99 | INT_PTR CALLBACK 100 | AsyncLoopbackDlgProc( 101 | HWND hDlg, 102 | UINT uMsg, 103 | WPARAM wParam, 104 | LPARAM lParam 105 | ); 106 | 107 | void 108 | w1394_AsyncStartLoopback( 109 | HWND hWnd, 110 | __in PSTR szDeviceName, 111 | PASYNC_LOOPBACK_PARAMS asyncLoopbackParams 112 | ); 113 | 114 | void 115 | w1394_AsyncStopLoopback( 116 | HWND hWnd, 117 | PASYNC_LOOPBACK_PARAMS asyncLoopbackParams 118 | ); 119 | 120 | void 121 | w1394_AsyncStreamStartLoopback( 122 | HWND hWnd, 123 | __in PSTR szDeviceName, 124 | PASYNC_STREAM_LOOPBACK_PARAMS streamLoopbackParams 125 | ); 126 | 127 | void 128 | w1394_AsyncStreamStopLoopback( 129 | HWND hWnd, 130 | PASYNC_STREAM_LOOPBACK_PARAMS streamLoopbackParams 131 | ); 132 | */ 133 | 134 | 135 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/exe/debug.c: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (c) 1998 Microsoft Corporation 4 | 5 | Module Name: 6 | 7 | debug.c 8 | --*/ 9 | 10 | #define _DEBUG_C 11 | #include "pch.h" 12 | #undef _DEBUG_C 13 | 14 | void 15 | DbgPrt( 16 | __in HANDLE hWnd, 17 | __in __nullterminated PCHAR lpszFormat, 18 | ... 19 | ) 20 | { 21 | char buf[STRING_SIZE]; // = "WIN1394: "; 22 | va_list ap; 23 | 24 | va_start(ap, lpszFormat); 25 | 26 | // wvsprintf( &buf[0], lpszFormat, ap ); 27 | StringCbVPrintf( &buf[0] , (STRING_SIZE * sizeof(buf[0])) , lpszFormat, ap ); 28 | #if defined(DBG) 29 | OutputDebugStringA(buf); 30 | #endif 31 | 32 | if (hWnd) 33 | WriteTextToEditControl(hWnd, buf); 34 | 35 | va_end(ap); 36 | } 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/exe/debug.h: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (c) 1998 Microsoft Corporation 4 | 5 | Module Name: 6 | 7 | debug.h 8 | --*/ 9 | 10 | #define TL_TRACE 0 11 | #define TL_WARNING 1 12 | #define TL_ERROR 2 13 | #define TL_FATAL 3 14 | 15 | #ifdef _DEBUG_C 16 | unsigned char TraceLevel = TL_TRACE; 17 | #else 18 | extern unsigned char TraceLevel; 19 | #endif 20 | 21 | #define TRACE(tl, x) \ 22 | if ( (tl) >= TraceLevel ) { \ 23 | DbgPrt x ; \ 24 | } 25 | 26 | void 27 | DbgPrt( 28 | __in HANDLE hWnd, 29 | __in __nullterminated PCHAR lpszFormat, 30 | ... 31 | ); 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/exe/isoch.h: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (c) 1998 Microsoft Corporation 4 | 5 | Module Name: 6 | 7 | isoch.h 8 | 9 | Abstract 10 | 11 | 1394 isoch wrappers 12 | 13 | --*/ 14 | 15 | INT_PTR CALLBACK 16 | IsochAllocateBandwidthDlgProc( 17 | HWND hDlg, 18 | UINT uMsg, 19 | WPARAM wParam, 20 | LPARAM lParam 21 | ); 22 | 23 | void 24 | w1394_IsochAllocateBandwidth( 25 | HWND hWnd, 26 | __in PSTR szDeviceName 27 | ); 28 | 29 | INT_PTR CALLBACK 30 | IsochAllocateChannelDlgProc( 31 | HWND hDlg, 32 | UINT uMsg, 33 | WPARAM wParam, 34 | LPARAM lParam 35 | ); 36 | 37 | void 38 | w1394_IsochAllocateChannel( 39 | HWND hWnd, 40 | __in PSTR szDeviceName 41 | ); 42 | 43 | INT_PTR CALLBACK 44 | IsochAllocateResourcesDlgProc( 45 | HWND hDlg, 46 | UINT uMsg, 47 | WPARAM wParam, 48 | LPARAM lParam 49 | ); 50 | 51 | void 52 | w1394_IsochAllocateResources( 53 | HWND hWnd, 54 | __in PSTR szDeviceName 55 | ); 56 | 57 | INT_PTR CALLBACK 58 | IsochAttachBuffersDlgProc( 59 | HWND hDlg, 60 | UINT uMsg, 61 | WPARAM wParam, 62 | LPARAM lParam 63 | ); 64 | 65 | void 66 | w1394_IsochAttachBuffers( 67 | HWND hWnd, 68 | __in PSTR szDeviceName 69 | ); 70 | 71 | INT_PTR CALLBACK 72 | IsochDetachBuffersDlgProc( 73 | HWND hDlg, 74 | UINT uMsg, 75 | WPARAM wParam, 76 | LPARAM lParam 77 | ); 78 | 79 | void 80 | w1394_IsochDetachBuffers( 81 | HWND hWnd, 82 | __in PSTR szDeviceName 83 | ); 84 | 85 | INT_PTR CALLBACK 86 | IsochFreeBandwidthDlgProc( 87 | HWND hDlg, 88 | UINT uMsg, 89 | WPARAM wParam, 90 | LPARAM lParam 91 | ); 92 | 93 | void 94 | w1394_IsochFreeBandwidth( 95 | HWND hWnd, 96 | __in PSTR szDeviceName 97 | ); 98 | 99 | INT_PTR CALLBACK 100 | IsochFreeChannelDlgProc( 101 | HWND hDlg, 102 | UINT uMsg, 103 | WPARAM wParam, 104 | LPARAM lParam 105 | ); 106 | 107 | void 108 | w1394_IsochFreeChannel( 109 | HWND hWnd, 110 | __in PSTR szDeviceName 111 | ); 112 | 113 | INT_PTR CALLBACK 114 | IsochFreeResourcesDlgProc( 115 | HWND hDlg, 116 | UINT uMsg, 117 | WPARAM wParam, 118 | LPARAM lParam 119 | ); 120 | 121 | void 122 | w1394_IsochFreeResources( 123 | HWND hWnd, 124 | __in PSTR szDeviceName 125 | ); 126 | 127 | INT_PTR CALLBACK 128 | IsochListenDlgProc( 129 | HWND hDlg, 130 | UINT uMsg, 131 | WPARAM wParam, 132 | LPARAM lParam 133 | ); 134 | 135 | void 136 | w1394_IsochListen( 137 | HWND hWnd, 138 | __in PSTR szDeviceName 139 | ); 140 | 141 | void 142 | w1394_IsochQueryCurrentCycleTime( 143 | HWND hWnd, 144 | __in PSTR szDeviceName 145 | ); 146 | 147 | INT_PTR CALLBACK 148 | IsochQueryResourcesDlgProc( 149 | HWND hDlg, 150 | UINT uMsg, 151 | WPARAM wParam, 152 | LPARAM lParam 153 | ); 154 | 155 | void 156 | w1394_IsochQueryResources( 157 | HWND hWnd, 158 | __in PSTR szDeviceName 159 | ); 160 | 161 | void 162 | w1394_IsochSetChannelBandwidth( 163 | HWND hWnd, 164 | __in PSTR szDeviceName 165 | ); 166 | 167 | INT_PTR CALLBACK 168 | IsochStopDlgProc( 169 | HWND hDlg, 170 | UINT uMsg, 171 | WPARAM wParam, 172 | LPARAM lParam 173 | ); 174 | 175 | void 176 | w1394_IsochStop( 177 | HWND hWnd, 178 | __in PSTR szDeviceName 179 | ); 180 | 181 | INT_PTR CALLBACK 182 | IsochTalkDlgProc( 183 | HWND hDlg, 184 | UINT uMsg, 185 | WPARAM wParam, 186 | LPARAM lParam 187 | ); 188 | 189 | void 190 | w1394_IsochTalk( 191 | HWND hWnd, 192 | __in PSTR szDeviceName); 193 | /* 194 | INT_PTR CALLBACK 195 | IsochLoopbackDlgProc( 196 | HWND hDlg, 197 | UINT uMsg, 198 | WPARAM wParam, 199 | LPARAM lParam 200 | ); 201 | 202 | void 203 | w1394_IsochStartLoopback( 204 | HWND hWnd, 205 | __in PSTR szDeviceName, 206 | PISOCH_LOOPBACK_PARAMS IsochLoopbackParams 207 | ); 208 | 209 | void 210 | w1394_IsochStopLoopback( 211 | HWND hWnd, 212 | PISOCH_LOOPBACK_PARAMS IsochLoopbackParams 213 | ); 214 | 215 | 216 | */ 217 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/exe/local.h: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (c) Microsoft Corporation 4 | 5 | Module Name: 6 | 7 | local.h 8 | --*/ 9 | 10 | // 11 | // Once the use has selected the test device 12 | // we'll get and use a handle to it for submitting IOCLTs to the 13 | // hybrid stack. 14 | // 15 | extern HANDLE g_hTestDevice; 16 | 17 | 18 | 19 | #define STRING_SIZE 1024 20 | #define APP_TIMER_ID 0x0001 21 | #define EDIT_ID 0x0001 22 | 23 | 24 | #ifdef _WDF1394_C 25 | HINSTANCE g_hInstance; 26 | HWND g_hWndEdit; 27 | 28 | PSTR szBusName = "\\\\.\\1394BUS0"; 29 | 30 | DEVICE_DATA DeviceData; 31 | DEVICE_DATA VirtDeviceData; 32 | 33 | PSTR SelectedDevice; 34 | 35 | SYSTEMTIME AsyncStartTime; 36 | SYSTEMTIME IsochStartTime; 37 | SYSTEMTIME StreamStartTime; 38 | 39 | 40 | #else 41 | 42 | extern HINSTANCE g_hInstance; 43 | extern HWND g_hWndEdit; 44 | 45 | extern PDEVICE_DATA DeviceData; 46 | extern SYSTEMTIME AsyncStartTime; 47 | extern SYSTEMTIME IsochStartTime; 48 | extern SYSTEMTIME StreamStartTime; 49 | 50 | 51 | 52 | #endif // _WDF1394_C 53 | 54 | INT_PTR CALLBACK 55 | SelectDeviceDlgProc ( 56 | HWND hDlg, 57 | UINT uMsg, 58 | WPARAM wParam, 59 | LPARAM lParam); 60 | 61 | void 62 | w1394_SelectTestDevice ( 63 | HWND hWnd); 64 | 65 | INT_PTR CALLBACK 66 | w1394_AboutDlgProc( 67 | HWND hDlg, 68 | UINT uMsg, 69 | WPARAM wParam, 70 | LPARAM lParam); 71 | 72 | LRESULT CALLBACK 73 | w1394_AppWndProc( 74 | HWND hWnd, 75 | UINT iMsg, 76 | WPARAM wParam, 77 | LPARAM lParam); 78 | 79 | int WINAPI 80 | WinMain ( 81 | __in HINSTANCE hInstance, 82 | __in_opt HINSTANCE hPrevInstance, 83 | __in PSTR szCmdLine, 84 | int iCmdShow); 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/exe/makefile: -------------------------------------------------------------------------------- 1 | ############################################################################# 2 | # 3 | # Copyright (C) Microsoft Corporation 1995-99 4 | # All Rights Reserved. 5 | # 6 | # MAKEFILE for WIN1394 test application 7 | # 8 | ############################################################################# 9 | 10 | !IFDEF WIN95_BUILD 11 | 12 | ROOT = ..\..\..\.. 13 | 14 | BLDPROJ = OPK3 15 | 16 | WIN32 = TRUE 17 | IS_32 = TRUE 18 | IS_OEM = TRUE 19 | 20 | COMMONMKFILE = win1394.mk 21 | VERSIONLIST = debug retail 22 | 23 | !include $(ROOT)\dev\master.mk 24 | 25 | !ELSE 26 | 27 | # 28 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 29 | # file to this component. This file merely indirects to the real make file 30 | # that is shared by all the driver components of the Windows NT DDK 31 | # 32 | 33 | !INCLUDE $(NTMAKEENV)\makefile.def 34 | 35 | !ENDIF 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/exe/pch.h: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (c) 1998 Microsoft Corporation 4 | 5 | Module Name: 6 | 7 | pch.h 8 | --*/ 9 | 10 | // 11 | // Disable warnings for nonstandard extension used : nameless struct/union. 12 | // This warning is generated from WinIoctl.h and not from this code. 13 | // 14 | 15 | #if _MSC_VER >= 1200 16 | 17 | #pragma warning(push) 18 | 19 | #endif 20 | 21 | #pragma warning(disable:4201) // nonstandard extension used : nameless struct/union 22 | 23 | #include 24 | __user_driver; 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include "wdf_common.h" 33 | #include "wdf_vdev_api.h" 34 | 35 | #include "debug.h" 36 | #include "util.h" 37 | #include "async.h" 38 | #include "isoch.h" 39 | #include "1394.h" 40 | #include "resource.h" 41 | #include "local.h" 42 | #define STRSAFE_NO_DEPRECATE 43 | #include 44 | #include 45 | 46 | 47 | #if _MSC_VER >= 1200 48 | 49 | #pragma warning(pop) 50 | 51 | #else 52 | 53 | #endif 54 | 55 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/exe/sources: -------------------------------------------------------------------------------- 1 | TARGETNAME=WDF1394 2 | TARGETTYPE=PROGRAM 3 | 4 | USE_MSVCRT=1 5 | 6 | INCLUDES=$(INCLUDES); \ 7 | ..\inc; \ 8 | $(DDK_INC_PATH); 9 | 10 | TARGETLIBS= $(SDK_LIB_PATH)\kernel32.lib \ 11 | $(SDK_LIB_PATH)\setupapi.lib \ 12 | $(SDK_LIB_PATH)\user32.lib \ 13 | 14 | MSC_WARNING_LEVEL=/W4 /WX 15 | 16 | SOURCES= 1394.c \ 17 | async.c \ 18 | debug.c \ 19 | isoch.c \ 20 | util.c \ 21 | wdf1394.c \ 22 | wdf1394.rc 23 | 24 | UMTYPE=windows 25 | UMENTRY=winmain 26 | 27 | C_DEFINES=/DW32 /DWIN32 28 | 29 | 30 | TARGET_DESTINATION=idw 31 | 32 | MUI=0 33 | 34 | MUI_COMMENT=LGNEXCLUDE_MOVE, moved from exclusion txt, owners have to contact MUICore to resolve 35 | 36 | 37 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/exe/umdf1394vdev.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/05/1394_kmdf/vdev_hybrid/exe/umdf1394vdev.dll -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/exe/util.h: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (c) Microsoft Corporation 4 | 5 | Module Name: 6 | 7 | util.h 8 | 9 | Abstract 10 | 11 | Prototype, defines for util functions. 12 | --*/ 13 | 14 | HANDLE 15 | OpenDevice ( 16 | HANDLE hWnd, 17 | __in PSTR szDeviceName); 18 | 19 | VOID 20 | WriteTextToEditControl ( 21 | HWND hWndEdit, 22 | __in PCHAR str); 23 | 24 | // Generic singly linked list routines 25 | 26 | typedef struct _LIST_NODE { 27 | struct _LIST_NODE *pNext; 28 | } LIST_NODE, *PLIST_NODE; 29 | 30 | void 31 | InsertTailList ( 32 | PLIST_NODE head, 33 | PLIST_NODE entry); 34 | 35 | BOOL 36 | RemoveEntryList ( 37 | PLIST_NODE head, 38 | PLIST_NODE entry); 39 | 40 | void 41 | InsertHeadList ( 42 | PLIST_NODE head, 43 | PLIST_NODE entry); 44 | 45 | BOOL 46 | IsNodeOnList ( 47 | PLIST_NODE head, 48 | PLIST_NODE entry); 49 | 50 | DWORD 51 | WINAPI 52 | RemoveVirtualDriver ( 53 | HWND hWnd, 54 | PVIRT_DEVICE pVirtualDevice, 55 | ULONG BusNumber); 56 | 57 | DWORD 58 | WINAPI 59 | AddVirtualDriver ( 60 | HWND hWnd, 61 | PVIRT_DEVICE pVirtualDevice, 62 | ULONG BusNumber); 63 | DWORD 64 | FillDeviceList ( 65 | HWND hWnd, 66 | LPGUID guid, 67 | PDEVICE_DATA pDeviceData); 68 | 69 | DWORD 70 | SendRequest ( 71 | IN DWORD Ioctl, 72 | IN PVOID InputBuffer, 73 | IN ULONG InputBufferSize, 74 | PVOID OutputBuffer, 75 | ULONG OutputBufferSize, 76 | LPDWORD bytesReturned); 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/exe/wdf1394.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/05/1394_kmdf/vdev_hybrid/exe/wdf1394.ico -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/kmdf/kmdf_vdev.c: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (c) Microsoft Corporation 4 | 5 | Module Name: 6 | 7 | kmdf_vdev.cpp 8 | 9 | Abstract: 10 | 11 | Entry file for the kmdf component of the 1394 virtual device hybrid driver sample. 12 | 13 | --*/ 14 | 15 | 16 | 17 | #include "kmdf_vdev.h" 18 | 19 | #if DBG 20 | 21 | unsigned char kmdf_vdev_DebugLevel = TL_WARNING; 22 | 23 | #endif 24 | 25 | NTSTATUS 26 | DriverEntry ( 27 | IN PDRIVER_OBJECT DriverObject, 28 | IN PUNICODE_STRING RegistryPath) 29 | /*++ 30 | 31 | Routine Description: 32 | 33 | Installable driver initialization entry point. 34 | This entry point is called directly by the I/O system. 35 | 36 | Arguments: 37 | 38 | DriverObject - pointer to the driver object 39 | 40 | RegistryPath - pointer to a unicode string representing the path, 41 | to driver-specific key in the registry. 42 | 43 | Return Value: 44 | 45 | STATUS_SUCCESS if successful, 46 | STATUS_UNSUCCESSFUL otherwise. 47 | 48 | --*/ 49 | { 50 | NTSTATUS ntStatus = STATUS_SUCCESS; 51 | WDF_DRIVER_CONFIG Config; 52 | 53 | ENTER ("DriverEntry"); 54 | 55 | TRACE (TL_TRACE, ("1394VDev Hybrid Sample\n")); 56 | TRACE (TL_TRACE, ("Built %s %s\n", __DATE__, __TIME__)); 57 | 58 | // 59 | // Initialize the Driver Config structure.. 60 | // 61 | WDF_DRIVER_CONFIG_INIT (&Config, kmdf1394_EvtDeviceAdd); 62 | 63 | // 64 | // Create a WDFDRIVER object. 65 | // 66 | ntStatus = WdfDriverCreate ( 67 | DriverObject, 68 | RegistryPath, 69 | WDF_NO_OBJECT_ATTRIBUTES, 70 | &Config, 71 | WDF_NO_HANDLE); 72 | if (!NT_SUCCESS (ntStatus)) 73 | { 74 | TRACE(TL_ERROR, ("WdfDriverCreate failed with status %x\n", ntStatus)); 75 | } 76 | 77 | EXIT("DriverEntry", ntStatus); 78 | return ntStatus; 79 | } // DriverEntry 80 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/kmdf/kmdf_vdev.h: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (c) Microsoft Corporation 4 | 5 | Module Name: 6 | 7 | kmdf_vdev.h 8 | 9 | Abstract: 10 | 11 | Base header file for WDF hybrid 1394 virtual device driver. 12 | 13 | 14 | --*/ 15 | #ifndef _KMDF_VDEV_H_ 16 | #define _KMDF_VDEV_H_ 17 | 18 | #include 19 | #include 20 | 21 | #pragma warning(disable:4214) // bit field types other than int warning 22 | 23 | #include <1394.h> 24 | 25 | #pragma warning(default:4214) 26 | 27 | #include "wdf_common.h" 28 | #include "wdf_vdev_api.h" 29 | #include "kmdf_vdev_debug.h" 30 | #include "kmdf_vdev_sample.h" 31 | 32 | #endif // #ifndef _KMDF_VDEV_H_ 33 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/kmdf/kmdf_vdev.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | #define VER_FILETYPE VFT_DLL 6 | #define VER_FILESUBTYPE VFT2_UNKNOWN 7 | #define VER_FILEDESCRIPTION_STR "WDF 1394 Virtual Device Driver Framework Version" 8 | #define VER_INTERNALNAME_STR "KMDF1394VDEV.SYS" 9 | #define VER_ORIGINALFILENAME_STR "KMDF1394VDEV.SYS" 10 | 11 | #include "common.ver" 12 | 13 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/kmdf/kmdf_vdev_debug.h: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (c) Microsoft Corporation 4 | 5 | Module Name: 6 | 7 | kmdf_vdev_debug.h 8 | 9 | Abstract: 10 | 11 | --*/ 12 | 13 | #if DBG 14 | 15 | #define _DRIVERNAME_ "KMDF1394VDEV" 16 | 17 | 18 | #define TL_TRACE 0 19 | #define TL_WARNING 1 20 | #define TL_ERROR 2 21 | #define TL_FATAL 3 22 | 23 | extern unsigned char kmdf_vdev_DebugLevel; 24 | 25 | #define TRACE( l, x ) \ 26 | if( (l) >= kmdf_vdev_DebugLevel) { \ 27 | KdPrint( (_DRIVERNAME_ ": ") ); \ 28 | KdPrint( x ); \ 29 | } 30 | 31 | 32 | #define ENTER(n) TRACE(TL_TRACE, ("%s Enter\n", n)) 33 | 34 | #define EXIT(n,x) \ 35 | if(NT_SUCCESS(__pragma(warning(disable:4127)) x __pragma(warning(disable:4127)))) { \ 36 | TRACE(TL_TRACE, ("%s Exit = %x\n", n, x)); \ 37 | } \ 38 | else { \ 39 | TRACE(TL_ERROR, ("%s Exit = %x\n", n, x)); \ 40 | } 41 | 42 | #else // DBG 43 | 44 | #define TRACE( l, x ) 45 | 46 | #define ENTER(n) 47 | #define EXIT(n,x) 48 | 49 | #endif // DBG 50 | 51 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/kmdf/makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Build using BUILD.EXE (Do not edit this section of this file, edit SOURCES) 3 | # 4 | MINIMUM_NT_TARGET_VERSION=0x600 5 | 6 | !INCLUDE $(NTMAKEENV)\makefile.def 7 | 8 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/kmdf/makefile.inc: -------------------------------------------------------------------------------- 1 | _LNG=$(LANGUAGE) 2 | .SUFFIXES: .inx 3 | STAMP=stampinf 4 | 5 | # $(OBJ_PATH)\$(O)\$(INF_NAME).inf: $(_INX)\$(INF_NAME).inx 6 | .inx{$(OBJ_PATH)\$(O)}.inf: 7 | copy $(@B).inx $@ 8 | $(STAMP) -f $@ -a $(_BUILDARCH) -k $(KMDF_VERSION_MAJOR).$(KMDF_VERSION_MINOR) -u $(UMDF_VERSION_MAJOR).$(UMDF_VERSION_MINOR).0 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/kmdf/sources: -------------------------------------------------------------------------------- 1 | 2 | # 3 | # Define the values of VERSION_MAJOR 4 | # 5 | 6 | UMDF_VERSION_MAJOR = 1 7 | KMDF_VERSION_MAJOR = 1 8 | 9 | 10 | 11 | 12 | TARGETNAME=kmdf1394vdev 13 | TARGETTYPE=DRIVER 14 | 15 | # 16 | # Set the warning level high 17 | # 18 | 19 | MSC_WARNING_LEVEL=/W4 /WX 20 | 21 | # 22 | # -DWDF_DEVICE_NO_WDMSEC_H required if the Driver type is set to WDM 23 | # WDMSEC.H header is not available under DDK\INC\WDM directory. 24 | # 25 | C_DEFINES= $(C_DEFINES) -D_KMDF1394VDEV_DRIVER_=1 -DDRIVER -DWDF_DEVICE_NO_WDMSEC_H=1 26 | 27 | INCLUDES=$(INCLUDES); \ 28 | ..\inc; 29 | 30 | SOURCES = kmdf_vdev.rc \ 31 | kmdf_vdev.c \ 32 | kmdf_vdev_ioctl.c \ 33 | kmdf_vdev_pnp.c \ 34 | kmdf_vdev_utils.c\ 35 | kmdf_vdev_api.c \ 36 | kmdf_vdev_isoch.c \ 37 | kmdf_vdev_async.c 38 | 39 | NTTARGETFILE0=$(OBJ_PATH)\$(O)\wdf1394vdev.inf 40 | 41 | 42 | MISCFILES=$(NTTARGETFILE0) 43 | 44 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/kmdf/wdf1394vdev.inx: -------------------------------------------------------------------------------- 1 | ;/*++ 2 | ; 3 | ;Copyright (c) Microsoft Corporation. All rights reserved. 4 | ; 5 | ;Module Name: 6 | ; 7 | ; wdf1394vdev.INF 8 | ; 9 | ;Abstract: 10 | ; INF file for installing 1394 virtual device hybrid w/ the umdf component 11 | ; as an upper filter. 12 | ; 13 | ; 14 | ;--*/ 15 | [Version] 16 | signature="$CHICAGO$" 17 | Class=Sample 18 | ClassGuid={78A1C341-4539-11d3-B88D-00C04FAD5171} 19 | Provider=%MSFTWDF% 20 | CatalogFile=KmdfSamples.cat 21 | DriverVer=06/01/2007,0.0.0.1 22 | 23 | [SourceDisksNames] 24 | 1 = %MediaDescription%,,,"" 25 | 26 | [SourceDisksFiles] 27 | kmdf1394vdev.sys=1 28 | umdf1394vdev.dll=1 29 | WudfUpdate_$UMDFCOINSTALLERVERSION$.dll=1 30 | wdfcoinstaller$KMDFCOINSTALLERVERSION$.dll=1 31 | 32 | 33 | [DestinationDirs] 34 | DefaultDestDir = 12 35 | UMDF1394VDEV.CopyDriver=12,UMDF 36 | 37 | ; =================== Class Sections =========================== 38 | [ClassInstall32] 39 | Addreg=1394DevicesClassReg 40 | 41 | [1394DevicesClassReg] 42 | HKR,,,,%ClassName% 43 | HKR,,Icon,,-21 44 | HKR,,Security,,"D:P(A;;GA;;;SY)(A;;GA;;;BA)" ; ACL allowing System and Admin 45 | 46 | [Manufacturer] 47 | %MSFTWDF%=Microsoft,NT$ARCH$ 48 | 49 | [ControlFlags] 50 | ExcludeFromSelect=* 51 | 52 | ; =================== Microsoft ======================== 53 | 54 | [Microsoft.NT$ARCH$] 55 | %kmdf1394vdevDeviceDesc%=KMDF1394VDEV,V1394\1394_VIRTUAL_DEVICE 56 | 57 | ; =================== 1394 Hybrid Installation ====================== 58 | 59 | [KMDF1394VDEV.NT] 60 | CopyFiles=KMDF1394VDEV.CopyDriver, UMDF1394VDEV.CopyDriver 61 | 62 | [KMDF1394VDEV.NT.HW] 63 | AddReg=kmdf1394vdev_Device_AddReg 64 | 65 | [KMDF1394VDEV.NT.CoInstallers] 66 | AddReg=CoInstaller_AddReg 67 | CopyFiles=CoInstaller_CopyFiles 68 | 69 | [KMDF1394VDEV.NT.Services] 70 | AddService=KMDF1394VDEV,0x00000002,KMDF1394VDEV_ServiceInstall 71 | AddService=WUDFRd,,WUDFRd_ServiceInstall 72 | 73 | [KMDF1394VDEV.NT.Wdf] 74 | KmdfService = KMDF1394VDEV, KMDF1394VDEV_wdfsect 75 | UmdfService = "umdf1394vdev", umdf1394vdev_Install 76 | UmdfServiceOrder = umdf1394vdev 77 | 78 | [kmdf1394vdev_Device_AddReg] 79 | ; Load the redirector as an upperfilter on this specific device. 80 | ; 0x00010008 - FLG_ADDREG_TYPE_MULTI_SZ | FLG_ADDREG_APPEND 81 | HKR,,"UpperFilters",0x00010008,"WUDFRd" 82 | 83 | [CoInstaller_CopyFiles] 84 | wdfcoinstaller$KMDFCOINSTALLERVERSION$.dll 85 | WudfUpdate_$UMDFCOINSTALLERVERSION$.dll 86 | 87 | [CoInstaller_AddReg] 88 | HKR,,CoInstallers32,0x00010000,"wdfcoinstaller$KMDFCOINSTALLERVERSION$.dll,WdfCoInstaller","WUDFUpdate_$UMDFCOINSTALLERVERSION$.dll" 89 | 90 | [KMDF1394VDEV_ServiceInstall] 91 | DisplayName=%kmdf1394vdevDeviceDesc% 92 | ServiceType=1 93 | StartType=3 94 | ErrorControl=1 95 | ServiceBinary=%12%\kmdf1394vdev.sys 96 | 97 | [WUDFRd_ServiceInstall] 98 | DisplayName=%WudfRd_SvcDesc% 99 | ServiceType=1 100 | StartType=3 101 | ErrorControl=1 102 | ServiceBinary=%12%\WUDFRd.sys 103 | 104 | [KMDF1394VDEV.CopyDriver] 105 | kmdf1394vdev.sys 106 | 107 | [UMDF1394VDEV.CopyDriver] 108 | umdf1394vdev.dll 109 | 110 | ;================ WDF installation ================== 111 | 112 | [umdf1394vdev_Install] 113 | UmdfLibraryVersion=$UMDFVERSION$ 114 | DriverCLSID= "{d202f373-3aae-45ee-ae73-45766cef14b4}" 115 | ServiceBinary= "%12%\UMDF\umdf1394vdev.dll" 116 | 117 | [KMDF1394VDEV_wdfsect] 118 | KmdfLibraryVersion = $KMDFVERSION$ 119 | 120 | [DestinationDirs] 121 | CoInstaller_CopyFiles = 11 122 | 123 | ; 124 | ; Strings 125 | ; 126 | [Strings] 127 | MSFTWDF ="Microsoft (WDF)" 128 | MediaDescription ="Microsoft Sample Driver Installation Media" 129 | ClassName="1394 Test Devices" 130 | WudfRd_SvcDesc ="WDF Hybrid Reflector" 131 | kmdf1394vdevDeviceDesc ="1394 Test Devices" 132 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/umdf/exports.def: -------------------------------------------------------------------------------- 1 | ; umdf1394dev.def : Declares the module parameters. 2 | ; 3 | 4 | LIBRARY "umdf1394vdev.DLL" 5 | 6 | EXPORTS 7 | DllGetClassObject PRIVATE ; default 8 | 9 | 10 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/umdf/makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Build using BUILD.EXE (Do not edit this section of this file, edit SOURCES) 3 | # 4 | MINIMUM_NT_TARGET_VERSION=0x600 5 | 6 | !INCLUDE $(NTMAKEENV)\makefile.def 7 | 8 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/umdf/makefile.inc: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/umdf/sources: -------------------------------------------------------------------------------- 1 | # 2 | # UMDF_VERSION_MAJOR controls the headers that the driver uses. 3 | # UMDF_VERSION_MAJOR + UMDF_VERSION_MINOR control which version 4 | # of UMDF the driver is bound to in the INF and which 5 | # update coinstaller it requires (through stampinf). 6 | # 7 | 8 | UMDF_VERSION_MAJOR=1 9 | KMDF_VERSION_MAJOR=1 10 | 11 | 12 | 13 | TARGETNAME=umdf1394vdev 14 | TARGETTYPE=DYNLINK 15 | 16 | USE_MSVCRT=1 17 | 18 | WIN32_WINNT_VERSION=$(LATEST_WIN32_WINNT_VERSION) 19 | _NT_TARGET_VERSION=$(_NT_TARGET_VERSION_WINXP) 20 | NTDDI_VERSION=$(LATEST_NTDDI_VERSION) 21 | 22 | # 23 | # Set the warning level high 24 | # 25 | 26 | MSC_WARNING_LEVEL=/W4 /WX 27 | 28 | #pragma warning( disable: 4201 ) // nonstandard extension used : nameless struct/union 29 | MSC_WARNING_LEVEL=$(MSC_WARNING_LEVEL) /wd4201 30 | 31 | C_DEFINES = $(C_DEFINES) /D_UNICODE /DUNICODE 32 | 33 | DLLENTRY=_DllMainCRTStartup 34 | DLLDEF=exports.def 35 | 36 | INCLUDES=$(INCLUDES); \ 37 | $(DDK_INC_PATH)\wdm; \ 38 | $(DDK_INC_PATH)\wdf\kmdf\10;\ 39 | ..\inc; \ 40 | ..\..\inc 41 | 42 | SOURCES=\ 43 | umdf_vdev.rc \ 44 | umdf_vdev_dll.cpp \ 45 | umdf_vdev_com.cpp \ 46 | umdf_vdev_driver.cpp \ 47 | umdf_vdev_device.cpp \ 48 | umdf_vdev_sequentialqueue.cpp \ 49 | umdf_vdev_parallelqueue.cpp 50 | 51 | TARGETLIBS=\ 52 | $(SDK_LIB_PATH)\strsafe.lib \ 53 | $(SDK_LIB_PATH)\kernel32.lib \ 54 | $(SDK_LIB_PATH)\advapi32.lib 55 | 56 | 57 | 58 | # 59 | # This sets up the WPP preprocessor and tells it to scan umdf_vdev.h to find 60 | # the trace function definition that's in there. 61 | # 62 | 63 | RUN_WPP= $(SOURCES) -dll -scan:umdf_vdev.h 64 | 65 | 66 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/umdf/umdf_vdev.h: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (C) Microsoft Corporation, All Rights Reserved 4 | 5 | Module Name: 6 | 7 | umdf_vdev.h 8 | 9 | Abstract: 10 | 11 | This module contains the local type definitions for the UMDF 1394 12 | virtual device driver sample. 13 | 14 | Environment: 15 | 16 | Windows User-Mode Driver Framework (WUDF) 17 | 18 | --*/ 19 | 20 | #pragma once 21 | 22 | #ifndef _UMDF_VDEV_H_ 23 | #define _UMDF_VDEV_H_ 24 | 25 | #ifndef ARRAY_SIZE 26 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) 27 | #endif 28 | 29 | #include 30 | #include 31 | 32 | // 33 | // Forward definitions of classes in the other header files. 34 | // 35 | 36 | typedef class CUmdfVDev *PCUmdfVDev; 37 | typedef class CVDevDevice *PCVDevDevice; 38 | 39 | typedef class CVDevSequentialQueue *PCVDevSequentialQueue; 40 | typedef class CVDevParallelQueue *PCVDevParallelQueue; 41 | 42 | // 43 | // Define the tracing flags. 44 | // 45 | 46 | #define WPP_CONTROL_GUIDS \ 47 | WPP_DEFINE_CONTROL_GUID ( \ 48 | Wudf1394VdevTraceGuid, (a155e98e, 147b, 4481, 9f1c, efa63eed7ced), \ 49 | \ 50 | WPP_DEFINE_BIT(MYDRIVER_ALL_INFO) \ 51 | WPP_DEFINE_BIT(TEST_TRACE_DRIVER) \ 52 | WPP_DEFINE_BIT(TEST_TRACE_DEVICE) \ 53 | WPP_DEFINE_BIT(TEST_TRACE_QUEUE) \ 54 | ) 55 | 56 | #define WPP_FLAG_LEVEL_LOGGER(flag, level) \ 57 | WPP_LEVEL_LOGGER(flag) 58 | 59 | #define WPP_FLAG_LEVEL_ENABLED(flag, level) \ 60 | (WPP_LEVEL_ENABLED(flag) && \ 61 | WPP_CONTROL(WPP_BIT_ ## flag).Level >= level) 62 | 63 | #define WPP_LEVEL_FLAGS_LOGGER(lvl,flags) \ 64 | WPP_LEVEL_LOGGER(flags) 65 | 66 | #define WPP_LEVEL_FLAGS_ENABLED(lvl, flags) \ 67 | (WPP_LEVEL_ENABLED(flags) && WPP_CONTROL(WPP_BIT_ ## flags).Level >= lvl) 68 | 69 | // 70 | // This comment block is scanned by the trace preprocessor to define our 71 | // Trace function. 72 | // 73 | // begin_wpp config 74 | // FUNC Trace{FLAG=MYDRIVER_ALL_INFO}(LEVEL, MSG, ...); 75 | // FUNC TraceEvents(LEVEL, FLAGS, MSG, ...); 76 | // end_wpp 77 | // 78 | #define MYDRIVER_TRACING_ID L"Microsoft\\UMDF\\umdf1394vdev" 79 | #define MYDRIVER_CLASS_ID {0xd202f373, 0x3aae, 0x45ee, {0xae, 0x73, 0x45, 0x76, 0x6c, 0xef, 0x14, 0xb4}} 80 | 81 | __forceinline 82 | #ifdef _PREFAST_ 83 | __declspec(noreturn) 84 | 85 | #endif 86 | VOID 87 | WdfTestNoReturn ( 88 | VOID) 89 | { 90 | // do nothing. 91 | } 92 | 93 | #define WUDF_TEST_DRIVER_ASSERT(p) \ 94 | { \ 95 | if ( !(p) ) \ 96 | { \ 97 | DebugBreak (); \ 98 | WdfTestNoReturn (); \ 99 | } \ 100 | } 101 | 102 | #define SAFE_RELEASE(p) \ 103 | { \ 104 | if ((p)) \ 105 | { \ 106 | (p)->Release(); \ 107 | (p) = NULL; \ 108 | } \ 109 | } 110 | 111 | 112 | #include "umdf_vdev_com.h" 113 | #include "umdf_vdev_driver.h" 114 | #include "umdf_vdev_device.h" 115 | #include "umdf_vdev_parallelqueue.h" 116 | #include "umdf_vdev_sequentialqueue.h" 117 | 118 | #endif 119 | 120 | 121 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/umdf/umdf_vdev.rc: -------------------------------------------------------------------------------- 1 | ///--------------------------------------------------------------------------- 2 | // OsrUsbDevice.rc 3 | // 4 | // Copyright (c) Microsoft Corporation, All Rights Reserved 5 | //--------------------------------------------------------------------------- 6 | 7 | 8 | #include 9 | #include 10 | 11 | // 12 | // TODO: Change the file description and file names to match your binary. 13 | // 14 | 15 | #define VER_FILETYPE VFT_DLL 16 | #define VER_FILESUBTYPE VFT_UNKNOWN 17 | #define VER_FILEDESCRIPTION_STR "WDF:UMDF 1394 Virtual Device driver sample" 18 | #define VER_INTERNALNAME_STR "umdf1394vdev" 19 | #define VER_ORIGINALFILENAME_STR "umdf1394vdev.dll" 20 | 21 | #include "common.ver" 22 | 23 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/umdf/umdf_vdev_com.h: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (C) Microsoft Corporation, All Rights Reserved 4 | 5 | Module Name: 6 | 7 | umdf_vdev_com.h 8 | 9 | Abstract: 10 | 11 | This module contains classes and functions use for providing COM support 12 | code. 13 | 14 | Environment: 15 | 16 | Windows User-Mode Driver Framework (WUDF) 17 | 18 | 19 | 20 | --*/ 21 | 22 | #pragma once 23 | 24 | // 25 | // Forward type declarations. They are here rather than in umdf_vdev as 26 | // you only need them if you choose to use these support classes. 27 | // 28 | 29 | typedef class CUnknown *PCUnknown; 30 | typedef class CClassFactory *PCClassFactory; 31 | 32 | // 33 | // Base class to implement IUnknown. You can choose to derive your COM 34 | // classes from this class, or simply implement IUnknown in each of your 35 | // classes. 36 | // 37 | 38 | class CUnknown : public IUnknown 39 | { 40 | 41 | // 42 | // Private data members and methods. These are only accessible by the methods 43 | // of this class. 44 | // 45 | private: 46 | 47 | // 48 | // The reference count for this object. Initialized to 1 in the 49 | // constructor. 50 | // 51 | 52 | LONG m_ReferenceCount; 53 | 54 | // 55 | // Protected data members and methods. These are accessible by the subclasses 56 | // but not by other classes. 57 | // 58 | protected: 59 | 60 | // 61 | // The constructor and destructor are protected to ensure that only the 62 | // subclasses of CUnknown can create and destroy instances. 63 | // 64 | 65 | CUnknown ( 66 | VOID); 67 | 68 | // 69 | // The destructor MUST be virtual. Since any instance of a CUnknown 70 | // derived class should only be deleted from within CUnknown::Release, 71 | // the destructor MUST be virtual or only CUnknown::~CUnknown will get 72 | // invoked on deletion. 73 | // 74 | // If you see that your CVDevDevice specific destructor is never being 75 | // called, make sure you haven't deleted the virtual destructor here. 76 | // 77 | 78 | virtual 79 | ~CUnknown ( 80 | VOID) 81 | { 82 | // Do nothing 83 | } 84 | 85 | // 86 | // Public Methods. These are accessible by any class. 87 | // 88 | public: 89 | 90 | IUnknown * 91 | QueryIUnknown ( 92 | VOID); 93 | 94 | // 95 | // COM Methods. 96 | // 97 | public: 98 | 99 | // 100 | // IUnknown methods 101 | // 102 | 103 | virtual 104 | ULONG 105 | STDMETHODCALLTYPE 106 | AddRef ( 107 | VOID); 108 | 109 | virtual 110 | ULONG 111 | STDMETHODCALLTYPE 112 | Release ( 113 | VOID); 114 | 115 | virtual 116 | HRESULT 117 | STDMETHODCALLTYPE 118 | QueryInterface ( 119 | __in REFIID InterfaceId, 120 | __deref_out PVOID *Object); 121 | }; 122 | 123 | 124 | // 125 | // Class factory support class. Create an instance of this from your 126 | // DllGetClassObject method and modify the implementation to create 127 | // an instance of your driver event handler class. 128 | // 129 | 130 | class CClassFactory : public CUnknown, public IClassFactory 131 | { 132 | // 133 | // Private data members and methods. These are only accessible by the methods 134 | // of this class. 135 | // 136 | private: 137 | 138 | // 139 | // The lock count. This is shared across all instances of IClassFactory 140 | // and can be queried through the public IsLocked method. 141 | // 142 | 143 | static LONG s_LockCount; 144 | 145 | // 146 | // Public Methods. These are accessible by any class. 147 | // 148 | public: 149 | 150 | IClassFactory * 151 | QueryIClassFactory( 152 | VOID 153 | ); 154 | 155 | // 156 | // COM Methods. 157 | // 158 | public: 159 | 160 | // 161 | // IUnknown methods 162 | // 163 | 164 | virtual 165 | ULONG 166 | STDMETHODCALLTYPE 167 | AddRef ( 168 | VOID) 169 | { 170 | return __super::AddRef(); 171 | } 172 | 173 | __drv_arg(this, __drv_freesMem(object)) 174 | virtual 175 | ULONG 176 | STDMETHODCALLTYPE 177 | Release ( 178 | VOID) 179 | { 180 | return __super::Release(); 181 | } 182 | 183 | virtual 184 | HRESULT 185 | STDMETHODCALLTYPE 186 | QueryInterface ( 187 | __in REFIID InterfaceId, 188 | __deref_out PVOID *Object); 189 | 190 | // 191 | // IClassFactory methods. 192 | // 193 | 194 | virtual 195 | HRESULT 196 | STDMETHODCALLTYPE 197 | CreateInstance ( 198 | __in_opt IUnknown *OuterObject, 199 | __in REFIID InterfaceId, 200 | __out PVOID *Object); 201 | 202 | virtual 203 | HRESULT 204 | STDMETHODCALLTYPE 205 | LockServer ( 206 | __in BOOL Lock); 207 | }; 208 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/umdf/umdf_vdev_device.h: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (C) Microsoft Corporation, All Rights Reserved 4 | 5 | Module Name: 6 | 7 | umdf_vdev_device.h 8 | 9 | Abstract: 10 | 11 | This module contains the type definitions for the 1394 vdev hybrid sample 12 | driver's device callback class. 13 | 14 | Environment: 15 | 16 | Windows User-Mode Driver Framework (WUDF) 17 | 18 | 19 | --*/ 20 | 21 | 22 | #pragma once 23 | 24 | #include "umdf_vdev.h" 25 | 26 | 27 | class CVDevDevice : 28 | public CUnknown, 29 | public IPnpCallbackHardware 30 | { 31 | 32 | protected: 33 | 34 | // 35 | // Weak reference to the FX device 36 | // 37 | IWDFDevice * m_FxDevice; 38 | 39 | // 40 | // Weak reference to the Parallel Queue 41 | // 42 | PCVDevParallelQueue m_ParallelQueue; 43 | 44 | // 45 | // Weak reference to the Sequential Queue. 46 | // 47 | PCVDevSequentialQueue m_SequentialQueue; 48 | 49 | 50 | private: 51 | 52 | CVDevDevice (VOID) : 53 | m_FxDevice (NULL), 54 | m_SequentialQueue (NULL), 55 | m_ParallelQueue (NULL) 56 | { 57 | } 58 | 59 | ~CVDevDevice(); 60 | 61 | 62 | HRESULT 63 | Initialize ( 64 | __in IWDFDriver * FxDriver, 65 | __in IWDFDeviceInitialize * FxDeviceInit); 66 | 67 | public: 68 | 69 | static 70 | HRESULT 71 | CreateInstance ( 72 | __in IWDFDriver * FxDriver, 73 | __in IWDFDeviceInitialize * FxDeviceInit, 74 | __out PCVDevDevice * Device); 75 | 76 | IWDFDevice * 77 | GetFxDevice (VOID) 78 | { 79 | return m_FxDevice; 80 | } 81 | 82 | PCVDevSequentialQueue 83 | GetSequentialQueue (VOID) 84 | { 85 | return m_SequentialQueue; 86 | } 87 | 88 | HRESULT 89 | Configure (VOID); 90 | 91 | 92 | IPnpCallbackHardware * 93 | HardwareCallback (VOID) 94 | { 95 | AddRef (); 96 | return static_cast (this); 97 | } 98 | 99 | 100 | virtual 101 | ULONG 102 | STDMETHODCALLTYPE 103 | AddRef (VOID) 104 | { 105 | return __super::AddRef (); 106 | } 107 | 108 | __drv_arg(this, __drv_freesMem(object)) 109 | virtual 110 | ULONG 111 | STDMETHODCALLTYPE 112 | Release (VOID) 113 | { 114 | return __super::Release (); 115 | } 116 | 117 | virtual 118 | HRESULT 119 | STDMETHODCALLTYPE 120 | QueryInterface ( 121 | __in REFIID InterfaceId, 122 | __deref_out PVOID * Object); 123 | 124 | virtual 125 | HRESULT 126 | STDMETHODCALLTYPE 127 | OnReleaseHardware ( 128 | __in IWDFDevice * wdfDevice); 129 | 130 | virtual 131 | HRESULT 132 | STDMETHODCALLTYPE 133 | OnPrepareHardware ( 134 | __in IWDFDevice * wdfDevice) 135 | { 136 | UNREFERENCED_PARAMETER (wdfDevice); 137 | // 138 | // We don't really need to do anything here, but to 139 | // we have to invoke this method to get the OnReleaseHardware functionality. 140 | // 141 | return S_OK; 142 | } 143 | }; 144 | 145 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/umdf/umdf_vdev_driver.h: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (C) Microsoft Corporation, All Rights Reserved 4 | 5 | Module Name: 6 | 7 | Driver.h 8 | 9 | Abstract: 10 | 11 | This module contains the type definitions for the UMDF Skeleton sample's 12 | driver callback class. 13 | 14 | Environment: 15 | 16 | Windows User-Mode Driver Framework (WUDF) 17 | 18 | 19 | --*/ 20 | 21 | #pragma once 22 | 23 | // 24 | // This class handles driver events for the skeleton sample. In particular 25 | // it supports the OnDeviceAdd event, which occurs when the driver is called 26 | // to setup per-device handlers for a new device stack. 27 | // 28 | 29 | class CUmdfVDev : public CUnknown, public IDriverEntry 30 | { 31 | // 32 | // Private data members. 33 | // 34 | private: 35 | 36 | // 37 | // Private methods. 38 | // 39 | private: 40 | 41 | // 42 | // Returns a refernced pointer to the IDriverEntry interface. 43 | // 44 | 45 | IDriverEntry * 46 | QueryIDriverEntry (VOID) 47 | { 48 | AddRef(); 49 | return static_cast(this); 50 | } 51 | 52 | HRESULT 53 | Initialize (VOID); 54 | 55 | // 56 | // Public methods 57 | // 58 | public: 59 | 60 | // 61 | // The factory method used to create an instance of this driver. 62 | // 63 | 64 | static 65 | HRESULT 66 | CreateInstance ( 67 | __out PCUmdfVDev *Driver); 68 | 69 | // 70 | // COM methods 71 | // 72 | public: 73 | 74 | // 75 | // IDriverEntry methods 76 | // 77 | 78 | virtual 79 | HRESULT 80 | STDMETHODCALLTYPE 81 | OnInitialize ( 82 | __in IWDFDriver *FxWdfDriver) 83 | { 84 | UNREFERENCED_PARAMETER(FxWdfDriver); 85 | 86 | return S_OK; 87 | } 88 | 89 | virtual 90 | HRESULT 91 | STDMETHODCALLTYPE 92 | OnDeviceAdd ( 93 | __in IWDFDriver *FxWdfDriver, 94 | __in IWDFDeviceInitialize *FxDeviceInit); 95 | 96 | virtual 97 | VOID 98 | STDMETHODCALLTYPE 99 | OnDeinitialize ( 100 | __in IWDFDriver *FxWdfDriver) 101 | { 102 | UNREFERENCED_PARAMETER(FxWdfDriver); 103 | 104 | return; 105 | } 106 | 107 | // 108 | // IUnknown methods. 109 | // 110 | // We have to implement basic ones here that redirect to the 111 | // base class becuase of the multiple inheritance. 112 | // 113 | 114 | virtual 115 | ULONG 116 | STDMETHODCALLTYPE 117 | AddRef (VOID) 118 | { 119 | return __super::AddRef(); 120 | } 121 | 122 | __drv_arg(this, __drv_freesMem(object)) 123 | virtual 124 | ULONG 125 | STDMETHODCALLTYPE 126 | Release (VOID) 127 | { 128 | return __super::Release(); 129 | } 130 | 131 | virtual 132 | HRESULT 133 | STDMETHODCALLTYPE 134 | QueryInterface( 135 | __in REFIID InterfaceId, 136 | __deref_out PVOID *Object 137 | ); 138 | }; 139 | 140 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/umdf/umdf_vdev_parallelqueue.h: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (c) Microsoft Corporation, All Rights Reserved 4 | 5 | Module Name: 6 | 7 | umdf_vdev_parallelqueue.h 8 | 9 | Abstract: 10 | 11 | This file defines the queue callback object for handling parallel device I/O 12 | control requests. 13 | 14 | Environment: 15 | 16 | Windows User-Mode Driver Framework (WUDF) 17 | 18 | 19 | --*/ 20 | 21 | #pragma once 22 | 23 | class CVDevParallelQueue : 24 | public CUnknown, 25 | public IQueueCallbackDeviceIoControl, 26 | public IRequestCallbackRequestCompletion 27 | { 28 | 29 | private: 30 | 31 | // 32 | // Weak reference to the critical section object 33 | // 34 | CRITICAL_SECTION m_Crit; 35 | 36 | // 37 | // Weak reference to queue object 38 | // 39 | IWDFIoQueue * m_FxQueue; 40 | 41 | // 42 | // Reference to the FX device class 43 | // 44 | IWDFDevice * m_FxDevice; 45 | 46 | // 47 | // Reference to our Device Class 48 | // 49 | PCVDevDevice m_VdevDevice; 50 | 51 | HRESULT 52 | Initialize(); 53 | 54 | __inline 55 | void 56 | Lock () 57 | { 58 | ::EnterCriticalSection (&m_Crit); 59 | } 60 | 61 | __inline 62 | void 63 | Unlock () 64 | { 65 | ::LeaveCriticalSection (&m_Crit); 66 | } 67 | 68 | 69 | public: 70 | 71 | 72 | CVDevParallelQueue::CVDevParallelQueue ( 73 | PCVDevDevice VdevDevice, 74 | IWDFDevice * FxDevice) : 75 | m_FxDevice (FxDevice), 76 | m_FxQueue (NULL), 77 | m_VdevDevice (VdevDevice) 78 | { 79 | 80 | } 81 | 82 | virtual ~CVDevParallelQueue (); 83 | 84 | IWDFIoQueue * 85 | GetFxQueue ( 86 | VOID) 87 | { 88 | return m_FxQueue; 89 | } 90 | 91 | IWDFDevice * 92 | GetFxDevice ( 93 | VOID) 94 | { 95 | return m_FxDevice; 96 | } 97 | 98 | static 99 | HRESULT 100 | CreateInstance ( 101 | __in PCVDevDevice Device, 102 | __in IWDFDevice * FxDevice, 103 | __out PCVDevParallelQueue *Queue); 104 | 105 | HRESULT 106 | Configure ( 107 | VOID) 108 | { 109 | return S_OK; 110 | } 111 | 112 | IQueueCallbackDeviceIoControl * 113 | DeviceIoControl ( 114 | VOID) 115 | { 116 | AddRef(); 117 | return static_cast(this); 118 | } 119 | 120 | 121 | IRequestCallbackRequestCompletion * 122 | RequestCompletion ( 123 | VOID) 124 | { 125 | AddRef(); 126 | return static_cast (this); 127 | } 128 | 129 | 130 | virtual 131 | ULONG 132 | STDMETHODCALLTYPE 133 | AddRef (VOID) 134 | { 135 | return CUnknown::AddRef(); 136 | } 137 | 138 | __drv_arg(this, __drv_freesMem(object)) 139 | virtual 140 | ULONG 141 | STDMETHODCALLTYPE 142 | Release (VOID) 143 | { 144 | return CUnknown::Release(); 145 | } 146 | 147 | virtual 148 | HRESULT 149 | STDMETHODCALLTYPE 150 | QueryInterface ( 151 | __in REFIID InterfaceId, 152 | __out PVOID *Object); 153 | 154 | virtual 155 | VOID 156 | STDMETHODCALLTYPE 157 | OnDeviceIoControl ( 158 | __in IWDFIoQueue *pWdfQueue, 159 | __in IWDFIoRequest *pWdfRequest, 160 | __in ULONG ControlCode, 161 | __in SIZE_T InputBufferSizeInBytes, 162 | __in SIZE_T OutputBufferSizeInBytes); 163 | 164 | virtual 165 | VOID 166 | STDMETHODCALLTYPE 167 | OnCompletion ( 168 | __in IWDFIoRequest* pWdfRequest, 169 | __in IWDFIoTarget* pIoTarget, 170 | __in IWDFRequestCompletionParams* pParams, 171 | __in PVOID pContext); 172 | 173 | virtual 174 | void 175 | STDMETHODCALLTYPE 176 | OnAllocateAddrRangeCompletion ( 177 | __in IWDFIoRequest * pWdfRequest, 178 | __in IWDFRequestCompletionParams* pParams); 179 | 180 | virtual 181 | VOID 182 | STDMETHODCALLTYPE 183 | OnFreeAddrRangeCompletion ( 184 | __in IWDFIoRequest * pWdfRequest, 185 | __in IWDFRequestCompletionParams* pParams); 186 | 187 | 188 | virtual 189 | HRESULT 190 | STDMETHODCALLTYPE 191 | SubmitAsyncRequestToLower ( 192 | __in IWDFIoRequest * Request); 193 | 194 | }; 195 | 196 | 197 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/umdf/umdf_vdev_sequentialqueue.h: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (c) Microsoft Corporation, All Rights Reserved 4 | 5 | Module Name: 6 | 7 | umdf_vdev_sequentialqueue.h 8 | 9 | Abstract: 10 | 11 | This file defines the queue callback object for handling serialized device I/O 12 | control requests. 13 | 14 | Environment: 15 | 16 | Windows User-Mode Driver Framework (WUDF) 17 | 18 | 19 | --*/ 20 | 21 | #pragma once 22 | 23 | class CVDevSequentialQueue : 24 | public CUnknown, 25 | public IQueueCallbackDeviceIoControl 26 | { 27 | 28 | private: 29 | 30 | // 31 | // Request input memory block 32 | // 33 | PVOID m_InputMemory; 34 | 35 | // 36 | // Request output memory block 37 | // 38 | PVOID m_OutputMemory; 39 | 40 | // 41 | // Weak reference to the critical section object 42 | // 43 | CRITICAL_SECTION m_Crit; 44 | 45 | // 46 | // Weak reference to queue object 47 | // 48 | IWDFIoQueue * m_FxQueue; 49 | 50 | // 51 | // Reference to the device class 52 | // 53 | IWDFDevice * m_FxDevice; 54 | 55 | // 56 | // Reference to the Lower IO Target 57 | // 58 | IWDFIoTarget * m_kmdfIoTarget; 59 | 60 | HRESULT 61 | Initialize(); 62 | 63 | __inline 64 | void 65 | Lock () 66 | { 67 | ::EnterCriticalSection(&m_Crit); 68 | } 69 | 70 | __inline 71 | void 72 | Unlock () 73 | { 74 | ::LeaveCriticalSection(&m_Crit); 75 | } 76 | 77 | public: 78 | 79 | 80 | CVDevSequentialQueue::CVDevSequentialQueue ( 81 | IWDFDevice * FxDevice): 82 | m_FxDevice(FxDevice) 83 | { 84 | } 85 | 86 | CVDevSequentialQueue::~CVDevSequentialQueue() 87 | { 88 | DeleteCriticalSection (&this->m_Crit); 89 | } 90 | 91 | IWDFIoQueue * 92 | GetFxQueue ( 93 | VOID) 94 | { 95 | return m_FxQueue; 96 | } 97 | 98 | 99 | IWDFDevice * 100 | GetFxDevice ( 101 | VOID) 102 | { 103 | return m_FxDevice; 104 | } 105 | 106 | static 107 | HRESULT 108 | CreateInstance ( 109 | __in PCVDevDevice Device, 110 | __in IWDFDevice * FxDevice, 111 | __out PCVDevSequentialQueue *Queue); 112 | 113 | 114 | 115 | IQueueCallbackDeviceIoControl * 116 | DeviceIoControl (VOID) 117 | { 118 | AddRef(); 119 | return static_cast(this); 120 | } 121 | 122 | 123 | virtual 124 | ULONG 125 | STDMETHODCALLTYPE 126 | AddRef (VOID) 127 | { 128 | return CUnknown::AddRef(); 129 | } 130 | 131 | __drv_arg(this, __drv_freesMem(object)) 132 | virtual 133 | ULONG 134 | STDMETHODCALLTYPE 135 | Release (VOID) 136 | { 137 | return CUnknown::Release(); 138 | } 139 | 140 | virtual 141 | HRESULT 142 | STDMETHODCALLTYPE 143 | QueryInterface ( 144 | __in REFIID InterfaceId, 145 | __out PVOID *Object); 146 | 147 | virtual 148 | VOID 149 | STDMETHODCALLTYPE 150 | OnDeviceIoControl ( 151 | __in IWDFIoQueue *pWdfQueue, 152 | __in IWDFIoRequest *pWdfRequest, 153 | __in ULONG ControlCode, 154 | __in SIZE_T InputBufferSizeInBytes, 155 | __in SIZE_T OutputBufferSizeInBytes); 156 | 157 | 158 | virtual 159 | HRESULT 160 | STDMETHODCALLTYPE 161 | SubmitRequestToLower ( 162 | __in IWDFIoRequest * Request); 163 | }; 164 | 165 | 166 | -------------------------------------------------------------------------------- /05/1394_kmdf/vdev_hybrid/wdf1394vdev.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/05/1394_kmdf/vdev_hybrid/wdf1394vdev.htm -------------------------------------------------------------------------------- /05/读我.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/05/读我.txt -------------------------------------------------------------------------------- /06/Common/IoCtl.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/Common/IoCtl.h -------------------------------------------------------------------------------- /06/Common/NewDelete.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/Common/NewDelete.h -------------------------------------------------------------------------------- /06/Common/Structure.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/Common/Structure.h -------------------------------------------------------------------------------- /06/Common/public.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/Common/public.h -------------------------------------------------------------------------------- /06/UsbBaseClass/DrvClass.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/UsbBaseClass/DrvClass.cpp -------------------------------------------------------------------------------- /06/UsbBaseClass/DrvClass.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/UsbBaseClass/DrvClass.h -------------------------------------------------------------------------------- /06/UsbBaseClass/Main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/UsbBaseClass/Main.cpp -------------------------------------------------------------------------------- /06/UsbBaseClass/UsbBaseClass.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 15 | 16 | 17 | 18 | 19 | 26 | 39 | 40 | 47 | 60 | 61 | 62 | 63 | 64 | 65 | 70 | 73 | 74 | 77 | 78 | 81 | 82 | 83 | 88 | 91 | 92 | 93 | 98 | 99 | 102 | 103 | 106 | 107 | 110 | 111 | 112 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /06/UsbBaseClass/class.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/UsbBaseClass/class.cpp -------------------------------------------------------------------------------- /06/UsbBaseClass/makefile: -------------------------------------------------------------------------------- 1 | # 2 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 3 | # file to this component. This file merely indirects to the real make file 4 | # that is shared by all the driver components of the Windows NT DDK 5 | # 6 | 7 | !INCLUDE $(NTMAKEENV)\makefile.def 8 | 9 | 10 | -------------------------------------------------------------------------------- /06/UsbBaseClass/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/UsbBaseClass/readme.txt -------------------------------------------------------------------------------- /06/UsbBaseClass/sources: -------------------------------------------------------------------------------- 1 | TARGETNAME=CY001 2 | TARGETTYPE=DRIVER 3 | 4 | MSC_WARNING_LEVEL=/W0 5 | NO_BINPLACE=1 6 | KMDF_VERSION=1 7 | 8 | TARGETLIBS = $(DDK_LIB_PATH)\usbd.lib 9 | INCLUDES = ..\common 10 | 11 | SOURCES=Main.cpp\ 12 | DrvClass.cpp\ 13 | class.cpp 14 | -------------------------------------------------------------------------------- /06/WDF_CY001/CY001.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 15 | 16 | 17 | 18 | 19 | 26 | 39 | 40 | 47 | 60 | 61 | 62 | 63 | 64 | 65 | 70 | 73 | 74 | 77 | 78 | 81 | 82 | 85 | 86 | 89 | 90 | 93 | 94 | 97 | 98 | 101 | 102 | 105 | 106 | 107 | 112 | 115 | 116 | 119 | 120 | 123 | 124 | 127 | 128 | 131 | 132 | 133 | 138 | 139 | 142 | 143 | 146 | 147 | 150 | 151 | 152 | 153 | 154 | 155 | -------------------------------------------------------------------------------- /06/WDF_CY001/CY001Drv.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/WDF_CY001/CY001Drv.cpp -------------------------------------------------------------------------------- /06/WDF_CY001/CY001Drv.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/WDF_CY001/CY001Drv.h -------------------------------------------------------------------------------- /06/WDF_CY001/Debug.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/WDF_CY001/Debug.c -------------------------------------------------------------------------------- /06/WDF_CY001/Device.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/WDF_CY001/Device.cpp -------------------------------------------------------------------------------- /06/WDF_CY001/DeviceIO.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/WDF_CY001/DeviceIO.cpp -------------------------------------------------------------------------------- /06/WDF_CY001/DrvClass.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/WDF_CY001/DrvClass.cpp -------------------------------------------------------------------------------- /06/WDF_CY001/DrvClass.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/WDF_CY001/DrvClass.h -------------------------------------------------------------------------------- /06/WDF_CY001/Main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/WDF_CY001/Main.cpp -------------------------------------------------------------------------------- /06/WDF_CY001/NewDelete.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/WDF_CY001/NewDelete.h -------------------------------------------------------------------------------- /06/WDF_CY001/Pnp_Pwr.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/WDF_CY001/Pnp_Pwr.cpp -------------------------------------------------------------------------------- /06/WDF_CY001/ReadWrite.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/WDF_CY001/ReadWrite.cpp -------------------------------------------------------------------------------- /06/WDF_CY001/Util.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/WDF_CY001/Util.cpp -------------------------------------------------------------------------------- /06/WDF_CY001/makefile: -------------------------------------------------------------------------------- 1 | # 2 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 3 | # file to this component. This file merely indirects to the real make file 4 | # that is shared by all the driver components of the Windows NT DDK 5 | # 6 | 7 | !INCLUDE $(NTMAKEENV)\makefile.def 8 | 9 | 10 | -------------------------------------------------------------------------------- /06/WDF_CY001/public.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/WDF_CY001/public.h -------------------------------------------------------------------------------- /06/WDF_CY001/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/WDF_CY001/readme.txt -------------------------------------------------------------------------------- /06/WDF_CY001/sources: -------------------------------------------------------------------------------- 1 | TARGETNAME=CY001 2 | TARGETTYPE=DRIVER 3 | 4 | MSC_WARNING_LEVEL=/W0 5 | 6 | INCLUDES = .\ 7 | 8 | NO_BINPLACE=1 9 | 10 | KMDF_VERSION=1 11 | 12 | TARGETLIBS = $(DDK_LIB_PATH)\usbd.lib 13 | INCLUDES = ..\common 14 | 15 | SOURCES=Main.cpp\ 16 | DrvClass.cpp\ 17 | CY001Drv.cpp\ 18 | Util.cpp\ 19 | ReadWrite.cpp\ 20 | DeviceIO.cpp 21 | -------------------------------------------------------------------------------- /06/WDF_CY001/subClass.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /06/WDM/MAKEFILE: -------------------------------------------------------------------------------- 1 | !INCLUDE $(NTMAKEENV)\makefile.def 2 | 3 | -------------------------------------------------------------------------------- /06/WDM/SOURCES: -------------------------------------------------------------------------------- 1 | TARGETNAME = WDM++ 2 | TARGETTYPE = DRIVER 3 | TARGETPATH = OBJ 4 | 5 | SOURCES = wdm++.cpp 6 | 7 | -------------------------------------------------------------------------------- /06/WDM/SRVINSTW.EXE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/WDM/SRVINSTW.EXE -------------------------------------------------------------------------------- /06/WDM/WDM++.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/WDM/WDM++.cpp -------------------------------------------------------------------------------- /06/WDM/读我.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/WDM/读我.txt -------------------------------------------------------------------------------- /06/simClass/Main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/simClass/Main.cpp -------------------------------------------------------------------------------- /06/simClass/makefile: -------------------------------------------------------------------------------- 1 | # 2 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 3 | # file to this component. This file merely indirects to the real make file 4 | # that is shared by all the driver components of the Windows NT DDK 5 | # 6 | 7 | !INCLUDE $(NTMAKEENV)\makefile.def 8 | 9 | 10 | -------------------------------------------------------------------------------- /06/simClass/readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/06/simClass/readme.txt -------------------------------------------------------------------------------- /06/simClass/simClass.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 15 | 16 | 17 | 18 | 19 | 26 | 39 | 40 | 47 | 60 | 61 | 62 | 63 | 64 | 65 | 70 | 73 | 74 | 75 | 78 | 79 | 82 | 83 | 86 | 87 | 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /06/simClass/sources: -------------------------------------------------------------------------------- 1 | TARGETNAME=SimClass 2 | TARGETTYPE=DRIVER 3 | 4 | SOURCES=Main.cpp 5 | -------------------------------------------------------------------------------- /09/inverted_call/AppDrv.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="AppDrv" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) External Target" 0x0106 6 | 7 | CFG=AppDrv - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "AppDrv.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "AppDrv.mak" CFG="AppDrv - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "AppDrv - Win32 Release" (based on "Win32 (x86) External Target") 21 | !MESSAGE "AppDrv - Win32 Debug" (based on "Win32 (x86) External Target") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "" 27 | # PROP Scc_LocalPath "" 28 | 29 | !IF "$(CFG)" == "AppDrv - Win32 Release" 30 | 31 | # PROP BASE Use_MFC 32 | # PROP BASE Use_Debug_Libraries 0 33 | # PROP BASE Output_Dir "Release" 34 | # PROP BASE Intermediate_Dir "Release" 35 | # PROP BASE Cmd_Line "NMAKE /f AppDrv.mak" 36 | # PROP BASE Rebuild_Opt "/a" 37 | # PROP BASE Target_File "AppDrv.exe" 38 | # PROP BASE Bsc_Name "AppDrv.bsc" 39 | # PROP BASE Target_Dir "" 40 | # PROP Use_MFC 41 | # PROP Use_Debug_Libraries 0 42 | # PROP Output_Dir "Release" 43 | # PROP Intermediate_Dir "Release" 44 | # PROP Cmd_Line "e:\ddkbuild\ddkbuild -WXP fre ." 45 | # PROP Rebuild_Opt "-cZ" 46 | # PROP Target_File "AppDrv.exe" 47 | # PROP Bsc_Name "" 48 | # PROP Target_Dir "" 49 | 50 | !ELSEIF "$(CFG)" == "AppDrv - Win32 Debug" 51 | 52 | # PROP BASE Use_MFC 53 | # PROP BASE Use_Debug_Libraries 1 54 | # PROP BASE Output_Dir "Debug" 55 | # PROP BASE Intermediate_Dir "Debug" 56 | # PROP BASE Cmd_Line "NMAKE /f AppDrv.mak" 57 | # PROP BASE Rebuild_Opt "/a" 58 | # PROP BASE Target_File "AppDrv.exe" 59 | # PROP BASE Bsc_Name "AppDrv.bsc" 60 | # PROP BASE Target_Dir "" 61 | # PROP Use_MFC 62 | # PROP Use_Debug_Libraries 1 63 | # PROP Output_Dir "Debug" 64 | # PROP Intermediate_Dir "Debug" 65 | # PROP Cmd_Line "e:\ddkbuild\ddkbuild -WNETXP chk ." 66 | # PROP Rebuild_Opt "-cZ" 67 | # PROP Target_File "AppDrv.exe" 68 | # PROP Bsc_Name "" 69 | # PROP Target_Dir "" 70 | 71 | !ENDIF 72 | 73 | # Begin Target 74 | 75 | # Name "AppDrv - Win32 Release" 76 | # Name "AppDrv - Win32 Debug" 77 | 78 | !IF "$(CFG)" == "AppDrv - Win32 Release" 79 | 80 | !ELSEIF "$(CFG)" == "AppDrv - Win32 Debug" 81 | 82 | !ENDIF 83 | 84 | # Begin Group "Source Files" 85 | 86 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" 87 | # End Group 88 | # Begin Group "Header Files" 89 | 90 | # PROP Default_Filter "h;hpp;hxx;hm;inl" 91 | # End Group 92 | # Begin Group "Resource Files" 93 | 94 | # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" 95 | # End Group 96 | # Begin Group "Build Files" 97 | 98 | # PROP Default_Filter "" 99 | # Begin Source File 100 | 101 | SOURCE=.\DIRS 102 | # End Source File 103 | # End Group 104 | # End Target 105 | # End Project 106 | -------------------------------------------------------------------------------- /09/inverted_call/AppDrv.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "AppDrv"=.\AppDrv.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Project: "AppSrv"=.\SERVICE\AppSrv.dsp - Package Owner=<4> 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<4> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | Project: "Driver"=.\Driver\Driver.dsp - Package Owner=<4> 31 | 32 | Package=<5> 33 | {{{ 34 | }}} 35 | 36 | Package=<4> 37 | {{{ 38 | }}} 39 | 40 | ############################################################################### 41 | 42 | Project: "TestApp"=.\TestApp\TestApp.dsp - Package Owner=<4> 43 | 44 | Package=<5> 45 | {{{ 46 | }}} 47 | 48 | Package=<4> 49 | {{{ 50 | }}} 51 | 52 | ############################################################################### 53 | 54 | Global: 55 | 56 | Package=<5> 57 | {{{ 58 | }}} 59 | 60 | Package=<3> 61 | {{{ 62 | }}} 63 | 64 | ############################################################################### 65 | 66 | -------------------------------------------------------------------------------- /09/inverted_call/DIRS: -------------------------------------------------------------------------------- 1 | DIRS=driver service 2 | -------------------------------------------------------------------------------- /09/inverted_call/TestApp/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by TestApp.rc 4 | // 5 | #define IDS_HELLO 1 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 101 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1000 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /09/inverted_call/TestApp/StdAfx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // TestApp.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /09/inverted_call/TestApp/StdAfx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #if !defined(AFX_STDAFX_H__49DC20FE_0F78_4BB5_8C9A_A498FCEB5F40__INCLUDED_) 7 | #define AFX_STDAFX_H__49DC20FE_0F78_4BB5_8C9A_A498FCEB5F40__INCLUDED_ 8 | 9 | #if _MSC_VER > 1000 10 | #pragma once 11 | #endif // _MSC_VER > 1000 12 | 13 | #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers 14 | 15 | #include 16 | #include // MFC core and standard components 17 | #include // MFC extensions 18 | #include // MFC support for Internet Explorer 4 Common Controls 19 | #ifndef _AFX_NO_AFXCMN_SUPPORT 20 | #include // MFC support for Windows Common Controls 21 | #endif // _AFX_NO_AFXCMN_SUPPORT 22 | 23 | #include 24 | 25 | // TODO: reference additional headers your program requires here 26 | 27 | //{{AFX_INSERT_LOCATION}} 28 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 29 | 30 | #endif // !defined(AFX_STDAFX_H__49DC20FE_0F78_4BB5_8C9A_A498FCEB5F40__INCLUDED_) 31 | -------------------------------------------------------------------------------- /09/inverted_call/TestApp/TestApp.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/09/inverted_call/TestApp/TestApp.aps -------------------------------------------------------------------------------- /09/inverted_call/TestApp/TestApp.clw: -------------------------------------------------------------------------------- 1 | ; CLW file contains information for the MFC ClassWizard 2 | 3 | [General Info] 4 | Version=1 5 | LastClass= 6 | LastTemplate=CDialog 7 | NewFileInclude1=#include "stdafx.h" 8 | NewFileInclude2=#include "TestApp.h" 9 | LastPage=0 10 | 11 | ClassCount=0 12 | 13 | ResourceCount=0 14 | 15 | -------------------------------------------------------------------------------- /09/inverted_call/TestApp/TestApp.cpp: -------------------------------------------------------------------------------- 1 | // TestApp.cpp : Defines the entry point for the console application. 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "TestApp.h" 6 | 7 | #ifdef _DEBUG 8 | #define new DEBUG_NEW 9 | #undef THIS_FILE 10 | static char THIS_FILE[] = __FILE__; 11 | #endif 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | // The one and only application object 15 | 16 | CWinApp theApp; 17 | 18 | using namespace std; 19 | 20 | int _tmain(int argc, TCHAR* argv[], TCHAR* envp[]) 21 | { 22 | int nRetCode = 0; 23 | HANDLE h = INVALID_HANDLE_VALUE; 24 | char dataBuffer[65535]; 25 | 26 | // initialize MFC and print and error on failure 27 | if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0)) 28 | { 29 | // TODO: change error code to suit your needs 30 | cerr << _T("Fatal Error: MFC initialization failed") << endl; 31 | nRetCode = 1; 32 | } 33 | else 34 | { 35 | // TODO: code your application's behavior here. 36 | CString strHello; 37 | strHello.LoadString(IDS_HELLO); 38 | cout << (LPCTSTR)strHello << endl; 39 | } 40 | 41 | h = CreateFile("\\\\.\\OSRcommData",GENERIC_READ|GENERIC_WRITE, 42 | NULL,NULL,OPEN_EXISTING, 43 | FILE_ATTRIBUTE_NORMAL,NULL); 44 | 45 | if(h == INVALID_HANDLE_VALUE) { 46 | 47 | nRetCode = GetLastError(); 48 | printf("Error opening Data Device. %d.\n",nRetCode); 49 | return nRetCode; 50 | 51 | } 52 | 53 | for(DWORD index = 0; index < 10; index++) { 54 | 55 | DWORD bytesWritten,bytesRead; 56 | 57 | memset(&dataBuffer[0],index,sizeof(dataBuffer)); 58 | 59 | if(!WriteFile(h,&dataBuffer[0],sizeof(dataBuffer),&bytesWritten,NULL)) { 60 | 61 | nRetCode = GetLastError(); 62 | CloseHandle(h); 63 | printf("Error Writing to Data Device. %d.\n",nRetCode); 64 | return nRetCode; 65 | 66 | } 67 | 68 | memset(&dataBuffer[0],index,sizeof(dataBuffer)); 69 | 70 | if(!ReadFile(h,&dataBuffer[0],sizeof(dataBuffer),&bytesRead,NULL)) { 71 | 72 | nRetCode = GetLastError(); 73 | CloseHandle(h); 74 | printf("Error Writing to Data Device. %d.\n",nRetCode); 75 | return nRetCode; 76 | 77 | } 78 | 79 | } 80 | 81 | 82 | CloseHandle(h); 83 | 84 | 85 | return nRetCode; 86 | } 87 | 88 | 89 | -------------------------------------------------------------------------------- /09/inverted_call/TestApp/TestApp.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="TestApp" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) Console Application" 0x0103 6 | 7 | CFG=TestApp - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "TestApp.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "TestApp.mak" CFG="TestApp - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "TestApp - Win32 Release" (based on "Win32 (x86) Console Application") 21 | !MESSAGE "TestApp - Win32 Debug" (based on "Win32 (x86) Console Application") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "" 27 | # PROP Scc_LocalPath "" 28 | CPP=cl.exe 29 | RSC=rc.exe 30 | 31 | !IF "$(CFG)" == "TestApp - Win32 Release" 32 | 33 | # PROP BASE Use_MFC 2 34 | # PROP BASE Use_Debug_Libraries 0 35 | # PROP BASE Output_Dir "Release" 36 | # PROP BASE Intermediate_Dir "Release" 37 | # PROP BASE Target_Dir "" 38 | # PROP Use_MFC 2 39 | # PROP Use_Debug_Libraries 0 40 | # PROP Output_Dir "Release" 41 | # PROP Intermediate_Dir "Release" 42 | # PROP Target_Dir "" 43 | # ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c 44 | # ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c 45 | # ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" 46 | # ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" 47 | BSC32=bscmake.exe 48 | # ADD BASE BSC32 /nologo 49 | # ADD BSC32 /nologo 50 | LINK32=link.exe 51 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 52 | # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 53 | 54 | !ELSEIF "$(CFG)" == "TestApp - Win32 Debug" 55 | 56 | # PROP BASE Use_MFC 2 57 | # PROP BASE Use_Debug_Libraries 1 58 | # PROP BASE Output_Dir "Debug" 59 | # PROP BASE Intermediate_Dir "Debug" 60 | # PROP BASE Target_Dir "" 61 | # PROP Use_MFC 1 62 | # PROP Use_Debug_Libraries 1 63 | # PROP Output_Dir "Debug" 64 | # PROP Intermediate_Dir "Debug" 65 | # PROP Target_Dir "" 66 | # ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c 67 | # ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c 68 | # ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" 69 | # ADD RSC /l 0x409 /d "_DEBUG" 70 | BSC32=bscmake.exe 71 | # ADD BASE BSC32 /nologo 72 | # ADD BSC32 /nologo 73 | LINK32=link.exe 74 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept 75 | # ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept 76 | 77 | !ENDIF 78 | 79 | # Begin Target 80 | 81 | # Name "TestApp - Win32 Release" 82 | # Name "TestApp - Win32 Debug" 83 | # Begin Group "Source Files" 84 | 85 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" 86 | # Begin Source File 87 | 88 | SOURCE=.\StdAfx.cpp 89 | # ADD CPP /Yc"stdafx.h" 90 | # End Source File 91 | # Begin Source File 92 | 93 | SOURCE=.\TestApp.cpp 94 | # End Source File 95 | # Begin Source File 96 | 97 | SOURCE=.\TestApp.rc 98 | # End Source File 99 | # End Group 100 | # Begin Group "Header Files" 101 | 102 | # PROP Default_Filter "h;hpp;hxx;hm;inl" 103 | # Begin Source File 104 | 105 | SOURCE=.\Resource.h 106 | # End Source File 107 | # Begin Source File 108 | 109 | SOURCE=.\StdAfx.h 110 | # End Source File 111 | # Begin Source File 112 | 113 | SOURCE=.\TestApp.h 114 | # End Source File 115 | # End Group 116 | # Begin Group "Resource Files" 117 | 118 | # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" 119 | # End Group 120 | # Begin Source File 121 | 122 | SOURCE=.\ReadMe.txt 123 | # End Source File 124 | # End Target 125 | # End Project 126 | -------------------------------------------------------------------------------- /09/inverted_call/TestApp/TestApp.h: -------------------------------------------------------------------------------- 1 | 2 | #if !defined(AFX_TESTAPP_H__C331FD66_C321_4839_82FF_C807BDE9E59D__INCLUDED_) 3 | #define AFX_TESTAPP_H__C331FD66_C321_4839_82FF_C807BDE9E59D__INCLUDED_ 4 | 5 | #if _MSC_VER > 1000 6 | #pragma once 7 | #endif // _MSC_VER > 1000 8 | 9 | #include "resource.h" 10 | 11 | 12 | #endif // !defined(AFX_TESTAPP_H__C331FD66_C321_4839_82FF_C807BDE9E59D__INCLUDED_) 13 | -------------------------------------------------------------------------------- /09/inverted_call/TestApp/TestApp.plg: -------------------------------------------------------------------------------- 1 | 2 | 3 |
 4 | 

Build Log

5 |

6 | --------------------Configuration: TestApp - Win32 Debug-------------------- 7 |

8 |

Command Lines

9 | Creating command line "rc.exe /l 0x409 /fo"Debug/TestApp.res" /d "_DEBUG" "E:\Projects\mason\TestApp\TestApp.rc"" 10 | Creating temporary file "C:\DOCUME~1\cariddi\LOCALS~1\Temp\RSPBC.tmp" with contents 11 | [ 12 | /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/TestApp.pch" /Yu"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c 13 | "E:\Projects\mason\TestApp\TestApp.cpp" 14 | ] 15 | Creating command line "cl.exe @C:\DOCUME~1\cariddi\LOCALS~1\Temp\RSPBC.tmp" 16 | Creating temporary file "C:\DOCUME~1\cariddi\LOCALS~1\Temp\RSPBD.tmp" with contents 17 | [ 18 | /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/TestApp.pch" /Yc"stdafx.h" /Fo"Debug/" /Fd"Debug/" /FD /GZ /c 19 | "E:\Projects\mason\TestApp\StdAfx.cpp" 20 | ] 21 | Creating command line "cl.exe @C:\DOCUME~1\cariddi\LOCALS~1\Temp\RSPBD.tmp" 22 | Creating command line "link.exe /nologo /subsystem:console /incremental:yes /pdb:"Debug/TestApp.pdb" /debug /machine:I386 /out:"Debug/TestApp.exe" /pdbtype:sept .\Debug\StdAfx.obj .\Debug\TestApp.obj .\Debug\TestApp.res " 23 |

Output Window

24 | Compiling resources... 25 | Compiling... 26 | StdAfx.cpp 27 | Compiling... 28 | TestApp.cpp 29 | Linking... 30 | 31 | 32 | 33 |

Results

34 | TestApp.exe - 0 error(s), 0 warning(s) 35 |
36 | 37 | 38 | -------------------------------------------------------------------------------- /09/inverted_call/TestApp/TestApp.rc: -------------------------------------------------------------------------------- 1 | //Microsoft Visual C++ generated resource script. 2 | // 3 | #include "resource.h" 4 | 5 | #define APSTUDIO_READONLY_SYMBOLS 6 | ///////////////////////////////////////////////////////////////////////////// 7 | // 8 | // Generated from the TEXTINCLUDE 2 resource. 9 | // 10 | #include "afxres.h" 11 | 12 | ///////////////////////////////////////////////////////////////////////////// 13 | #undef APSTUDIO_READONLY_SYMBOLS 14 | 15 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 16 | #ifdef _WIN32 17 | LANGUAGE 9, 1 18 | #pragma code_page(1252) 19 | #endif //_WIN32 20 | 21 | #ifdef APSTUDIO_INVOKED 22 | ///////////////////////////////////////////////////////////////////////////// 23 | // 24 | // TEXTINCLUDE 25 | // 26 | 27 | 1 TEXTINCLUDE DISCARDABLE 28 | BEGIN 29 | "resource.h\0" 30 | END 31 | 32 | 2 TEXTINCLUDE DISCARDABLE 33 | BEGIN 34 | "#include ""afxres.h""\r\n" 35 | "\0" 36 | END 37 | 38 | 3 TEXTINCLUDE DISCARDABLE 39 | BEGIN 40 | "\r\n" 41 | "\0" 42 | END 43 | 44 | #endif // APSTUDIO_INVOKED 45 | 46 | 47 | ///////////////////////////////////////////////////////////////////////////// 48 | // 49 | // String Table 50 | // 51 | 52 | STRINGTABLE DISCARDABLE 53 | BEGIN 54 | IDS_HELLO "Hello from MFC!" 55 | END 56 | 57 | #endif 58 | ///////////////////////////////////////////////////////////////////////////// 59 | 60 | 61 | 62 | #ifndef APSTUDIO_INVOKED 63 | ///////////////////////////////////////////////////////////////////////////// 64 | // 65 | // Generated from the TEXTINCLUDE 3 resource. 66 | // 67 | 68 | 69 | ///////////////////////////////////////////////////////////////////////////// 70 | #endif // not APSTUDIO_INVOKED 71 | -------------------------------------------------------------------------------- /09/inverted_call/TestApp/vssver.scc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/09/inverted_call/TestApp/vssver.scc -------------------------------------------------------------------------------- /09/inverted_call/driver/Driver.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="Driver" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) External Target" 0x0106 6 | 7 | CFG=Driver - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "Driver.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "Driver.mak" CFG="Driver - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "Driver - Win32 Release" (based on "Win32 (x86) External Target") 21 | !MESSAGE "Driver - Win32 Debug" (based on "Win32 (x86) External Target") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "" 27 | # PROP Scc_LocalPath "" 28 | 29 | !IF "$(CFG)" == "Driver - Win32 Release" 30 | 31 | # PROP BASE Use_MFC 0 32 | # PROP BASE Use_Debug_Libraries 0 33 | # PROP BASE Output_Dir "Release" 34 | # PROP BASE Intermediate_Dir "Release" 35 | # PROP BASE Cmd_Line "NMAKE /f Driver.mak" 36 | # PROP BASE Rebuild_Opt "/a" 37 | # PROP BASE Target_File "Driver.exe" 38 | # PROP BASE Bsc_Name "Driver.bsc" 39 | # PROP BASE Target_Dir "" 40 | # PROP Use_MFC 0 41 | # PROP Use_Debug_Libraries 0 42 | # PROP Output_Dir "Release" 43 | # PROP Intermediate_Dir "Release" 44 | # PROP Cmd_Line "e:\ddkbuild\ddkbuild -WXP fre ." 45 | # PROP Rebuild_Opt "-cZ" 46 | # PROP Target_File "Driver.exe" 47 | # PROP Bsc_Name "" 48 | # PROP Target_Dir "" 49 | 50 | !ELSEIF "$(CFG)" == "Driver - Win32 Debug" 51 | 52 | # PROP BASE Use_MFC 0 53 | # PROP BASE Use_Debug_Libraries 1 54 | # PROP BASE Output_Dir "Debug" 55 | # PROP BASE Intermediate_Dir "Debug" 56 | # PROP BASE Cmd_Line "NMAKE /f Driver.mak" 57 | # PROP BASE Rebuild_Opt "/a" 58 | # PROP BASE Target_File "Driver.exe" 59 | # PROP BASE Bsc_Name "Driver.bsc" 60 | # PROP BASE Target_Dir "" 61 | # PROP Use_MFC 0 62 | # PROP Use_Debug_Libraries 1 63 | # PROP Output_Dir "Debug" 64 | # PROP Intermediate_Dir "Debug" 65 | # PROP Cmd_Line "e:\ddkbuild\ddkbuild -WNETXP chk ." 66 | # PROP Rebuild_Opt "-cZ" 67 | # PROP Target_File "Driver.exe" 68 | # PROP Bsc_Name "driver.bsc" 69 | # PROP Target_Dir "" 70 | 71 | !ENDIF 72 | 73 | # Begin Target 74 | 75 | # Name "Driver - Win32 Release" 76 | # Name "Driver - Win32 Debug" 77 | 78 | !IF "$(CFG)" == "Driver - Win32 Release" 79 | 80 | !ELSEIF "$(CFG)" == "Driver - Win32 Debug" 81 | 82 | !ENDIF 83 | 84 | # Begin Group "Source Files" 85 | 86 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" 87 | # Begin Source File 88 | 89 | SOURCE=.\comm.cpp 90 | # End Source File 91 | # End Group 92 | # Begin Group "Header Files" 93 | 94 | # PROP Default_Filter "h;hpp;hxx;hm;inl" 95 | # Begin Source File 96 | 97 | SOURCE=".\comm-ioctl.h" 98 | # End Source File 99 | # Begin Source File 100 | 101 | SOURCE=.\comm.h 102 | # End Source File 103 | # End Group 104 | # Begin Group "Resource Files" 105 | 106 | # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" 107 | # End Group 108 | # Begin Group "Build Files" 109 | 110 | # PROP Default_Filter "" 111 | # Begin Source File 112 | 113 | SOURCE=.\MAKEFILE 114 | # End Source File 115 | # Begin Source File 116 | 117 | SOURCE=.\sources 118 | # End Source File 119 | # End Group 120 | # End Target 121 | # End Project 122 | -------------------------------------------------------------------------------- /09/inverted_call/driver/MAKEFILE: -------------------------------------------------------------------------------- 1 | # 2 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 3 | # file to this component. This file merely indirects to the real make file 4 | # that is shared by all the components of NT OS/2 5 | # 6 | !INCLUDE $(NTMAKEENV)\makefile.def 7 | -------------------------------------------------------------------------------- /09/inverted_call/driver/comm-ioctl.h: -------------------------------------------------------------------------------- 1 | // -*- Mode: c++ -*- 2 | /////////////////////////////////////////////////////////////////////////////// 3 | // 4 | // (C) Copyright 1995 - 2002 OSR Open Systems Resources, Inc. 5 | // All Rights Reserved 6 | // 7 | // This software is part of a licensed software product and may 8 | // only be used or copy in accordance with the terms of that license. 9 | // 10 | // OSR Open Systems Resources, Inc. 11 | // 105 Route 101A Suite 19 12 | // Amherst, NH 03031 (603) 595-6500 FAX: (603) 595-6503 13 | // email bugs to: bugs@osr.com 14 | // 15 | // 16 | // MODULE: 17 | // 18 | // $Workfile: comm-ioctl.h $ 19 | // 20 | // ABSTRACT: 21 | // 22 | // This module contains OSR private definitions used by the FSDK. 23 | // 24 | // AUTHOR: 25 | // 26 | // OSR Open Systems Resources, Inc. 27 | // 28 | // REVISION: 29 | // 30 | // $Revision: 1 $ 31 | // 32 | // 33 | /////////////////////////////////////////////////////////////////////////////// 34 | 35 | #if !defined(__OSR_COMM_IOCTL_H__) 36 | #define __OSR_COMM_IOCTL_H__ 1 37 | 38 | // 39 | // IOCTL types 40 | // 41 | #define OSR_COMM_DATA_TYPE 45935 42 | #define OSR_COMM_CONTROL_TYPE 45936 43 | 44 | // 45 | // Device GUIDs 46 | // 47 | DEFINE_GUID(OSR_COMM_DATA_GUID, 0xAA319196, 0x8533, 0x439B, 0xBB, 0xFE, 0x76, 0x2C, 0xAF, 0xE6, 0x4A, 0x36); 48 | 49 | DEFINE_GUID(OSR_COMM_CONTROL_GUID, 0x4C1FD3F5, 0x86BB, 0x4D5C, 0x9A, 0x80, 0x7B, 0xFD, 0x09, 0xB5, 0x10, 0x4E); 50 | 51 | // 52 | // Service IOCTLs to driver 53 | // 54 | #define OSR_COMM_CONTROL_GET_REQUEST CTL_CODE(OSR_COMM_CONTROL_TYPE, 3192, METHOD_BUFFERED, FILE_READ_ACCESS) 55 | #define OSR_COMM_CONTROL_SEND_RESPONSE CTL_CODE(OSR_COMM_CONTROL_TYPE, 3193, METHOD_BUFFERED, FILE_WRITE_ACCESS) 56 | #define OSR_COMM_CONTROL_GET_AND_SEND CTL_CODE(OSR_COMM_CONTROL_TYPE, 3194, METHOD_BUFFERED, FILE_READ_ACCESS|FILE_WRITE_ACCESS) 57 | 58 | // 59 | // Data structures used for communicating between service and driver 60 | // 61 | 62 | typedef struct _OSR_COMM_CONTROL_REQUEST { 63 | // 64 | // The request ID is used to match up the response to the original request 65 | // 66 | ULONG RequestID; 67 | 68 | // 69 | // The request type indicates the operation to be performed 70 | // 71 | ULONG RequestType; 72 | 73 | // 74 | // The data buffer allows the application to receive arbitrary data 75 | // Note that this is done OUT OF BOUNDS from the IOCTL. Thus, the driver 76 | // is responsible for managing this. 77 | // 78 | PVOID RequestBuffer; 79 | 80 | // 81 | // This specifies the size of the request buffer 82 | // 83 | ULONG RequestBufferLength; 84 | 85 | 86 | } OSR_COMM_CONTROL_REQUEST, *POSR_COMM_CONTROL_REQUEST; 87 | 88 | #define OSR_COMM_READ_REQUEST 0x10 89 | #define OSR_COMM_WRITE_REQUEST 0x20 90 | 91 | typedef struct _OSR_COMM_CONTROL_RESPONSE { 92 | // 93 | // The request ID is used to match up this response to the original request 94 | // 95 | ULONG RequestID; 96 | 97 | // 98 | // The response type indicates the type of response information 99 | // 100 | ULONG ResponseType; 101 | 102 | // 103 | // The data buffer allows the application to return arbitrary data 104 | // Note that this is done OUT OF BOUNDS from the IOCTL. Thus, the driver 105 | // should not trust this data field to be correct. 106 | // 107 | PVOID ResponseBuffer; 108 | 109 | ULONG ResponseBufferLength; 110 | 111 | } OSR_COMM_CONTROL_RESPONSE, *POSR_COMM_CONTROL_RESPONSE; 112 | 113 | #endif /* __OSR_COMM_IOCTL_H__ */ 114 | 115 | #define OSR_COMM_READ_RESPONSE 0x10 116 | #define OSR_COMM_WRITE_RESPONSE 0x20 117 | -------------------------------------------------------------------------------- /09/inverted_call/driver/comm.h: -------------------------------------------------------------------------------- 1 | // -*- Mode: c++ -*- 2 | /////////////////////////////////////////////////////////////////////////////// 3 | // 4 | // (C) Copyright 1995 - 2002 OSR Open Systems Resources, Inc. 5 | // All Rights Reserved 6 | // 7 | // This software is part of a licensed software product and may 8 | // only be used or copy in accordance with the terms of that license. 9 | // 10 | // OSR Open Systems Resources, Inc. 11 | // 105 Route 101A Suite 19 12 | // Amherst, NH 03031 (603) 595-6500 FAX: (603) 595-6503 13 | // email bugs to: bugs@osr.com 14 | // 15 | // 16 | // MODULE: 17 | // 18 | // $Workfile: comm.h $ 19 | // 20 | // ABSTRACT: 21 | // 22 | // This module contains OSR private definitions used by the user/kernel 23 | // communications example. 24 | // 25 | // AUTHOR: 26 | // 27 | // OSR Open Systems Resources, Inc. 28 | // 29 | // REVISION: 30 | // 31 | // $Revision: 1 $ 32 | // 33 | // 34 | /////////////////////////////////////////////////////////////////////////////// 35 | 36 | #ifndef __OSR_COMM_H__ 37 | #define __OSR_COMM_H__ (1) 38 | 39 | #ifdef __cplusplus 40 | extern "C" { 41 | #endif 42 | #include 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | 47 | #include 48 | 49 | typedef struct _OSR_COMM_CONTROL_DEVICE_EXTENSION { 50 | 51 | // 52 | // Data structure magic # 53 | // 54 | ULONG MagicNumber; 55 | 56 | // 57 | // Registry Path 58 | // 59 | UNICODE_STRING RegistryPath; 60 | 61 | // 62 | // Driver Name 63 | // 64 | UNICODE_STRING DriverName; 65 | 66 | // 67 | // Symbolic Link Name 68 | // 69 | UNICODE_STRING SymbolicLinkName; 70 | 71 | // 72 | // Control Thread Service queue 73 | // 74 | LIST_ENTRY ServiceQueue; 75 | 76 | // 77 | // Control Thread Service Queue Lock 78 | // 79 | FAST_MUTEX ServiceQueueLock; 80 | 81 | // 82 | // Control Request Queue - awaiting dispatch to control threads 83 | // 84 | LIST_ENTRY RequestQueue; 85 | 86 | // 87 | // Control Request Queue Lock 88 | // 89 | FAST_MUTEX RequestQueueLock; 90 | 91 | } OSR_COMM_CONTROL_DEVICE_EXTENSION, *POSR_COMM_CONTROL_DEVICE_EXTENSION; 92 | 93 | #define OSR_COMM_CONTROL_EXTENSION_MAGIC_NUMBER 0x1d88f403 94 | 95 | typedef struct _OSR_COMM_DATA_DEVICE_EXTENSION { 96 | 97 | // 98 | // Data structure magic # 99 | // 100 | ULONG MagicNumber; 101 | 102 | // 103 | // This is used to indicate the state of the device 104 | // 105 | ULONG DeviceState; 106 | 107 | // 108 | // Symbolic Link Name 109 | // 110 | UNICODE_STRING SymbolicLinkName; 111 | 112 | // 113 | // Read Request Queue 114 | // 115 | LIST_ENTRY ReadRequestQueue; 116 | 117 | // 118 | // Read Request Queue Lock 119 | // 120 | FAST_MUTEX ReadRequestQueueLock; 121 | 122 | // 123 | // Write Request Queue 124 | // 125 | LIST_ENTRY WriteRequestQueue; 126 | 127 | // 128 | // Write Request Queue Lock 129 | // 130 | FAST_MUTEX WriteRequestQueueLock; 131 | 132 | } OSR_COMM_DATA_DEVICE_EXTENSION, *POSR_COMM_DATA_DEVICE_EXTENSION; 133 | 134 | #define OSR_COMM_DATA_DEVICE_EXTENSION_MAGIC_NUMBER 0x34df009b 135 | 136 | // 137 | // Active = allows queueing requests 138 | // Inactive = disallows queuing requests 139 | // 140 | #define OSR_COMM_DATA_DEVICE_ACTIVE 0x10 141 | #define OSR_COMM_DATA_DEVICE_INACTIVE 0x20 142 | 143 | #define OSR_COMM_CONTROL_DEVICE_NAME_PREFIX L"\\Device\\OSR" 144 | #define OSR_COMM_CONTROL_DEVICE_NAME_SUFFIX L"Control" 145 | #define OSR_COMM_DATA_DEVICE_NAME_PREFIX L"\\Device\\OSR" 146 | #define OSR_COMM_DATA_DEVICE_NAME_SUFFIX L"Data" 147 | #define OSR_COMM_DOSDEVICE_PATH L"\\DosDevices\\OSR" 148 | 149 | #endif // __OSR_COMM_H__ 150 | 151 | 152 | -------------------------------------------------------------------------------- /09/inverted_call/driver/sources: -------------------------------------------------------------------------------- 1 | TARGETNAME=comm 2 | TARGETPATH=obj 3 | TARGETTYPE=DRIVER 4 | 5 | INCLUDES=$(IFSKIT_INC_PATH);..\inc 6 | 7 | MSC_WARNING_LEVEL=/W3 /WX 8 | 9 | SOURCES=comm.cpp 10 | 11 | 12 | BROWSER_INFO=1 13 | BROWERFILE=driver.bsc -n 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /09/inverted_call/driver/vssver.scc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/09/inverted_call/driver/vssver.scc -------------------------------------------------------------------------------- /09/inverted_call/service/AppSrv.cpp: -------------------------------------------------------------------------------- 1 | // NetAppSrv.cpp : Defines the entry point for the console application. 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "AppSrv.h" 6 | #include "reflectorservice.h" 7 | 8 | #ifdef _DEBUG 9 | #define new DEBUG_NEW 10 | #undef THIS_FILE 11 | static char THIS_FILE[] = __FILE__; 12 | #endif 13 | 14 | ///////////////////////////////////////////////////////////////////////////// 15 | // The one and only application object 16 | 17 | CWinApp theApp; 18 | 19 | //using namespace std; 20 | 21 | int _cdecl _tmain(int argc, TCHAR* argv[], TCHAR* envp[]) 22 | { 23 | int nRetCode = 0; 24 | 25 | // initialize MFC and print and error on failure 26 | if (!AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0)) 27 | { 28 | // TODO: change error code to suit your needs 29 | wprintf(L"Fatal Error: MFC initialization failed\n"); 30 | nRetCode = 1; 31 | } 32 | else 33 | { 34 | // Create the service object 35 | CReflectorService reflectorService; 36 | 37 | // Parse for standard arguments (install, uninstall, version etc.) 38 | if (!reflectorService.ParseStandardArgs(argc, argv)) { 39 | 40 | // Didn't find any standard args so start the service 41 | // Uncomment the DebugBreak line below to enter the debugger 42 | // when the service is started. 43 | //DebugBreak(); 44 | reflectorService.StartService(); 45 | } 46 | 47 | // When we get here, the service has been stopped 48 | nRetCode = reflectorService.m_Status.dwWin32ExitCode; 49 | 50 | } 51 | 52 | return nRetCode; 53 | } 54 | 55 | 56 | -------------------------------------------------------------------------------- /09/inverted_call/service/AppSrv.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="AppSrv" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) External Target" 0x0106 6 | 7 | CFG=AppSrv - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "AppSrv.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "AppSrv.mak" CFG="AppSrv - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "AppSrv - Win32 Release" (based on "Win32 (x86) External Target") 21 | !MESSAGE "AppSrv - Win32 Debug" (based on "Win32 (x86) External Target") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "" 27 | # PROP Scc_LocalPath "" 28 | 29 | !IF "$(CFG)" == "AppSrv - Win32 Release" 30 | 31 | # PROP BASE Use_MFC 32 | # PROP BASE Use_Debug_Libraries 0 33 | # PROP BASE Output_Dir "Release" 34 | # PROP BASE Intermediate_Dir "Release" 35 | # PROP BASE Cmd_Line "NMAKE /f AppSrv.mak" 36 | # PROP BASE Rebuild_Opt "/a" 37 | # PROP BASE Target_File "AppSrv.exe" 38 | # PROP BASE Bsc_Name "AppSrv.bsc" 39 | # PROP BASE Target_Dir "" 40 | # PROP Use_MFC 41 | # PROP Use_Debug_Libraries 0 42 | # PROP Output_Dir "Release" 43 | # PROP Intermediate_Dir "Release" 44 | # PROP Cmd_Line "e:\ddkbuild\ddkbuild -WNETXP fre ." 45 | # PROP Rebuild_Opt "-cZ" 46 | # PROP Target_File "AppSrv.exe" 47 | # PROP Bsc_Name "" 48 | # PROP Target_Dir "" 49 | 50 | !ELSEIF "$(CFG)" == "AppSrv - Win32 Debug" 51 | 52 | # PROP BASE Use_MFC 53 | # PROP BASE Use_Debug_Libraries 1 54 | # PROP BASE Output_Dir "Debug" 55 | # PROP BASE Intermediate_Dir "Debug" 56 | # PROP BASE Cmd_Line "NMAKE /f AppSrv.mak" 57 | # PROP BASE Rebuild_Opt "/a" 58 | # PROP BASE Target_File "AppSrv.exe" 59 | # PROP BASE Bsc_Name "AppSrv.bsc" 60 | # PROP BASE Target_Dir "" 61 | # PROP Use_MFC 62 | # PROP Use_Debug_Libraries 1 63 | # PROP Output_Dir "Debug" 64 | # PROP Intermediate_Dir "Debug" 65 | # PROP Cmd_Line "e:\ddkbuild\ddkbuild -WNETXP chk ." 66 | # PROP Rebuild_Opt "-cZ" 67 | # PROP Target_File "AppSrv.exe" 68 | # PROP Bsc_Name "" 69 | # PROP Target_Dir "" 70 | 71 | !ENDIF 72 | 73 | # Begin Target 74 | 75 | # Name "AppSrv - Win32 Release" 76 | # Name "AppSrv - Win32 Debug" 77 | 78 | !IF "$(CFG)" == "AppSrv - Win32 Release" 79 | 80 | !ELSEIF "$(CFG)" == "AppSrv - Win32 Debug" 81 | 82 | !ENDIF 83 | 84 | # Begin Group "Source Files" 85 | 86 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" 87 | # Begin Source File 88 | 89 | SOURCE=.\AppSrv.cpp 90 | # End Source File 91 | # Begin Source File 92 | 93 | SOURCE=.\NTService.cpp 94 | # End Source File 95 | # Begin Source File 96 | 97 | SOURCE=.\reflectorservice.cpp 98 | # End Source File 99 | # Begin Source File 100 | 101 | SOURCE=.\StdAfx.cpp 102 | # End Source File 103 | # End Group 104 | # Begin Group "Header Files" 105 | 106 | # PROP Default_Filter "h;hpp;hxx;hm;inl" 107 | # Begin Source File 108 | 109 | SOURCE=.\AppSrv.h 110 | # End Source File 111 | # Begin Source File 112 | 113 | SOURCE=.\NTService.h 114 | # End Source File 115 | # Begin Source File 116 | 117 | SOURCE=.\reflectorservice.h 118 | # End Source File 119 | # Begin Source File 120 | 121 | SOURCE=.\Resource.h 122 | # End Source File 123 | # Begin Source File 124 | 125 | SOURCE=.\StdAfx.h 126 | # End Source File 127 | # End Group 128 | # Begin Group "Resource Files" 129 | 130 | # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" 131 | # End Group 132 | # Begin Group "Build Files" 133 | 134 | # PROP Default_Filter "" 135 | # Begin Source File 136 | 137 | SOURCE=.\MAKEFILE 138 | # End Source File 139 | # Begin Source File 140 | 141 | SOURCE=.\sources 142 | # End Source File 143 | # End Group 144 | # Begin Group "Misc Files" 145 | 146 | # PROP Default_Filter "" 147 | # Begin Source File 148 | 149 | SOURCE=.\AppSrv.rc 150 | # End Source File 151 | # Begin Source File 152 | 153 | SOURCE=.\NTServMsg.mc 154 | # End Source File 155 | # Begin Source File 156 | 157 | SOURCE=.\ntservmsg.rc 158 | # End Source File 159 | # End Group 160 | # End Target 161 | # End Project 162 | -------------------------------------------------------------------------------- /09/inverted_call/service/AppSrv.h: -------------------------------------------------------------------------------- 1 | 2 | #if !defined(AFX_NETAPPSRV_H__22C06F70_7688_46EE_9C42_909325126915__INCLUDED_) 3 | #define AFX_NETAPPSRV_H__22C06F70_7688_46EE_9C42_909325126915__INCLUDED_ 4 | 5 | #if _MSC_VER > 1000 6 | #pragma once 7 | #endif // _MSC_VER > 1000 8 | 9 | #include "resource.h" 10 | 11 | #include "ntservice.h" 12 | 13 | #endif // !defined(AFX_NETAPPSRV_H__22C06F70_7688_46EE_9C42_909325126915__INCLUDED_) 14 | -------------------------------------------------------------------------------- /09/inverted_call/service/AppSrv.rc: -------------------------------------------------------------------------------- 1 | //Microsoft Developer Studio generated resource script. 2 | // 3 | #include "resource.h" 4 | 5 | #define APSTUDIO_READONLY_SYMBOLS 6 | ///////////////////////////////////////////////////////////////////////////// 7 | // 8 | // Generated from the TEXTINCLUDE 2 resource. 9 | // 10 | #include "afxres.h" 11 | #include "ntservMsg.rc" 12 | ///////////////////////////////////////////////////////////////////////////// 13 | #undef APSTUDIO_READONLY_SYMBOLS 14 | 15 | ///////////////////////////////////////////////////////////////////////////// 16 | // English (U.S.) resources 17 | 18 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 19 | #ifdef _WIN32 20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 21 | #pragma code_page(1252) 22 | #endif //_WIN32 23 | 24 | #ifdef APSTUDIO_INVOKED 25 | ///////////////////////////////////////////////////////////////////////////// 26 | // 27 | // TEXTINCLUDE 28 | // 29 | 30 | 1 TEXTINCLUDE DISCARDABLE 31 | BEGIN 32 | "resource.h\0" 33 | END 34 | 35 | 2 TEXTINCLUDE DISCARDABLE 36 | BEGIN 37 | "#include ""afxres.h""\r\n" 38 | "#include ""ntservMsg.rc""\0" 39 | END 40 | 41 | 3 TEXTINCLUDE DISCARDABLE 42 | BEGIN 43 | "\r\n" 44 | "\0" 45 | END 46 | 47 | #endif // APSTUDIO_INVOKED 48 | 49 | 50 | ///////////////////////////////////////////////////////////////////////////// 51 | // 52 | // String Table 53 | // 54 | 55 | STRINGTABLE DISCARDABLE 56 | BEGIN 57 | IDS_HELLO "Hello from MFC!" 58 | END 59 | 60 | #endif // English (U.S.) resources 61 | ///////////////////////////////////////////////////////////////////////////// 62 | 63 | 64 | 65 | #ifndef APSTUDIO_INVOKED 66 | ///////////////////////////////////////////////////////////////////////////// 67 | // 68 | // Generated from the TEXTINCLUDE 3 resource. 69 | // 70 | 71 | 72 | ///////////////////////////////////////////////////////////////////////////// 73 | #endif // not APSTUDIO_INVOKED 74 | 75 | -------------------------------------------------------------------------------- /09/inverted_call/service/MAKEFILE: -------------------------------------------------------------------------------- 1 | # 2 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 3 | # file to this component. This file merely indirects to the real make file 4 | # that is shared by all the components of NT OS/2 5 | # 6 | !INCLUDE $(NTMAKEENV)\makefile.def 7 | -------------------------------------------------------------------------------- /09/inverted_call/service/NTServMsg.mc: -------------------------------------------------------------------------------- 1 | 2 | MessageId=100 3 | SymbolicName=EVMSG_INSTALLED 4 | Language=English 5 | The %1 service was installed. 6 | . 7 | 8 | MessageId= 9 | SymbolicName=EVMSG_REMOVED 10 | Language=English 11 | The %1 service was removed. 12 | . 13 | 14 | MessageId= 15 | SymbolicName=EVMSG_NOTREMOVED 16 | Language=English 17 | The %1 service could not be removed. 18 | . 19 | 20 | MessageId= 21 | SymbolicName=EVMSG_CTRLHANDLERNOTINSTALLED 22 | Language=English 23 | The control handler could not be installed. 24 | . 25 | 26 | MessageId= 27 | SymbolicName=EVMSG_FAILEDINIT 28 | Language=English 29 | The initialization process failed. 30 | . 31 | 32 | MessageId= 33 | SymbolicName=EVMSG_STARTED 34 | Language=English 35 | The service was started. 36 | . 37 | 38 | MessageId= 39 | SymbolicName=EVMSG_BADREQUEST 40 | Language=English 41 | The service received an unsupported request. 42 | . 43 | 44 | MessageId= 45 | SymbolicName=EVMSG_DEBUG 46 | Language=English 47 | Debug: %1 48 | . 49 | 50 | MessageId= 51 | SymbolicName=EVMSG_STOPPED 52 | Language=English 53 | The service was stopped. 54 | . 55 | 56 | -------------------------------------------------------------------------------- /09/inverted_call/service/NTService.h: -------------------------------------------------------------------------------- 1 | // ntservice.h 2 | // 3 | // Definitions for CNTService 4 | // 5 | 6 | #ifndef _NTSERVICE_H_ 7 | #define _NTSERVICE_H_ 8 | 9 | #include "ntservmsg.h" // Event message ids 10 | 11 | #define SERVICE_CONTROL_USER 128 12 | 13 | #define HANDLEREX 1 14 | 15 | class CNTService 16 | { 17 | public: 18 | CNTService(const WCHAR* szServiceName,const WCHAR* szServiceDescription); 19 | virtual ~CNTService(); 20 | BOOL ParseStandardArgs(int argc, WCHAR* argv[]); 21 | BOOL IsInstalled(); 22 | BOOL Install(); 23 | BOOL Uninstall(); 24 | void LogEvent(WORD wType, DWORD dwID, 25 | const WCHAR* pszS1 = NULL, 26 | const WCHAR* pszS2 = NULL, 27 | const WCHAR* pszS3 = NULL); 28 | BOOL StartService(); 29 | void SetStatus(DWORD dwState); 30 | BOOL Initialize(); 31 | virtual void Run(); 32 | virtual BOOL OnInit(); 33 | virtual void OnStop(); 34 | virtual void OnInterrogate(); 35 | virtual void OnPause(); 36 | virtual void OnContinue(); 37 | virtual void OnShutdown(); 38 | virtual void OnDeviceEvent(DWORD dwEventType,LPVOID lpEventData); 39 | virtual BOOL OnUserControl(DWORD dwOpcode); 40 | void DebugMsg(const WCHAR* pszFormat, ...); 41 | 42 | // static member functions 43 | static void WINAPI ServiceMain(DWORD dwArgc, LPTSTR* lpszArgv); 44 | #ifndef HANDLEREX 45 | static void WINAPI Handler(DWORD dwOpcode); 46 | #else HANDLEREX 47 | static DWORD WINAPI HandlerEx(DWORD dwOpcode,DWORD dwEventType,LPVOID lpEventData,LPVOID lpContext); 48 | #endif HANDLEREX 49 | 50 | // data members 51 | WCHAR m_szServiceName[64]; 52 | WCHAR m_szServiceDescription[256]; 53 | int m_iMajorVersion; 54 | int m_iMinorVersion; 55 | SERVICE_STATUS_HANDLE m_hServiceStatus; 56 | SERVICE_STATUS m_Status; 57 | BOOL m_bIsRunning; 58 | BOOL m_bDebugging; 59 | 60 | // static data 61 | static CNTService* m_pThis; // nasty hack to get object ptr 62 | 63 | private: 64 | HANDLE m_hEventSource; 65 | 66 | }; 67 | 68 | #endif // _NTSERVICE_H_ 69 | -------------------------------------------------------------------------------- /09/inverted_call/service/Resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by NetAppSrv.rc 4 | // 5 | #define IDS_HELLO 1 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 101 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1000 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /09/inverted_call/service/StdAfx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // NetAppSrv.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /09/inverted_call/service/StdAfx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #if !defined(AFX_STDAFX_H__EF8C9CA7_EA04_4A1C_B104_F9764A0914E3__INCLUDED_) 7 | #define AFX_STDAFX_H__EF8C9CA7_EA04_4A1C_B104_F9764A0914E3__INCLUDED_ 8 | 9 | #if _MSC_VER > 1000 10 | #pragma once 11 | #endif // _MSC_VER > 1000 12 | 13 | //#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers 14 | 15 | #include 16 | #include // MFC core and standard components 17 | #include // MFC extensions 18 | #include // MFC support for Internet Explorer 4 Common Controls 19 | #ifndef _AFX_NO_AFXCMN_SUPPORT 20 | #include // MFC support for Windows Common Controls 21 | #endif // _AFX_NO_AFXCMN_SUPPORT 22 | 23 | //#include 24 | 25 | // TODO: reference additional headers your program requires here 26 | 27 | //{{AFX_INSERT_LOCATION}} 28 | // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 29 | 30 | #endif // !defined(AFX_STDAFX_H__EF8C9CA7_EA04_4A1C_B104_F9764A0914E3__INCLUDED_) 31 | -------------------------------------------------------------------------------- /09/inverted_call/service/ntservmsg.h: -------------------------------------------------------------------------------- 1 | // 2 | // Values are 32 bit values layed out as follows: 3 | // 4 | // 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 5 | // 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 6 | // +---+-+-+-----------------------+-------------------------------+ 7 | // |Sev|C|R| Facility | Code | 8 | // +---+-+-+-----------------------+-------------------------------+ 9 | // 10 | // where 11 | // 12 | // Sev - is the severity code 13 | // 14 | // 00 - Success 15 | // 01 - Informational 16 | // 10 - Warning 17 | // 11 - Error 18 | // 19 | // C - is the Customer code flag 20 | // 21 | // R - is a reserved bit 22 | // 23 | // Facility - is the facility code 24 | // 25 | // Code - is the facility's status code 26 | // 27 | // 28 | // Define the facility codes 29 | // 30 | 31 | 32 | // 33 | // Define the severity codes 34 | // 35 | 36 | 37 | // 38 | // MessageId: EVMSG_INSTALLED 39 | // 40 | // MessageText: 41 | // 42 | // The %1 service was installed. 43 | // 44 | #define EVMSG_INSTALLED 0x00000064L 45 | 46 | // 47 | // MessageId: EVMSG_REMOVED 48 | // 49 | // MessageText: 50 | // 51 | // The %1 service was removed. 52 | // 53 | #define EVMSG_REMOVED 0x00000065L 54 | 55 | // 56 | // MessageId: EVMSG_NOTREMOVED 57 | // 58 | // MessageText: 59 | // 60 | // The %1 service could not be removed. 61 | // 62 | #define EVMSG_NOTREMOVED 0x00000066L 63 | 64 | // 65 | // MessageId: EVMSG_CTRLHANDLERNOTINSTALLED 66 | // 67 | // MessageText: 68 | // 69 | // The control handler could not be installed. 70 | // 71 | #define EVMSG_CTRLHANDLERNOTINSTALLED 0x00000067L 72 | 73 | // 74 | // MessageId: EVMSG_FAILEDINIT 75 | // 76 | // MessageText: 77 | // 78 | // The initialization process failed. 79 | // 80 | #define EVMSG_FAILEDINIT 0x00000068L 81 | 82 | // 83 | // MessageId: EVMSG_STARTED 84 | // 85 | // MessageText: 86 | // 87 | // The service was started. 88 | // 89 | #define EVMSG_STARTED 0x00000069L 90 | 91 | // 92 | // MessageId: EVMSG_BADREQUEST 93 | // 94 | // MessageText: 95 | // 96 | // The service received an unsupported request. 97 | // 98 | #define EVMSG_BADREQUEST 0x0000006AL 99 | 100 | // 101 | // MessageId: EVMSG_DEBUG 102 | // 103 | // MessageText: 104 | // 105 | // Debug: %1 106 | // 107 | #define EVMSG_DEBUG 0x0000006BL 108 | 109 | // 110 | // MessageId: EVMSG_STOPPED 111 | // 112 | // MessageText: 113 | // 114 | // The service was stopped. 115 | // 116 | #define EVMSG_STOPPED 0x0000006CL 117 | 118 | -------------------------------------------------------------------------------- /09/inverted_call/service/reflectorservice.h: -------------------------------------------------------------------------------- 1 | // ReflectorService.h 2 | 3 | #include "ntservice.h" 4 | #include "..\driver\comm-ioctl.h" 5 | 6 | class CReflectorService : public CNTService 7 | { 8 | public: 9 | CReflectorService(); 10 | 11 | virtual BOOL OnInit(); 12 | virtual void Run(); 13 | virtual BOOL OnUserControl(DWORD dwOpcode); 14 | virtual void OnDeviceEvent(DWORD dwEventType,LPVOID lpEventData); 15 | 16 | BOOL GetRequest(POSR_COMM_CONTROL_REQUEST PRequest,LPOVERLAPPED POverlapped); 17 | BOOL SendResponse(POSR_COMM_CONTROL_RESPONSE PResponse,LPOVERLAPPED POverlapped); 18 | BOOL GetRequestSendResponse(POSR_COMM_CONTROL_REQUEST PRequest, 19 | POSR_COMM_CONTROL_RESPONSE PResponse, 20 | LPOVERLAPPED POverlapped); 21 | void SaveStatus(); 22 | 23 | // Control parameters 24 | int m_iStartParam; 25 | int m_iIncParam; 26 | 27 | // Current state 28 | int m_iState; 29 | 30 | BOOL m_Connected; 31 | HANDLE m_OsrControlHandle; 32 | }; 33 | -------------------------------------------------------------------------------- /09/inverted_call/service/sources: -------------------------------------------------------------------------------- 1 | TARGETNAME=AppSrv 2 | TARGETPATH=obj 3 | TARGETTYPE=PROGRAM 4 | 5 | PRECOMPILED_CXX = 1 6 | PRECOMPILED_INCLUDE = stdafx.h 7 | PRECOMPILED_SOURCEFILE = stdafx.cpp 8 | 9 | USE_STATIC_MFC=1 10 | USE_MFCUNICODE=1 11 | USE_MFC=1 12 | 13 | MSC_OPTIMIZATIONS=/Od 14 | 15 | INCLUDES=$(MFC_INCLUDES);$(MSTOOLS)\include;..\inc 16 | 17 | C_DEFINES=$(C_DEFINES) -DUNICODE=1 18 | 19 | MFC_LIBS=d:\MVS\VC98\MFC\LIB\mfcs42u.lib \ 20 | d:\MVS\VC98\MFC\LIB\UAFXCW.LIB \ 21 | d:\MVS\VC98\MFC\LIB\MFC42u.LIB \ 22 | d:\MVS\VC98\LIB\advapi32.lib\ 23 | d:\MVS\VC98\LIB\comctl32.lib\ 24 | d:\MVS\VC98\LIB\gdi32.lib \ 25 | d:\MVS\VC98\LIB\kernel32.lib\ 26 | d:\MVS\VC98\LIB\mstask.lib \ 27 | d:\MVS\VC98\LIB\ole32.lib \ 28 | d:\MVS\VC98\LIB\oleaut32.lib\ 29 | d:\MVS\VC98\LIB\setupapi.lib\ 30 | d:\MVS\VC98\LIB\shell32.lib \ 31 | d:\MVS\VC98\LIB\user32.lib \ 32 | d:\MVS\VC98\LIB\uuid.lib \ 33 | d:\MVS\VC98\LIB\ws2_32.lib \ 34 | d:\MVS\VC98\LIB\winspool.lib \ 35 | d:\MVS\VC98\LIB\comdlg32.lib \ 36 | d:\MVS\VC98\LIB\oledlg.lib \ 37 | d:\MVS\VC98\LIB\ctl3d32.lib 38 | 39 | 40 | SOURCES=ntservmsg.mc \ 41 | appsrv.rc \ 42 | appsrv.cpp \ 43 | reflectorservice.cpp \ 44 | ntservice.cpp 45 | 46 | 47 | 48 | UMTYPE=windows 49 | UMENTRY=wmain 50 | 51 | TARGETLIBS= $(SDK_LIB_PATH)\ole32.lib \ 52 | $(SDK_LIB_PATH)\oleaut32.lib \ 53 | $(SDK_LIB_PATH)\comctl32.lib 54 | -------------------------------------------------------------------------------- /09/inverted_call/service/vssver.scc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/09/inverted_call/service/vssver.scc -------------------------------------------------------------------------------- /09/读我.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/09/读我.txt -------------------------------------------------------------------------------- /10/Splitter/Bin/Spliter.inf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/10/Splitter/Bin/Spliter.inf -------------------------------------------------------------------------------- /10/Splitter/Bin/无标题.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/10/Splitter/Bin/无标题.png -------------------------------------------------------------------------------- /10/Splitter/Source/Pin.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/10/Splitter/Source/Pin.cpp -------------------------------------------------------------------------------- /10/Splitter/Source/Pin.h: -------------------------------------------------------------------------------- 1 | // 2 | // 3 | 4 | class CPin 5 | { 6 | public: 7 | 8 | CFilter *m_pFilter; 9 | PKSPIN m_Pin; 10 | KSSTATE m_State; 11 | 12 | CPin (IN PKSPIN Pin) 13 | { 14 | m_Pin = Pin; 15 | ASSERT(Pin != 0); 16 | 17 | PKSFILTER ParentFilter = KsPinGetParentFilter (Pin); 18 | 19 | m_pFilter = reinterpret_cast 20 | (ParentFilter -> Context); 21 | } 22 | 23 | ~CPin () 24 | { 25 | } 26 | 27 | static NTSTATUS DispatchCreate ( 28 | IN PKSPIN Pin, 29 | IN PIRP Irp 30 | ); 31 | 32 | static NTSTATUS DispatchSetFormat ( 33 | IN PKSPIN Pin, 34 | IN PKSDATAFORMAT OldFormat OPTIONAL, 35 | IN PKSMULTIPLE_ITEM OldAttributeList OPTIONAL, 36 | IN const KSDATARANGE *DataRange, 37 | IN const KSATTRIBUTE_LIST *AttributeRange OPTIONAL 38 | ); 39 | 40 | static NTSTATUS IntersectHandler ( 41 | IN PKSFILTER Filter, 42 | IN PIRP Irp, 43 | IN PKSP_PIN PinInstance, 44 | IN PKSDATARANGE CallerDataRange, 45 | IN PKSDATARANGE DescriptorDataRange, 46 | IN ULONG BufferSize, 47 | OUT PVOID Data OPTIONAL, 48 | OUT PULONG DataSize 49 | ); 50 | 51 | static NTSTATUS DispatchSetState ( 52 | IN PKSPIN Pin, 53 | IN KSSTATE ToState, 54 | IN KSSTATE FromState 55 | ) 56 | { 57 | return (reinterpret_cast 58 | (Pin -> Context))->SetState(ToState, FromState); 59 | } 60 | 61 | NTSTATUS SetState ( 62 | IN KSSTATE ToState, 63 | IN KSSTATE FromState 64 | ); 65 | 66 | static NTSTATUS AudioSampleRateHandler( 67 | IN PIRP Irp, 68 | IN PKSPROPERTY Request, 69 | IN OUT PVOID Data) 70 | { 71 | KSPIN* Pin = KsGetPinFromIrp(Irp); 72 | if(Pin == NULL)return STATUS_INVALID_HANDLE; 73 | 74 | return (reinterpret_cast 75 | (Pin -> Context))->SampleRateHandler(Irp, Request, Data); 76 | } 77 | 78 | NTSTATUS SampleRateHandler( 79 | IN PIRP Irp, 80 | IN PKSPROPERTY Request, 81 | IN OUT PVOID Data); 82 | 83 | static NTSTATUS AudioPositionHandler( 84 | IN PIRP Irp, 85 | IN PKSPROPERTY Request, 86 | IN OUT PVOID Data) 87 | { 88 | KSPIN* Pin = KsGetPinFromIrp(Irp); 89 | if(Pin == NULL)return STATUS_INVALID_HANDLE; 90 | 91 | return (reinterpret_cast 92 | (Pin -> Context))->AudioPosition(Irp, Request, Data); 93 | } 94 | 95 | NTSTATUS AudioPosition( 96 | IN PIRP Irp, 97 | IN PKSPROPERTY Request, 98 | IN OUT PVOID Data); 99 | }; 100 | 101 | -------------------------------------------------------------------------------- /10/Splitter/Source/Spliter.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/10/Splitter/Source/Spliter.cpp -------------------------------------------------------------------------------- /10/Splitter/Source/Spliter.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | 3 | AVStream Filter-Centric Sample 4 | 5 | Copyright (c) 2001, Microsoft Corporation 6 | 7 | File: 8 | 9 | avssamp.h 10 | 11 | Abstract: 12 | 13 | AVStream Filter-Centric Sample header file. This is the main 14 | header. 15 | 16 | History: 17 | 18 | created 6/18/01 19 | 20 | **************************************************************************/ 21 | 22 | /************************************************* 23 | 24 | Standard Includes 25 | 26 | *************************************************/ 27 | 28 | extern "C" { 29 | #include 30 | } 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #define NOBITMAP 37 | #include 38 | #undef NOBITMAP 39 | #include 40 | #include 41 | #include 42 | #include 43 | 44 | 45 | void ClearObj (IN void* obj); 46 | 47 | extern const KSFILTER_DISPATCH 48 | gFilterDispatch; 49 | 50 | extern const KSFILTER_DESCRIPTOR 51 | gSplitterFilter; 52 | 53 | extern const KSPIN_DESCRIPTOR_EX 54 | gPins [2]; 55 | 56 | extern const GUID 57 | gFilterCategories [2]; 58 | 59 | extern const KSDEVICE_DESCRIPTOR 60 | gKsSplitterDevice; 61 | 62 | 63 | #include "filter.h" 64 | #include "pin.h" 65 | 66 | -------------------------------------------------------------------------------- /10/Splitter/Source/Spliter.rc: -------------------------------------------------------------------------------- 1 | // 2 | // 3 | #include 4 | #include 5 | 6 | #define VER_FILETYPE VFT_DRV 7 | #define VER_FILESUBTYPE VFT2_UNKNOWN 8 | #define VER_FILEDESCRIPTION_STR "Splitter" 9 | #define VER_INTERNALNAME_STR "Splitter.sys" 10 | #define VER_ORIGINALFILENAME_STR "Splitter.sys" 11 | -------------------------------------------------------------------------------- /10/Splitter/Source/filter.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/10/Splitter/Source/filter.cpp -------------------------------------------------------------------------------- /10/Splitter/Source/filter.h: -------------------------------------------------------------------------------- 1 | // 2 | // 3 | 4 | class CFilter 5 | { 6 | PKSFILTER m_Filter; 7 | 8 | NTSTATUS Process ( 9 | IN PKSPROCESSPIN_INDEXENTRY ProcessPinsIndex 10 | ); 11 | public: 12 | 13 | PKSFILTER GetKsFilter(){return m_Filter;} 14 | 15 | CFilter ( 16 | IN PKSFILTER Filter 17 | ); 18 | 19 | ~CFilter ( 20 | ) 21 | { 22 | } 23 | 24 | static NTSTATUS DispatchCreate ( 25 | IN PKSFILTER Filter, 26 | IN PIRP Irp 27 | ); 28 | 29 | static NTSTATUS DispatchProcess ( 30 | IN PKSFILTER Filter, 31 | IN PKSPROCESSPIN_INDEXENTRY ProcessPinsIndex 32 | ) 33 | { 34 | return (reinterpret_cast (Filter -> Context)) -> 35 | Process (ProcessPinsIndex); 36 | } 37 | }; 38 | 39 | -------------------------------------------------------------------------------- /10/Splitter/Source/makefile: -------------------------------------------------------------------------------- 1 | !IF 0 2 | 3 | Copyright (C) Microsoft Corporation, 1999 - 1999 4 | 5 | Module Name: 6 | 7 | makefile. 8 | 9 | !ENDIF 10 | 11 | !if "$(DDK_TARGET_OS)"=="Win2K" 12 | !message This sample is not intended to target the Windows 2000 platform. 13 | !else 14 | !INCLUDE $(NTMAKEENV)\makefile.def 15 | !endif 16 | 17 | -------------------------------------------------------------------------------- /10/Splitter/Source/sources: -------------------------------------------------------------------------------- 1 | MAJORCOMP=ntos 2 | 3 | TARGETNAME=Spliter 4 | TARGETPATH=..\bin 5 | TARGETTYPE=DRIVER 6 | DRIVERTYPE=WDM 7 | 8 | TARGETLIBS= $(DDK_LIB_PATH)\ksguid.lib\ 9 | $(DDK_LIB_PATH)\ks.lib 10 | 11 | INCLUDES=$(DDK_INC_PATH) 12 | 13 | MSC_WARNING_LEVEL=/W0 14 | C_DEFINES=$(C_DEFINES) -DUNICODE -D_UNICODE -DDEBUG_LEVEL=DEBUGLVL_BLAB -D_WIN2K_COMPAT_SLIST_USAGE 15 | #LINKER_FLAGS =$(LINKER_FLAGS) -map -merge:PAGECONST=PAGE 16 | 17 | SOURCES=\ 18 | $(TARGETNAME).rc \ 19 | Spliter.cpp \ 20 | filter.cpp \ 21 | Pin.cpp -------------------------------------------------------------------------------- /10/Splitter/Spliter.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 15 | 16 | 17 | 18 | 19 | 26 | 39 | 40 | 47 | 60 | 61 | 62 | 63 | 64 | 65 | 70 | 73 | 74 | 77 | 78 | 81 | 82 | 83 | 88 | 91 | 92 | 95 | 96 | 99 | 100 | 101 | 106 | 109 | 110 | 113 | 114 | 117 | 118 | 119 | 122 | 123 | 126 | 127 | 130 | 131 | 132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /10/Splitter/关于.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/10/Splitter/关于.docx -------------------------------------------------------------------------------- /10/读我.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/10/读我.txt -------------------------------------------------------------------------------- /11/ASIO/Source/V-ASIO.def: -------------------------------------------------------------------------------- 1 | LIBRARY V-ASIODrv 2 | HEAPSIZE 4096 3 | EXPORTS 4 | DllGetClassObject PRIVATE 5 | DllCanUnloadNow PRIVATE 6 | DllRegisterServer PRIVATE 7 | DllUnregisterServer PRIVATE 8 | DllEntryPoint 9 | -------------------------------------------------------------------------------- /11/ASIO/Source/asiosample.txt: -------------------------------------------------------------------------------- 1 | Asiosample 2 | 3 | This sample driver illustrates the implementation of an ASIO driver. 4 | 5 | 6 | 7 | Windows notes: 8 | 9 | For Windows a COM implementation is provided. The final driver can be 10 | installed in the system by dragging the asiosample.dll onto the 11 | regsvr32.exe in the windows\system directory. 12 | 13 | It is normal that the LNK4104 warning is issued for the following 4 14 | exported symbols: 15 | 16 | DllGetClassObject 17 | DllCanUnloadNow 18 | DllRegisterServer 19 | DllUnregisterServer 20 | 21 | 22 | Macintosh notes: 23 | The supplied project is created with CodeWarrior Pro 5. 24 | -------------------------------------------------------------------------------- /11/ASIO/Source/asiosmpl.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/11/ASIO/Source/asiosmpl.cpp -------------------------------------------------------------------------------- /11/ASIO/Source/asiosmpl.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/11/ASIO/Source/asiosmpl.h -------------------------------------------------------------------------------- /11/ASIO/Source/sources: -------------------------------------------------------------------------------- 1 | TARGETNAME=V-ASIODrv 2 | TARGETTYPE=DYNLINK 3 | TARGETPATH=..\..\Bin 4 | 5 | DLLDEF=V-ASIO.def 6 | DLLENTRY=_DllMainCRTStartup 7 | 8 | TARGETLIBS= $(DDK_LIB_PATH)\kernel32.lib \ 9 | $(DDK_LIB_PATH)\user32.lib \ 10 | $(DDK_LIB_PATH)\setupapi.lib \ 11 | $(DDK_LIB_PATH)\winmm.lib \ 12 | $(DDK_LIB_PATH)\ole32.lib \ 13 | $(DDK_LIB_PATH)\uuid.lib \ 14 | $(DDK_LIB_PATH)\advapi32.lib 15 | 16 | USE_MAPSYM=1 17 | USE_MSVCRT=1 18 | UMTYPE=windows 19 | 386_STDCALL=0 20 | 21 | SYNCHRONIZE_BLOCK = 1 22 | 23 | C_DEFINES= $(C_DEFINES) /DWIN32 /DNDEBUG /D_WINDOWS /DLOGIAUDIO 24 | 25 | MSC_OPTIMIZATION = /O2 /Ob1 26 | MSC_WARNING_LEVEL = /W0 /wd4996 27 | USER_C_FLAGS= $(USER_C_FLAGS) /MT 28 | 29 | INCLUDES= ..\common 30 | SOURCES = asiosmpl.cpp -------------------------------------------------------------------------------- /11/ASIO/V-ASIO_User.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 15 | 16 | 17 | 18 | 19 | 26 | 39 | 40 | 47 | 60 | 61 | 62 | 63 | 64 | 65 | 70 | 73 | 74 | 75 | 80 | 83 | 84 | 87 | 90 | 91 | 94 | 95 | 98 | 99 | 102 | 103 | 106 | 107 | 110 | 111 | 114 | 115 | 118 | 119 | 122 | 123 | 126 | 127 | 130 | 131 | 134 | 135 | 136 | 137 | 142 | 145 | 146 | 147 | 150 | 151 | 154 | 155 | 156 | 157 | 158 | 159 | -------------------------------------------------------------------------------- /11/ASIO/common/asiodrvr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Steinberg Audio Stream I/O API 3 | (c) 1996, Steinberg Soft- und Hardware GmbH 4 | charlie (May 1996) 5 | 6 | asiodrvr.cpp 7 | c++ superclass to implement asio functionality. from this, 8 | you can derive whatever required 9 | */ 10 | 11 | #include 12 | #include "asiosys.h" 13 | #include "asiodrvr.h" 14 | 15 | #if WINDOWS 16 | #error do not use this 17 | AsioDriver::AsioDriver (LPUNKNOWN pUnk, HRESULT *phr) : CUnknown("My AsioDriver", pUnk, phr) 18 | { 19 | } 20 | 21 | #else 22 | 23 | AsioDriver::AsioDriver() 24 | { 25 | } 26 | 27 | #endif 28 | 29 | AsioDriver::~AsioDriver() 30 | { 31 | } 32 | 33 | ASIOBool AsioDriver::init(void *sysRef) 34 | { 35 | return ASE_NotPresent; 36 | } 37 | 38 | void AsioDriver::getDriverName(char *name) 39 | { 40 | strcpy(name, "No Driver"); 41 | } 42 | 43 | long AsioDriver::getDriverVersion() 44 | { 45 | return 0; 46 | } 47 | 48 | void AsioDriver::getErrorMessage(char *string) 49 | { 50 | strcpy(string, "ASIO Driver Implementation Error!"); 51 | } 52 | 53 | ASIOError AsioDriver::start() 54 | { 55 | return ASE_NotPresent; 56 | } 57 | 58 | ASIOError AsioDriver::stop() 59 | { 60 | return ASE_NotPresent; 61 | } 62 | 63 | ASIOError AsioDriver::getChannels(long *numInputChannels, long *numOutputChannels) 64 | { 65 | return ASE_NotPresent; 66 | } 67 | 68 | ASIOError AsioDriver::getLatencies(long *inputLatency, long *outputLatency) 69 | { 70 | return ASE_NotPresent; 71 | } 72 | 73 | ASIOError AsioDriver::getBufferSize(long *minSize, long *maxSize, 74 | long *preferredSize, long *granularity) 75 | { 76 | return ASE_NotPresent; 77 | } 78 | 79 | ASIOError AsioDriver::canSampleRate(ASIOSampleRate sampleRate) 80 | { 81 | return ASE_NotPresent; 82 | } 83 | 84 | ASIOError AsioDriver::getSampleRate(ASIOSampleRate *sampleRate) 85 | { 86 | return ASE_NotPresent; 87 | } 88 | 89 | ASIOError AsioDriver::setSampleRate(ASIOSampleRate sampleRate) 90 | { 91 | return ASE_NotPresent; 92 | } 93 | 94 | ASIOError AsioDriver::getClockSources(ASIOClockSource *clocks, long *numSources) 95 | { 96 | *numSources = 0; 97 | return ASE_NotPresent; 98 | } 99 | 100 | ASIOError AsioDriver::setClockSource(long reference) 101 | { 102 | return ASE_NotPresent; 103 | } 104 | 105 | ASIOError AsioDriver::getSamplePosition(ASIOSamples *sPos, ASIOTimeStamp *tStamp) 106 | { 107 | return ASE_NotPresent; 108 | } 109 | 110 | ASIOError AsioDriver::getChannelInfo(ASIOChannelInfo *info) 111 | { 112 | return ASE_NotPresent; 113 | } 114 | 115 | ASIOError AsioDriver::createBuffers(ASIOBufferInfo *channelInfos, long numChannels, 116 | long bufferSize, ASIOCallbacks *callbacks) 117 | { 118 | return ASE_NotPresent; 119 | } 120 | 121 | ASIOError AsioDriver::disposeBuffers() 122 | { 123 | return ASE_NotPresent; 124 | } 125 | 126 | ASIOError AsioDriver::controlPanel() 127 | { 128 | return ASE_NotPresent; 129 | } 130 | 131 | ASIOError AsioDriver::future(long selector, void *opt) 132 | { 133 | return ASE_NotPresent; 134 | } 135 | 136 | ASIOError AsioDriver::outputReady() 137 | { 138 | return ASE_NotPresent; 139 | } -------------------------------------------------------------------------------- /11/ASIO/common/asiodrvr.h: -------------------------------------------------------------------------------- 1 | /* 2 | Steinberg Audio Stream I/O API 3 | (c) 1996, Steinberg Soft- und Hardware GmbH 4 | charlie (May 1996) 5 | 6 | asiodrvr.h 7 | c++ superclass to implement asio functionality. from this, 8 | you can derive whatever required 9 | */ 10 | 11 | #ifndef _asiodrvr_ 12 | #define _asiodrvr_ 13 | 14 | // cpu and os system we are running on 15 | #include "asiosys.h" 16 | // basic "C" interface 17 | #include "asio.h" 18 | 19 | class AsioDriver; 20 | extern AsioDriver *getDriver(); // for generic constructor 21 | 22 | #if WINDOWS 23 | #include 24 | #include "combase.h" 25 | #include "iasiodrv.h" 26 | class AsioDriver : public IASIO ,public CUnknown 27 | { 28 | public: 29 | AsioDriver(LPUNKNOWN pUnk, HRESULT *phr); 30 | 31 | DECLARE_IUNKNOWN 32 | // Factory method 33 | static CUnknown *CreateInstance(LPUNKNOWN pUnk, HRESULT *phr); 34 | // IUnknown 35 | virtual HRESULT STDMETHODCALLTYPE NonDelegatingQueryInterface(REFIID riid,void **ppvObject); 36 | 37 | #else 38 | 39 | class AsioDriver 40 | { 41 | public: 42 | AsioDriver(); 43 | #endif 44 | virtual ~AsioDriver(); 45 | 46 | virtual ASIOBool init(void* sysRef); 47 | virtual void getDriverName(char *name); // max 32 bytes incl. terminating zero 48 | virtual long getDriverVersion(); 49 | virtual void getErrorMessage(char *string); // max 124 bytes incl. 50 | 51 | virtual ASIOError start(); 52 | virtual ASIOError stop(); 53 | 54 | virtual ASIOError getChannels(long *numInputChannels, long *numOutputChannels); 55 | virtual ASIOError getLatencies(long *inputLatency, long *outputLatency); 56 | virtual ASIOError getBufferSize(long *minSize, long *maxSize, 57 | long *preferredSize, long *granularity); 58 | 59 | virtual ASIOError canSampleRate(ASIOSampleRate sampleRate); 60 | virtual ASIOError getSampleRate(ASIOSampleRate *sampleRate); 61 | virtual ASIOError setSampleRate(ASIOSampleRate sampleRate); 62 | virtual ASIOError getClockSources(ASIOClockSource *clocks, long *numSources); 63 | virtual ASIOError setClockSource(long reference); 64 | 65 | virtual ASIOError getSamplePosition(ASIOSamples *sPos, ASIOTimeStamp *tStamp); 66 | virtual ASIOError getChannelInfo(ASIOChannelInfo *info); 67 | 68 | virtual ASIOError createBuffers(ASIOBufferInfo *bufferInfos, long numChannels, 69 | long bufferSize, ASIOCallbacks *callbacks); 70 | virtual ASIOError disposeBuffers(); 71 | 72 | virtual ASIOError controlPanel(); 73 | virtual ASIOError future(long selector, void *opt); 74 | virtual ASIOError outputReady(); 75 | }; 76 | #endif 77 | -------------------------------------------------------------------------------- /11/ASIO/common/asiosys.h: -------------------------------------------------------------------------------- 1 | #ifndef __asiosys__ 2 | 3 | #define __asiosys__ 4 | 5 | 6 | 7 | #ifdef WIN32 8 | 9 | #undef MAC 10 | 11 | #define PPC 0 12 | 13 | #define WINDOWS 1 14 | 15 | #define SGI 0 16 | 17 | #define SUN 0 18 | 19 | #define LINUX 0 20 | 21 | #define BEOS 0 22 | 23 | 24 | 25 | #define NATIVE_INT64 0 26 | 27 | #define IEEE754_64FLOAT 1 28 | 29 | 30 | 31 | #elif BEOS 32 | 33 | #define MAC 0 34 | 35 | #define PPC 0 36 | 37 | #define WINDOWS 0 38 | 39 | #define PC 0 40 | 41 | #define SGI 0 42 | 43 | #define SUN 0 44 | 45 | #define LINUX 0 46 | 47 | 48 | 49 | #define NATIVE_INT64 0 50 | 51 | #define IEEE754_64FLOAT 1 52 | 53 | 54 | 55 | #ifndef DEBUG 56 | 57 | #define DEBUG 0 58 | 59 | #if DEBUG 60 | 61 | void DEBUGGERMESSAGE(char *string); 62 | 63 | #else 64 | 65 | #define DEBUGGERMESSAGE(a) 66 | 67 | #endif 68 | 69 | #endif 70 | 71 | 72 | 73 | #elif SGI 74 | 75 | #define MAC 0 76 | 77 | #define PPC 0 78 | 79 | #define WINDOWS 0 80 | 81 | #define PC 0 82 | 83 | #define SUN 0 84 | 85 | #define LINUX 0 86 | 87 | #define BEOS 0 88 | 89 | 90 | 91 | #define NATIVE_INT64 0 92 | 93 | #define IEEE754_64FLOAT 1 94 | 95 | 96 | 97 | #ifndef DEBUG 98 | 99 | #define DEBUG 0 100 | 101 | #if DEBUG 102 | 103 | void DEBUGGERMESSAGE(char *string); 104 | 105 | #else 106 | 107 | #define DEBUGGERMESSAGE(a) 108 | 109 | #endif 110 | 111 | #endif 112 | 113 | 114 | 115 | #else // MAC 116 | 117 | 118 | 119 | #define MAC 1 120 | 121 | #define PPC 1 122 | 123 | #define WINDOWS 0 124 | 125 | #define PC 0 126 | 127 | #define SGI 0 128 | 129 | #define SUN 0 130 | 131 | #define LINUX 0 132 | 133 | #define BEOS 0 134 | 135 | 136 | 137 | #define NATIVE_INT64 0 138 | 139 | #define IEEE754_64FLOAT 1 140 | 141 | 142 | 143 | #ifndef DEBUG 144 | 145 | #define DEBUG 0 146 | 147 | #if DEBUG 148 | 149 | void DEBUGGERMESSAGE(char *string); 150 | 151 | #else 152 | 153 | #define DEBUGGERMESSAGE(a) 154 | 155 | #endif 156 | 157 | #endif 158 | 159 | #endif 160 | 161 | 162 | 163 | #endif 164 | 165 | -------------------------------------------------------------------------------- /11/ASIO/common/debugmessage.cpp: -------------------------------------------------------------------------------- 1 | #include "asiosys.h" 2 | 3 | #if DEBUG 4 | #if MAC 5 | #include 6 | void DEBUGGERMESSAGE(char *string) 7 | { 8 | c2pstr(string); 9 | DebugStr((unsigned char *)string); 10 | } 11 | #else 12 | #error debugmessage 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /11/ASIO/common/iasiodrv.h: -------------------------------------------------------------------------------- 1 | #include "asiosys.h" 2 | #include "asio.h" 3 | 4 | /* Forward Declarations */ 5 | 6 | #ifndef __ASIODRIVER_FWD_DEFINED__ 7 | #define __ASIODRIVER_FWD_DEFINED__ 8 | typedef interface IASIO IASIO; 9 | #endif /* __ASIODRIVER_FWD_DEFINED__ */ 10 | 11 | interface IASIO : public IUnknown 12 | { 13 | 14 | virtual ASIOBool init(void *sysHandle) = 0; 15 | 16 | virtual void getDriverName(char *name) = 0; 17 | 18 | virtual long getDriverVersion() = 0; 19 | 20 | virtual void getErrorMessage(char *string) = 0; 21 | 22 | virtual ASIOError start() = 0; 23 | 24 | virtual ASIOError stop() = 0; 25 | 26 | virtual ASIOError getChannels(long *numInputChannels, long *numOutputChannels) = 0; 27 | 28 | virtual ASIOError getLatencies(long *inputLatency, long *outputLatency) = 0; 29 | 30 | virtual ASIOError getBufferSize(long *minSize, long *maxSize, 31 | 32 | long *preferredSize, long *granularity) = 0; 33 | 34 | virtual ASIOError canSampleRate(ASIOSampleRate sampleRate) = 0; 35 | 36 | virtual ASIOError getSampleRate(ASIOSampleRate *sampleRate) = 0; 37 | 38 | virtual ASIOError setSampleRate(ASIOSampleRate sampleRate) = 0; 39 | 40 | virtual ASIOError getClockSources(ASIOClockSource *clocks, long *numSources) = 0; 41 | 42 | virtual ASIOError setClockSource(long reference) = 0; 43 | 44 | virtual ASIOError getSamplePosition(ASIOSamples *sPos, ASIOTimeStamp *tStamp) = 0; 45 | 46 | virtual ASIOError getChannelInfo(ASIOChannelInfo *info) = 0; 47 | 48 | virtual ASIOError createBuffers(ASIOBufferInfo *bufferInfos, long numChannels, 49 | 50 | long bufferSize, ASIOCallbacks *callbacks) = 0; 51 | 52 | virtual ASIOError disposeBuffers() = 0; 53 | 54 | virtual ASIOError controlPanel() = 0; 55 | 56 | virtual ASIOError future(long selector,void *opt) = 0; 57 | 58 | virtual ASIOError outputReady() = 0; 59 | 60 | }; 61 | 62 | -------------------------------------------------------------------------------- /11/AsioSimTool/AsioSimTool.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/11/AsioSimTool/AsioSimTool.cpp -------------------------------------------------------------------------------- /11/AsioSimTool/AsioSimTool.vcproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/11/AsioSimTool/AsioSimTool.vcproj -------------------------------------------------------------------------------- /11/AsioSimTool/PlayMusicFile.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/11/AsioSimTool/PlayMusicFile.cpp -------------------------------------------------------------------------------- /11/AsioSimTool/PlayMusicFile.h: -------------------------------------------------------------------------------- 1 | #ifndef PLAY_MUSIC_FILE_H 2 | #define PLAY_MUSIC_FILE_H 3 | 4 | extern unsigned char *g_pDataBuf; 5 | extern unsigned int g_dataBufSize; 6 | extern HANDLE g_hWaveFile; 7 | extern HANDLE g_hWaveFileRecord; 8 | 9 | 10 | typedef struct RIFF_HEADER 11 | { 12 | TCHAR szRiffID[4]; // 'R','I','F','F' 13 | DWORD dwRiffSize; 14 | TCHAR szRiffFormat[4]; // 'W','A','V','E' 15 | }RIFF_HEADER; 16 | 17 | typedef struct WAVE_FORMAT 18 | { 19 | WORD wFormatTag; 20 | WORD wChannels; 21 | DWORD dwSamplesPerSec; 22 | DWORD dwAvgBytesPerSec; 23 | WORD wBlockAlign; 24 | WORD wBitsPerSample; 25 | }WAVE_FORMAT; 26 | 27 | typedef struct WAVE_FORMATEX 28 | { 29 | WORD wFormatTag; 30 | WORD wChannels; 31 | DWORD dwSamplesPerSec; 32 | DWORD dwAvgBytesPerSec; 33 | WORD wBlockAlign; 34 | WORD wBitsPerSample; 35 | WORD wExtenSize; 36 | }WAVE_FORMATEX; 37 | 38 | typedef struct FMT_BLOCK 39 | { 40 | TCHAR szFmtID[4]; // 'f','m','t',' ' please note the 41 | DWORD dwFmtSize; 42 | WAVE_FORMAT wavFormat; 43 | }FMT_BLOCK; 44 | 45 | typedef struct DATA_BLOCK 46 | { 47 | TCHAR szDataID[4]; // 'd','a','t','a' 48 | DWORD dwDataSize; 49 | }DATA_BLOCK; 50 | 51 | 52 | void closeWaveFile(); 53 | int readWaveFile(unsigned char * channel0, unsigned char * channel1, unsigned int size, int type); 54 | bool writeWaveFile(void* bufPnt, unsigned int bufferSize); 55 | 56 | int recordWaveFileEnd(HANDLE hFile); 57 | int openWaveFile(char* filePath, HANDLE* hFile, WAVE_FORMAT* wave_fmt, DWORD *dwDataSize); 58 | int recordWaveFile(char* filePath, HANDLE* hFile, WAVE_FORMAT* wave_fmt = NULL); 59 | 60 | int playWaveFile(char *filePath); 61 | int BeginRecord(char* filePath); 62 | int EndRecord(); 63 | #endif 64 | -------------------------------------------------------------------------------- /11/AsioSimTool/ReadMe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/11/AsioSimTool/ReadMe.txt -------------------------------------------------------------------------------- /11/AsioSimTool/asiolist.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/11/AsioSimTool/asiolist.cpp -------------------------------------------------------------------------------- /11/AsioSimTool/asiolist.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/11/AsioSimTool/asiolist.h -------------------------------------------------------------------------------- /11/AsioSimTool/asiotool.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/11/AsioSimTool/asiotool.h -------------------------------------------------------------------------------- /11/AsioSimTool/command.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/11/AsioSimTool/command.cpp -------------------------------------------------------------------------------- /11/AsioSimTool/command.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/11/AsioSimTool/command.h -------------------------------------------------------------------------------- /11/AsioSimTool/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/11/AsioSimTool/stdafx.cpp -------------------------------------------------------------------------------- /11/AsioSimTool/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/11/AsioSimTool/stdafx.h -------------------------------------------------------------------------------- /11/Bin/V-ASIO.inf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/11/Bin/V-ASIO.inf -------------------------------------------------------------------------------- /11/Bin/i386/V-ASIO.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/11/Bin/i386/V-ASIO.pdb -------------------------------------------------------------------------------- /11/Bin/i386/V-ASIO.sys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/11/Bin/i386/V-ASIO.sys -------------------------------------------------------------------------------- /11/Kernel/Source/ASIO.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/11/Kernel/Source/ASIO.c -------------------------------------------------------------------------------- /11/Kernel/Source/MAKEFILE: -------------------------------------------------------------------------------- 1 | # 2 | # DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source 3 | # file to this component. This file merely indirects to the real make file 4 | # that is shared by all the driver components of the Windows NT DDK 5 | # 6 | 7 | !INCLUDE $(NTMAKEENV)\makefile.def 8 | 9 | -------------------------------------------------------------------------------- /11/Kernel/Source/Main.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/11/Kernel/Source/Main.c -------------------------------------------------------------------------------- /11/Kernel/Source/Main.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/11/Kernel/Source/Main.h -------------------------------------------------------------------------------- /11/Kernel/Source/objfre_win7_x86/i386/asio.obj.oacr.root.x86fre.pft.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 2 4 | 0 5 | 605asio.co:\0_template\code\11\kernel\source\28172The function 'StartDPC' has PAGED_CODE or PAGED_CODE_LOCKED but is not declared to be in a paged segment.StartDPC60 6 | 825asio.co:\0_template\code\11\kernel\source\28172The function 'StopDPC' has PAGED_CODE or PAGED_CODE_LOCKED but is not declared to be in a paged segment.StopDPC82 7 | 8 | -------------------------------------------------------------------------------- /11/Kernel/Source/objfre_win7_x86/i386/main.obj.oacr.root.x86fre.pft.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1 4 | 0 5 | 868main.co:\0_template\code\11\kernel\source\28155The function being assigned or passed should be a KDEFERRED_ROUTINE function: Add the declaration 'KDEFERRED_ROUTINE TimerDpc;' before the current first declaration of TimerDpc.DriverEntry30 6 | 7 | -------------------------------------------------------------------------------- /11/Kernel/Source/public.h: -------------------------------------------------------------------------------- 1 | /*++ 2 | 3 | Copyright (c) Microsoft Corporation. All rights reserved. 4 | 5 | THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY 6 | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 7 | IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR 8 | PURPOSE. 9 | 10 | Module Name: 11 | 12 | Event.h 13 | 14 | --*/ 15 | 16 | #ifndef __PUBLIC__ 17 | #define __PUBLIC__ 18 | 19 | 20 | #include "devioctl.h" 21 | #include 22 | 23 | 24 | #define SIZEOF_REGISTER_EVENT sizeof(REGISTER_EVENT ) 25 | 26 | #define IOCTL_ASIO_START \ 27 | CTL_CODE( FILE_DEVICE_UNKNOWN, 0x800, METHOD_NEITHER, FILE_ANY_ACCESS ) 28 | 29 | #define IOCTL_ASIO_STOP \ 30 | CTL_CODE( FILE_DEVICE_UNKNOWN, 0x801, METHOD_NEITHER, FILE_ANY_ACCESS ) 31 | 32 | #define IOCTL_ASIO_EVENT \ 33 | CTL_CODE( FILE_DEVICE_UNKNOWN, 0x802, METHOD_NEITHER, FILE_ANY_ACCESS ) 34 | 35 | #define IOCTL_ASIO_BUFFERS \ 36 | CTL_CODE( FILE_DEVICE_UNKNOWN, 0x803, METHOD_NEITHER, FILE_ANY_ACCESS ) 37 | 38 | #define IOCTL_ASIO_BUFFER_READY \ 39 | CTL_CODE( FILE_DEVICE_UNKNOWN, 0x804, METHOD_NEITHER, FILE_ANY_ACCESS ) 40 | 41 | #define IOCTL_ASIO_BUFFER_SIZE \ 42 | CTL_CODE( FILE_DEVICE_UNKNOWN, 0x805, METHOD_NEITHER, FILE_ANY_ACCESS ) 43 | 44 | #define DRIVER_FUNC_INSTALL 0x01 45 | #define DRIVER_FUNC_REMOVE 0x02 46 | 47 | #define DRIVER_NAME "event" 48 | 49 | 50 | 51 | __inline KDBG(int nLevel, char* msg, ...); 52 | 53 | #endif // __PUBLIC__ 54 | 55 | -------------------------------------------------------------------------------- /11/Kernel/Source/sources: -------------------------------------------------------------------------------- 1 | TARGETNAME=V-ASIO 2 | TARGETPATH=..\..\bin 3 | TARGETTYPE=DRIVER 4 | 5 | SOURCES=\ 6 | Main.c \ 7 | ASIO.c 8 | 9 | MSC_WARNING_LEVEL=/W1 10 | -------------------------------------------------------------------------------- /11/Kernel/V-ASIO.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 15 | 16 | 17 | 18 | 19 | 26 | 39 | 40 | 47 | 60 | 61 | 62 | 63 | 64 | 65 | 70 | 73 | 74 | 77 | 78 | 79 | 84 | 87 | 88 | 91 | 92 | 93 | 98 | 99 | 102 | 103 | 106 | 107 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /11/install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | @echo V-ASIO Driver Installation 4 | @echo . 5 | @echo . 6 | 7 | if "%1"=="-k" goto K: 8 | 9 | %SystemRoot%\System32\rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 .\bin\V-ASIO.inf 10 | @echo successfully installed! 11 | goto E: 12 | 13 | :K 14 | net start v-asio 15 | @echo if failed to start V-ASIO, please verify that install.bat has been executed. 16 | 17 | :E 18 | @pause 19 | -------------------------------------------------------------------------------- /11/uninstall.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | @echo V-ASIO Driver Uninstallation 4 | @echo . 5 | @echo . 6 | 7 | %SystemRoot%\System32\rundll32.exe setupapi,InstallHinfSection DefaultUninstall 132 .\bin\V-ASIO.inf 8 | 9 | @echo V-ASIO driver is successfully uninstalled! 10 | @pause 11 | -------------------------------------------------------------------------------- /11/关于.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/11/关于.docx -------------------------------------------------------------------------------- /13/Inf/AddReg.inf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/13/Inf/AddReg.inf -------------------------------------------------------------------------------- /13/Inf/CopyFiles.inf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/13/Inf/CopyFiles.inf -------------------------------------------------------------------------------- /13/Inf/DelFiles.inf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/13/Inf/DelFiles.inf -------------------------------------------------------------------------------- /13/Inf/DelReg.inf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/13/Inf/DelReg.inf -------------------------------------------------------------------------------- /13/Inf/ProfileItems.inf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/13/Inf/ProfileItems.inf -------------------------------------------------------------------------------- /13/Inf/RenFiles.inf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/13/Inf/RenFiles.inf -------------------------------------------------------------------------------- /13/Inf/Services.inf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/13/Inf/Services.inf -------------------------------------------------------------------------------- /13/Inf/Services_DEL.inf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/13/Inf/Services_DEL.inf -------------------------------------------------------------------------------- /13/Inf/ini.inf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/13/Inf/ini.inf -------------------------------------------------------------------------------- /13/Inf/test.txt: -------------------------------------------------------------------------------- 1 | For test -------------------------------------------------------------------------------- /13/InfRun.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/13/InfRun.exe -------------------------------------------------------------------------------- /14/DrvInst.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/14/DrvInst.exe -------------------------------------------------------------------------------- /14/DrvInst/DrvDeletePage.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/14/DrvInst/DrvDeletePage.cpp -------------------------------------------------------------------------------- /14/DrvInst/DrvDeletePage.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "afxcmn.h" 3 | 4 | 5 | // DrvDeletePage dialog 6 | 7 | class DrvDeletePage : public CPropertyPage 8 | { 9 | DECLARE_DYNAMIC(DrvDeletePage) 10 | 11 | public: 12 | DrvDeletePage(); 13 | virtual ~DrvDeletePage(); 14 | 15 | // Dialog Data 16 | enum { IDD = IDD_DRVDELETEPAGE }; 17 | 18 | protected: 19 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 20 | virtual BOOL OnSetActive(); 21 | virtual BOOL OnWizardFinish(); 22 | 23 | DECLARE_MESSAGE_MAP() 24 | public: 25 | afx_msg void OnBnClickedOk(); 26 | afx_msg void OnBnClickedDelete(); 27 | 28 | CListCtrl m_lstctl_devices; 29 | CString m_strHID; 30 | CString m_strHIDPre; 31 | virtual BOOL OnInitDialog(); 32 | virtual BOOL PreTranslateMessage(MSG* pMsg); 33 | virtual LRESULT OnWizardBack(); 34 | }; 35 | -------------------------------------------------------------------------------- /14/DrvInst/DrvInst.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/14/DrvInst/DrvInst.cpp -------------------------------------------------------------------------------- /14/DrvInst/DrvInst.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/14/DrvInst/DrvInst.h -------------------------------------------------------------------------------- /14/DrvInst/DrvInst.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/14/DrvInst/DrvInst.rc -------------------------------------------------------------------------------- /14/DrvInst/DrvInstPage.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/14/DrvInst/DrvInstPage.cpp -------------------------------------------------------------------------------- /14/DrvInst/DrvInstPage.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "afxwin.h" 3 | 4 | 5 | // DrvInstPage dialog 6 | 7 | class DrvInstPage : public CPropertyPage 8 | { 9 | DECLARE_DYNAMIC(DrvInstPage) 10 | 11 | public: 12 | DrvInstPage(); 13 | virtual ~DrvInstPage(); 14 | 15 | // Dialog Data 16 | enum { IDD = IDD_DRVINSTPAGE }; 17 | 18 | protected: 19 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 20 | 21 | CListCtrl m_lstbox_inf; 22 | CEdit m_edt_curdir; 23 | char m_asPath[MAX_PATH]; 24 | 25 | void RefreshListCtl(); 26 | DECLARE_MESSAGE_MAP() 27 | public: 28 | virtual BOOL OnSetActive(); 29 | virtual BOOL OnInitDialog(); 30 | afx_msg void OnBnClickedButton2(); 31 | afx_msg void OnBnClickedSelDir(); 32 | afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); 33 | virtual BOOL PreTranslateMessage(MSG* pMsg); 34 | virtual LRESULT OnWizardNext(); 35 | }; 36 | -------------------------------------------------------------------------------- /14/DrvInst/DrvInstSheetEx.cpp: -------------------------------------------------------------------------------- 1 | // DrvInstSheetEx.cpp : implementation file 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "DrvInst.h" 6 | #include "DrvInstSheetEx.h" 7 | #include "setup.h" 8 | 9 | 10 | // CDrvInstSheet 11 | 12 | IMPLEMENT_DYNAMIC(CDrvInstSheet, CPropertySheet) 13 | 14 | void CDrvInstSheet::InitSheet() 15 | { 16 | m_StartPage.Construct(DrvStartPage::IDD, 0, IDS_START_T, IDS_START_ST); 17 | m_DrvInstPage.Construct(DrvInstPage::IDD, 0, IDS_INF_T, IDS_INF_ST); 18 | m_HIDPage.Construct(CHIDPage::IDD, 0, IDS_HID_T, IDS_HID_ST); 19 | m_DrvDelPage.Construct(DrvDeletePage::IDD, 0, IDS_DEL_T, IDS_DEL_ST); 20 | 21 | AddPage(&m_StartPage); 22 | 23 | AddPage(&m_DrvInstPage); 24 | AddPage(&m_HIDPage); 25 | AddPage(&m_FinishPage1); 26 | 27 | AddPage(&m_DrvDelPage); 28 | AddPage(&m_FinishPage2); 29 | 30 | m_psh.dwFlags |= PSH_WIZARD97; 31 | } 32 | 33 | CDrvInstSheet::CDrvInstSheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage) 34 | :CPropertySheet(nIDCaption, pParentWnd, iSelectPage) 35 | { 36 | InitSheet(); 37 | } 38 | 39 | CDrvInstSheet::CDrvInstSheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage) 40 | :CPropertySheet(pszCaption, pParentWnd, iSelectPage) 41 | { 42 | 43 | InitSheet(); 44 | } 45 | 46 | CDrvInstSheet::CDrvInstSheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage, 47 | HBITMAP hbmWatermark, 48 | HPALETTE hpalWatermark, 49 | HBITMAP hbmHeader) 50 | :CPropertySheet(nIDCaption, pParentWnd, iSelectPage, hbmWatermark, hpalWatermark, hbmHeader) 51 | { 52 | 53 | InitSheet(); 54 | } 55 | 56 | CDrvInstSheet::CDrvInstSheet(LPCTSTR pszCaption, CWnd* pParentWnd , UINT iSelectPage, 57 | HBITMAP hbmWatermark, 58 | HPALETTE hpalWatermark, 59 | HBITMAP hbmHeader) 60 | :CPropertySheet(pszCaption, pParentWnd, iSelectPage, hbmWatermark, hpalWatermark, hbmHeader) 61 | { 62 | 63 | InitSheet(); 64 | } 65 | 66 | CDrvInstSheet::~CDrvInstSheet() 67 | { 68 | } 69 | 70 | 71 | BEGIN_MESSAGE_MAP(CDrvInstSheet, CPropertySheet) 72 | ON_WM_CLOSE() 73 | ON_WM_DESTROY() 74 | END_MESSAGE_MAP() 75 | 76 | 77 | // CDrvInstSheet message handlers 78 | 79 | BOOL CDrvInstSheet::OnInitDialog() 80 | { 81 | BOOL bResult = CPropertySheet::OnInitDialog(); 82 | 83 | CWnd *pWnd = GetDlgItem(IDHELP); 84 | if(pWnd) 85 | { 86 | pWnd->ShowWindow(FALSE); 87 | pWnd->EnableWindow(FALSE); 88 | } 89 | 90 | FindAllInfFiles(NULL); 91 | return bResult; 92 | } 93 | 94 | void CDrvInstSheet::OnClose() 95 | { 96 | CPropertySheet::OnClose(); 97 | } 98 | 99 | void CDrvInstSheet::OnDestroy() 100 | { 101 | FreeAllInfFiles(); 102 | FreeDevices(); 103 | CPropertySheet::OnDestroy(); 104 | } 105 | -------------------------------------------------------------------------------- /14/DrvInst/DrvInstSheetEx.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "StartPage.h" 4 | #include "DrvInstPage.h" 5 | #include "HIDPage.h" 6 | #include "DrvDeletePage.h" 7 | #include "FinishPage.h" 8 | 9 | // CDrvInstSheet 10 | class CDrvInstSheet : public CPropertySheet 11 | { 12 | DECLARE_DYNAMIC(CDrvInstSheet) 13 | 14 | public: 15 | CDrvInstSheet(UINT nIDCaption, 16 | CWnd* pParentWnd = NULL, 17 | UINT iSelectPage = 0); 18 | 19 | CDrvInstSheet(LPCTSTR pszCaption, 20 | CWnd* pParentWnd = NULL, 21 | UINT iSelectPage = 0); 22 | 23 | CDrvInstSheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage, 24 | HBITMAP hbmWatermark, 25 | HPALETTE hpalWatermark = NULL, 26 | HBITMAP hbmHeader = NULL); 27 | 28 | CDrvInstSheet(LPCTSTR pszCaption, CWnd* pParentWnd , UINT iSelectPage, 29 | HBITMAP hbmWatermark, 30 | HPALETTE hpalWatermark = NULL, 31 | HBITMAP hbmHeader = NULL); 32 | 33 | virtual ~CDrvInstSheet(); 34 | 35 | void setDrvMode(bool bDelete) 36 | { 37 | if(bDelete) 38 | SetActivePage(&m_FinishPage1); 39 | } 40 | protected: 41 | 42 | DrvStartPage m_StartPage; 43 | DrvInstPage m_DrvInstPage; 44 | CHIDPage m_HIDPage; 45 | DrvDeletePage m_DrvDelPage; 46 | FinishPage m_FinishPage1; 47 | FinishPage m_FinishPage2; 48 | 49 | void InitSheet(); 50 | 51 | DECLARE_MESSAGE_MAP() 52 | public: 53 | virtual BOOL OnInitDialog(); 54 | afx_msg void OnClose(); 55 | afx_msg void OnDestroy(); 56 | }; 57 | 58 | 59 | -------------------------------------------------------------------------------- /14/DrvInst/FinishPage.cpp: -------------------------------------------------------------------------------- 1 | // FinishPage.cpp : implementation file 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "DrvInst.h" 6 | #include "FinishPage.h" 7 | 8 | 9 | // FinishPage dialog 10 | 11 | IMPLEMENT_DYNAMIC(FinishPage, CPropertyPage) 12 | 13 | FinishPage::FinishPage() 14 | : CPropertyPage(FinishPage::IDD) 15 | { 16 | m_psp.dwFlags |= PSP_HIDEHEADER; 17 | } 18 | 19 | FinishPage::~FinishPage() 20 | { 21 | } 22 | 23 | void FinishPage::DoDataExchange(CDataExchange* pDX) 24 | { 25 | CPropertyPage::DoDataExchange(pDX); 26 | } 27 | 28 | 29 | BEGIN_MESSAGE_MAP(FinishPage, CPropertyPage) 30 | END_MESSAGE_MAP() 31 | 32 | 33 | BOOL FinishPage::OnSetActive() 34 | { 35 | CPropertySheet* pSheet = (CPropertySheet*)GetParent(); 36 | ASSERT_KINDOF(CPropertySheet, pSheet); 37 | pSheet->SetWizardButtons(PSWIZB_BACK|PSWIZB_FINISH); 38 | 39 | return CPropertyPageEx::OnSetActive(); 40 | } 41 | 42 | -------------------------------------------------------------------------------- /14/DrvInst/FinishPage.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | 4 | // FinishPage dialog 5 | 6 | class FinishPage : public CPropertyPage 7 | { 8 | DECLARE_DYNAMIC(FinishPage) 9 | 10 | public: 11 | FinishPage(); 12 | virtual ~FinishPage(); 13 | 14 | // Dialog Data 15 | enum { IDD = IDD_FINISHPAGE }; 16 | 17 | protected: 18 | virtual BOOL OnSetActive(); 19 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 20 | 21 | DECLARE_MESSAGE_MAP() 22 | }; 23 | -------------------------------------------------------------------------------- /14/DrvInst/HIDPage.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/14/DrvInst/HIDPage.cpp -------------------------------------------------------------------------------- /14/DrvInst/HIDPage.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "afxcmn.h" 3 | #include "afxwin.h" 4 | 5 | 6 | // CHIDPage dialog 7 | 8 | class CHIDPage : public CPropertyPage 9 | { 10 | DECLARE_DYNAMIC(CHIDPage) 11 | 12 | public: 13 | CHIDPage(); 14 | virtual ~CHIDPage(); 15 | 16 | // Dialog Data 17 | enum { IDD = IDD_HIDPAGE }; 18 | 19 | protected: 20 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 21 | 22 | virtual BOOL OnSetActive(); 23 | virtual BOOL OnInitDialog(); 24 | 25 | DECLARE_MESSAGE_MAP() 26 | public: 27 | CListCtrl m_lstctl_drv_status; 28 | CListCtrl m_lstctl_HID; 29 | CButton m_btn_update; 30 | afx_msg void OnBnClickedUpdate(); 31 | }; 32 | -------------------------------------------------------------------------------- /14/DrvInst/ReadMe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/14/DrvInst/ReadMe.txt -------------------------------------------------------------------------------- /14/DrvInst/StartPage.cpp: -------------------------------------------------------------------------------- 1 | // DrvStartPage.cpp : implementation file 2 | // 3 | 4 | #include "stdafx.h" 5 | #include "DrvInst.h" 6 | #include "StartPage.h" 7 | #include "setup.h" 8 | #include "DrvInstSheetEx.h" 9 | // DrvStartPage dialog 10 | 11 | IMPLEMENT_DYNAMIC(DrvStartPage, CPropertyPage) 12 | 13 | DrvStartPage::DrvStartPage() 14 | : CPropertyPage(DrvStartPage::IDD, 0) 15 | , m_nFunction(0) 16 | , m_nDrvRadio(0) 17 | { 18 | //m_psp.dwFlags |= PSP_HIDEHEADER; 19 | } 20 | 21 | DrvStartPage::~DrvStartPage() 22 | { 23 | } 24 | 25 | void DrvStartPage::DoDataExchange(CDataExchange* pDX) 26 | { 27 | CPropertyPage::DoDataExchange(pDX); 28 | DDX_Radio(pDX, IDRD_INSTALL, m_nDrvRadio); 29 | DDX_Control(pDX, IDSTA_MAIL, m_staLink_Mail); 30 | DDX_Control(pDX, IDSTA_CY001, m_ctl_sta_cy001); 31 | DDX_Control(pDX, IDSTA_TAOBAO, m_ctl_sta_taobao); 32 | } 33 | 34 | 35 | BEGIN_MESSAGE_MAP(DrvStartPage, CPropertyPage) 36 | END_MESSAGE_MAP() 37 | 38 | 39 | BOOL DrvStartPage::OnSetActive() 40 | { 41 | CPropertySheet* pSheet = (CPropertySheet*)GetParent(); 42 | ASSERT_KINDOF(CPropertySheet, pSheet); 43 | pSheet->SetWizardButtons(PSWIZB_NEXT); 44 | return CPropertyPageEx::OnSetActive(); 45 | } 46 | 47 | 48 | // DrvStartPage message handlers 49 | 50 | BOOL DrvStartPage::OnInitDialog() 51 | { 52 | CPropertyPage::OnInitDialog(); 53 | 54 | //m_staLink_Mail.SetWindowText(""); 55 | m_staLink_Mail.SetURL("mailto:ChinaHearing@gmail.comm"); 56 | m_ctl_sta_cy001.SetURL("http://bbs.driverdevelop.com/read.php?fid=22&tid=119314&toread=1"); 57 | m_ctl_sta_taobao.SetURL("http://item.taobao.com/auction/item_detail-0db1-a0c291b295a21e59db601e65166b98e1.jhtml"); 58 | return TRUE; 59 | } 60 | 61 | LRESULT DrvStartPage::OnWizardNext() 62 | { 63 | UpdateData(); 64 | 65 | CDrvInstSheet* pSheet = (CDrvInstSheet*)GetParent(); 66 | ASSERT_KINDOF(CDrvInstSheet, pSheet); 67 | pSheet->setDrvMode(m_nDrvRadio); 68 | 69 | return CPropertyPage::OnWizardNext(); 70 | } 71 | -------------------------------------------------------------------------------- /14/DrvInst/StartPage.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "afxwin.h" 3 | #include "XHyperLink.h" 4 | 5 | 6 | // DrvStartPage dialog 7 | 8 | class DrvStartPage : public CPropertyPage 9 | { 10 | DECLARE_DYNAMIC(DrvStartPage) 11 | 12 | public: 13 | DrvStartPage(); 14 | virtual ~DrvStartPage(); 15 | 16 | 17 | // Dialog Data 18 | enum { IDD = IDD_STARTPAGE }; 19 | 20 | protected: 21 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 22 | 23 | DECLARE_MESSAGE_MAP() 24 | public: 25 | int m_nFunction; 26 | virtual BOOL OnSetActive(); 27 | virtual BOOL OnInitDialog(); 28 | virtual LRESULT OnWizardNext(); 29 | int m_nDrvRadio; 30 | CXHyperLink m_staLink_Mail; 31 | CXHyperLink m_ctl_sta_cy001; 32 | CXHyperLink m_ctl_sta_taobao; 33 | }; 34 | -------------------------------------------------------------------------------- /14/DrvInst/XHyperLink.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/14/DrvInst/XHyperLink.cpp -------------------------------------------------------------------------------- /14/DrvInst/res/DrvInst.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/14/DrvInst/res/DrvInst.ico -------------------------------------------------------------------------------- /14/DrvInst/res/DrvInst.rc2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/14/DrvInst/res/DrvInst.rc2 -------------------------------------------------------------------------------- /14/DrvInst/res/ICON.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/14/DrvInst/res/ICON.ico -------------------------------------------------------------------------------- /14/DrvInst/res/background.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/14/DrvInst/res/background.bmp -------------------------------------------------------------------------------- /14/DrvInst/res/baner16.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/14/DrvInst/res/baner16.bmp -------------------------------------------------------------------------------- /14/DrvInst/res/header.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/14/DrvInst/res/header.bmp -------------------------------------------------------------------------------- /14/DrvInst/res/water16.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/14/DrvInst/res/water16.bmp -------------------------------------------------------------------------------- /14/DrvInst/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by DrvInst.rc 4 | // 5 | #define IDD_DRVINST_DIALOG 102 6 | #define IDD_STARTPAGE 103 7 | #define IDD_DRVINSTPAGE 104 8 | #define IDD_HIDPAGE 105 9 | #define IDD_DRVDELETEPAGE 106 10 | #define IDD_FINISHPAGE 107 11 | #define IDB_HEAD 129 12 | #define IDB_BACK 130 13 | #define IDS_START_T 131 14 | #define IDS_START_ST 132 15 | #define IDI_ICON 132 16 | #define IDS_INF_T 133 17 | #define IDS_INF_ST 134 18 | #define IDS_HID_T 135 19 | #define IDS_HID_ST 136 20 | #define IDS_DEL_T 137 21 | #define IDS_DEL_ST 138 22 | #define IDS_FINISH_T 139 23 | #define IDS_FINISH_ST 140 24 | #define IDC_RICHEDIT21 1001 25 | #define IDC_EDIT1 1006 26 | #define IDLST_INF_FILE 1010 27 | #define IDBTN_SEL_DIR 1011 28 | #define IDLST_INF_FILE2 1011 29 | #define IDBTN_UPDATE 1013 30 | #define IDS_INFO 1014 31 | #define IDS_INFO2 1015 32 | #define IDRD_INSTALL 1016 33 | #define IDRA_DELETE 1017 34 | #define IDC_LIST1 1018 35 | #define IDBTN_DELETE 1020 36 | #define IDBTN_OK 1021 37 | #define IDSTA_MAIL 1022 38 | #define IDSTA_CY001 1023 39 | #define IDSTA_TAOBAO 1024 40 | 41 | // Next default values for new objects 42 | // 43 | #ifdef APSTUDIO_INVOKED 44 | #ifndef APSTUDIO_READONLY_SYMBOLS 45 | #define _APS_NEXT_RESOURCE_VALUE 133 46 | #define _APS_NEXT_COMMAND_VALUE 32771 47 | #define _APS_NEXT_CONTROL_VALUE 1025 48 | #define _APS_NEXT_SYMED_VALUE 108 49 | #endif 50 | #endif 51 | -------------------------------------------------------------------------------- /14/DrvInst/setup.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/14/DrvInst/setup.cpp -------------------------------------------------------------------------------- /14/DrvInst/setup.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/14/DrvInst/setup.h -------------------------------------------------------------------------------- /14/DrvInst/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/14/DrvInst/stdafx.cpp -------------------------------------------------------------------------------- /14/DrvInst/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/14/DrvInst/stdafx.h -------------------------------------------------------------------------------- /14/DrvInst/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/14/DrvInst/targetver.h -------------------------------------------------------------------------------- /my_build.bat: -------------------------------------------------------------------------------- 1 | @echo on 2 | @echo %1 is chk or fre %3 is WXP or W2K or WNET. 3 | 4 | if "%4"=="/a" call my_clean %1 %2 %3 5 | 6 | pushd. 7 | call %BASEDIR%\bin\setenv.bat %BASEDIR% %1 %2 %3 8 | popd 9 | 10 | @echo on 11 | build -------------------------------------------------------------------------------- /my_clean.bat: -------------------------------------------------------------------------------- 1 | if exist Debug rd /s /q Debug 2 | if exist Release rd /s /q Release 3 | if exist obj%1_%3_%2 rd /s /q obj%1_%3_%2 4 | -------------------------------------------------------------------------------- /读我.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ztony478/Win_Dev_Driver_Code/32920ff03ea048297b35fdf5ffe3d623bb93da90/读我.doc --------------------------------------------------------------------------------