动态库:kdm_dll.dll
ocx控件:UnionKdm.ocx
inf文件:UnionKdm.inf
其中inf文件编写方式格式如下:
[version]
signature="$CHICAGO$"
AdvancedINF=2.0
[DefaultInstall]
CopyFiles=InstallFilesSection,InstallInfSection
RegisterOCXs=RegisterOCXSection
[DefaultUninstall]
cleanup=1
Delfiles=UnionKdm.ocx
[RegisterOCXSection]
"%11%/UnionKdm.ocx"
[UnRegisterOCXSection]
"%11%/UnionKdm.ocx"
[InstallFilesSection]
kdm_dll.dll=kdm_dll.dll
UnionKdm.ocx=UnionKdm.ocx
[InstallInfSection]
UnionKdm.inf=UnionKdm.inf
[kdm_dll.dll]
file-win32-x86=thiscab
RegisterServer=no
DestDir=11
[UnionKdm.ocx]
file-win32-x86=thiscab
RegisterServer=yes
clsid={2369022F-A16C-497A-865A-6064BF366A56}
FileVersion=1,0,0,1
DestDir=InstallFilesSection
[DestinationDirs]
InstallFilesSection=11
打包cab包,注册控件:
1.cabarc n useKdmForJava.cab useKdmForJava.inf useKdmForJava.ocx kdm_dll.dll
2.makecert /sv "useKdmForJava.pvk" /n "cn=useKdmForJava" -$ "individual" -r useKdmForJava.cer
3.cert2spc useKdmForJava.cer useKdmForJava.spc
4.signcode signwizard
注:创建pvk文件时,在makecert 中加上-$ "individual" -r,进行signcode时选择md5,就可以解决!