阅读:1670回复:12
怎样编译一个dll?
我安装那个passthru,系统一定要我指明sfilter.dll的路径。
sfilter.dll的源文件在ntddk\\src\\network\\config\\filter下面, 问题是我不知道该怎么编译它。 我试过很多的build的参数,但就是不编译,哪位可以告诉我怎么样稿啊。具体一定,省得不停的问,谢谢。 |
|
沙发#
发布于:2003-01-22 22:10
用这个 INF 吧,这样就不需要那个 DLL 了
[Version] Signature = \"$Windows NT$\" Class = NetService ClassGUID = {4D36E974-E325-11CE-BFC1-08002BE10318} Provider = %Msft% DriverVer = 06/24/1999,5.00.2071.1 [Manufacturer] %Msft% = MSFT [ControlFlags] [MSFT] %SFilter_Desc% = SFilter.ndi, ms_sfilter [SFilter.ndi] AddReg = SFilter.ndi.AddReg, SFilter.AddReg ; Note: ; 1. The NCF_* flags are defined in netcfgx.h ; 2. NCF_HAS_UI (0x80) is required only if the filter has a Notify object ; and it supports custom property pages. ;Characteristics = 0x490 ; NCF_HAS_UI | NCF_FILTER | NCF_NO_SERVICE !!--Filter Specific--!! Characteristics = 0x410 ; NCF_FILTER | NCF_NO_SERVICE !!--Filter Specific--!! ;CopyFiles = SFilter.CopyFiles.Init, SFilter.CopyFiles.Sys, SFilter.CopyFiles.Inf CopyFiles = SFilter.CopyFiles.Sys, SFilter.CopyFiles.Inf ; ---------------------------------------------------------------------- ; File copy ; [SourceDisksNames] 1=%DiskDescription%,\"\",, [SourceDisksFiles] ;sfilter.dll=1 passthru.sys=1 netsf_m.inf=1 [DestinationDirs] DefaultDestDir = 12 SFilter.CopyFiles.Init = 11 ; %windir%\\System32 SFilter.CopyFiles.Sys = 12 ; %windir%\\System32\\drivers SFilter.CopyFiles.Inf = 17 ; %windir%\\inf ; Copying of sfilter.dll is required only if the filter has a Notify object [SFilter.CopyFiles.Init] sfilter.dll,,,2 [SFilter.CopyFiles.Sys] passthru.sys,,,2 [SFilter.CopyFiles.Inf] netsf_m.inf,,,2 ; ---------------------------------------------------------------------- ; Filter Install ; [SFilter.ndi.AddReg] HKR, Ndi, HelpText, , %SFilter_HELP% ; ---------------------------------------------------------------------- ; Keys required if a Notify object is present ; These keys should be omitted if the Filter does not have any Notify object ; ; Note: ; 1. Only include the following lines if your filter has configuration UI ; that needs to be displayed. Otherwise, you should not need a notify ; object. ; 2. If you write your own notifyobject, use a different GUID for ClsID!! ; (Generate this with uuidgen.exe) ; ;HKR, Ndi, ClsID, , {df2e4f67-e93a-11d1-bb14-0000f8779051} ;HKR, Ndi, ComponentDll, , sfilter.dll ; ---------------------------------------------------------------------- ; !!--Filter Specific--!! ; ; Note: ; 1. Other components may also have UpperRange/LowerRange but for filters ; the value of both of them must be noupper/nolower ; 2. The value FilterClass is required. ; 3. The value Service is required ; 4. FilterDeviceInfId is the InfId of the filter device (miniport) that will ; be installed for each filtered adapter. ; In this case this is ms_sfiltermp (refer to netsf_m.inf) ; HKR, Ndi, FilterClass, , failover HKR, Ndi, FilterDeviceInfFile, , netsf_m.inf HKR, Ndi, FilterDeviceInfId, , ms_sfiltermp HKR, Ndi, Service, , Sfilter HKR, Ndi\\Interfaces, UpperRange, , noupper HKR, Ndi\\Interfaces, LowerRange, , nolower HKR, Ndi\\Interfaces, FilterMediaTypes, , \"ethernet, tokenring, fddi\" [SFilter.AddReg] ; The following key is Required ; The following key is SFilter specific HKR, Parameters, Param1, 0, 4 [SFilter.Ndi.Remove.Services] DelService = SFilter ; ---------------------------------------------------------------------- [Strings] Msft = \"Microsoft\" DiskDescription = \"Microsoft Sample Filter Disk\" SFilter_Desc = \"CCTV Filter\" SFilter_HELP = \"CCTV Filter\" |
|
板凳#
发布于:2003-01-23 09:12
passthru的inf里面不是给你说明该怎么改可以不用那个dll的么?
看看不就知道了么。 |
|
|
地板#
发布于:2003-01-23 12:12
多谢各位,现在问题是用了edust提供的那个inf安装之后,为什么在设备管理器里面是被禁用的呢?
那个dll到底是有什么作用啊? |
|
地下室#
发布于:2003-01-23 12:17
不会吧?我试过没问题的啊!
它提供一个配置界面。 |
|
5楼#
发布于:2003-01-23 14:00
没有配置界面,装好之后直接被禁用。
如果启动,它就查找设备、并安装驱动程序,在完成的对话框里面说什么结构错误,点了完成后又开始查找设备安装驱动程序,反正不停的这样。 |
|
6楼#
发布于:2003-01-23 14:01
装好之后直接被禁用。
如果启动,它就查找设备、并安装驱动程序,在完成的对话框里面说什么结构错误,点了完成后又开始查找设备安装驱动程序,反正不停的这样。 |
|
7楼#
发布于:2003-01-23 15:50
你先把sys copy到系统目录下面去,然后在安装
|
|
|
8楼#
发布于:2003-01-25 11:19
mmd,见鬼了。在另外一台机上安装就好了,编译也没问题了。都不知道是不是我的系统有问题了。
不能装的机系统是server,能搞定的是prefessional,是不是server也会不支持。 |
|
9楼#
发布于:2003-01-25 11:58
是不是安装了NETBEUI,安装了的话就卸载掉应该就ok了。我就这样。
|
|
|
10楼#
发布于:2003-01-25 12:29
这么说是 NETBEUI 跟 IMD 冲突?
|
|
11楼#
发布于:2003-01-26 18:35
应该是吧,我专门重装了几次系统来试都这样。
具体原因没有研究过,哪位能解释一下。 |
|
|
12楼#
发布于:2003-02-20 16:20
没有这种现象啊!我在W2K的高级服务版下同时装它们二个没问题啊!
|
|