📄 subject_20388.htm
字号:
<p>
序号:20388 发表者:930742 发表日期:2002-11-06 09:58:12
<br>主题:在制作自动下载的INF文件时,我有一些参数不明白,请指教
<br>内容:[DefaultInstall]<BR>CopyFiles=install.files<BR>RegisterOCXs=RegisterFiles<BR><BR>[RInstallApplicationFiles]<BR>CopyFiles=install.files<BR>RegisterOCXs=RegisterFiles<BR><BR>[DestinationDirs]<BR>install.files=11 //11是什么意思?<BR><BR>[SourceDisksNames]<BR>1=%DiskName%,Mytest.cab,1 //这个1是什么意思?这句话又是什么意思呢?<BR><BR>[install.files]<BR>Mytest.ocx=Mytest.ocx<BR>Mytest.dll=Mytest.dll<BR><BR>[RegisterFiles]<BR>%11%\Mytest.dll<BR>%11%\Mytest.ocx<BR><BR>[SourceDisksFiles]<BR>Mytest.ocx=1 //这里的1又是什么意思呢?<BR>Mytest.dll=1<BR>msvcrt.dll=1<BR>mfc42.dll=1<BR>OLEPRO32.DLL=1<BR><BR>。。。。<BR>我在网上下载了一个例子,但是不明白这些项是什么含义,很困惑。能给我讲一讲吗?或者有什么书可以看?<BR>多谢。
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:CDMA2000 回复日期:2002-11-06 10:04:07
<br>内容:11指windows目录吧
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:徐景周 回复日期:2002-11-06 10:20:16
<br>内容:可能是磁盘名、文件名和路径名或文件数吧
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:David Wong 回复日期:2002-11-06 11:12:37
<br>内容:<BR>1.<BR>11 System directory <BR><BR>you can get the topic "Sections of an .inf File" in MSDN(October-2000) by search<BR>"DestinationDirs" as following:<BR><BR>DestinationDirs Section <BR>[DestinationDirs]<BR><BR>file-list-section =ldid[, subdir ]<BR><BR>[DefaultDestDir=ldid[, subdir ]]<BR><BR>The [DestinationDirs] section defines the destination directories for the operations specified in file-list sections, which are either CopyFiles, RenFiles, or DelFiles entries. Optionally, a default destination directory can be specified for any CopyFiles, RenFiles, or DelFiles entries in the .inf file that are not explicitly named in the [DestinationDirs] section.<BR><BR>file-list-section<BR><BR>Name of a CopyFiles, RenFiles, or DelFiles entry. This name must be referred to in a Copyfiles, RenFiles, or DelFiles entry in an Install section. <BR><BR>Ldid<BR><BR>Logical disk identifier (LDID). This identifier can be one of the following values:<BR><BR>Value Meaning <BR>00 Null LDID - can be used to create a new LDID <BR>01 Source Drive:\pathname <BR>10 Computer directory (maps to the Windows directory on a server-based setup) <BR>11 System directory <BR>12 IOSubsys directory <BR>13 Command directory <BR>17 Inf directory <BR>18 Help directory <BR>20 Fonts <BR>21 Viewers <BR>22 VMM32 <BR>23 Color directory <BR>24 Root of drive containing the Windows directory <BR>25 Windows directory <BR>26 Guaranteed boot device for Windows (Winboot) <BR>28 Host Winboot <BR>30 Root directory of the boot drive <BR>31 Root directory for host drive of a virtual boot drive <BR><BR>subdir<BR><BR>Name of the directory within the directory named by LDID to be the destination directory. <BR><BR>The optional DefaultDestDir entry provides a default destination for any CopyFiles entries that use the direct copy (@file name) notation or any CopyFiles, RenFiles, or DelFiles entries not specified in the [DestinationDirs] section. If a DefaultDestDir entry is not used in a [DestinationDirs] section, the default directory is set to LDID_WIN. <BR><BR>The following example sets the destination directory for the MoveMiniPort entry to Windows\Iosybsys and sets the default directory for other sections to be the Bin folder on the boot drive: <BR><BR>[DestinationDirs] <BR>MoveMiniPort=12 ; Destination for MoveMiniPort section is<BR>; windows\iosubsys <BR><BR>DefaultDestDirs=30,bin ; Direct copies go to boot:\bin<BR><BR><BR>2. also, you can get other infomations.<BR>3. good luck <BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:阿宇 回复日期:2002-11-07 10:06:03
<br>内容:David wong:<BR>你好!我用ATL做了一个网上浏览地图的控件,不知道如何打包,如何制作.INF文件,请详细指点,或推荐一些资料,先谢了!!!!ycjyyang@sohu.com,谢谢!!!
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:David Wong 回复日期:2002-11-07 11:59:38
<br>内容:MSDN里就有呀!<BR>you can get it use "Internet First Steps: Upgrading an Existing ActiveX Control" as topic in MSDN (Oct-2000), as following:<BR><BR>Packaging Code for Downloading<BR>The CODEBASE Tag<BR>ActiveX controls are embedded in Web pages using the <OBJECT> tag. The CODEBASE parameter of the <OBJECT> tag specifies the location from which to download the control. CODEBASE can point at a number of different file types successfully.<BR><BR>Using the CODEBASE Tag with an OCX File<BR>CODEBASE="http://www.mysite.com/mycontrol.ocx#version=4,70,0,1086"<BR><BR>This solution downloads only the control's .ocx file, and requires any supporting DLLs to already be installed on the client machine. This will work for Internet Explorer 3.0 and MFC ActiveX controls built with Visual C++ 4.0 and 4.1, since Internet Explorer 3.0 ships with the supporting DLLs for Visual C++ 4.0 and 4.1 controls. If another Internet browser that is ActiveX control-capable is used to view this control, this solution will not work.<BR><BR>Using the CODEBASE Tag with an INF File<BR>CODEBASE="http://www.mysite.com/trustme.inf"<BR><BR>An .inf file will control the installation of an .ocx and its supporting files. This method is not recommended because it is not possible to sign an .inf file (see Signing Code for pointers on code signing). <BR><BR>Using the CODEBASE Tag with a CAB File<BR>CODEBASE="http://www.somesite.com/acontrol.cab#version=1,2,0,0"<BR><BR>Cabinet files are the recommended way to package ActiveX controls that use MFC. Packaging an MFC ActiveX control in a cabinet file allows an .inf file to be included to control installation of the ActiveX control and any dependent DLLs (such as the MFC DLLs). Using a CAB file automatically compresses the code for quicker download. If you are using a .cab file for component download, it is faster to sign the entire .cab file than each individual component. <BR><BR>Creating CAB Files<BR>The CABinet Development Kit can be obtained from the Microsoft developers Web site, http://www.microsoft.com/workshop/. In this kit you will find the necessary tools to construct cabinet files.<BR><BR>The cabinet file pointed to by CODEBASE should contain the .ocx file for your ActiveX control and an .inf file to control its installation. You create the cabinet file by specifying the name of your control file and an .inf file. Do not include dependent DLLs that may already exist on the system in this cabinet file. For example, the MFC DLLs are packaged in a separate cabinet file and referred to by the controlling .inf file.<BR><BR>For details on how to create a CAB file, see Creating a CAB file.<BR><BR>The INF File<BR>The following example, spindial.inf, lists the supporting files and the version information needed for the MFC Spindial control. Notice the location for the MFC DLLs is a Microsoft Web site. The mfc50.cab is provided and signed by Microsoft.<BR><BR>Contents of spindial.inf:<BR>[mfc50installer] <BR>file-win32-x86=http://activex.microsoft.com/controls/vc/mfc50.cab <BR>[msvcrt.dll] - FileVersion=5,0,0,6164 <BR>[mfc50.dll] - FileVersion=5,0,0,6256 <BR>[olepro32.dll] - FileVersion=5,0,0,6068<BR><BR>The <OBJECT> Tag<BR>The following example illustrates using the <OBJECT> tag to package the MFC Spindial sample control.<BR><BR><OBJECT ID="Spindial1" WIDTH=100 HEIGHT=51<BR> CLASSID="CLSID:06889605-B8D0-101A-91F1-00608CEAD5B3"<BR> CODEBASE="http://mysite/spindial.cab#Version=1,0,0,001"><BR> <PARAM NAME="_Version" VALUE="65536"><BR> <PARAM NAME="_ExtentX" VALUE="2646"><BR> <PARAM NAME="_ExtentY" VALUE="1323"><BR> <PARAM NAME="_StockProps" VALUE="0"><BR> <PARAM NAME="NeedlePosition" VALUE="2"><BR></OBJECT><BR><BR>In this case, spindial.cab will contain two files, spindial.ocx and spindial.inf. The following command will build the cabinet file: <BR><BR>C:\CabDevKit\cabarc.exe -s 6144 N spindial.cab spindial.ocx spindial.inf <BR><BR>The –s 6144 parameter reserves space in the cabinet for code signing.<BR><BR>The Version Tag<BR>Note here that the #Version information specified with a CAB file applies to the control specified by the CLASSID parameter of the <OBJECT> tag. <BR><BR>Depending on the version specified, you can force download of your control. For complete specifications of the OBJECT tag including the CODEBASE parameter, see the W3C reference.<BR><BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:David Wong 回复日期:2002-11-07 13:07:22
<br>内容:VB的程序可以用VisualStudio 6.0的package & deployment wizard<BR>现在.net下的开发模式我了解的不多,没有发言权。<BR>i'm so sorry!
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
回复者:930742 回复日期:2002-11-09 14:40:32
<br>内容: 我现在有一个问题:如果我的ocx需要一个dll支持,我再inf文件中也加入了这个dll的信息,那么再网页中,这个dll信息要不要用<object>标志也写出来?然后把codebase置为cab文件,还是再网页中只需要出现ocx的信息?<BR> 如果不在网页中指明,dll可以自动注册吗?<BR> 我对这种packet发布是第一次接触,还请多多帮忙。 谢谢。
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -