----------------------- Page 1-----------------------
IcePubDLL api 揭秘
版本号:1.5.0.4
2011.07.13
版权所有:冰雪乐园
CopyRight:Ice Snow Eden
1
----------------------- Page 2-----------------------
版本记录:
版本号 时间 记录人 变更原因 变更描述
1.0.0.1 2009.03.11 Yue. 工程创建 Base functions;
gui functions;
邮件系列
MD5、SHA1
„ „
1.0.0.2 2009.12.01 Yue. 补充,修改 Inet 系列
Des
CYuePrint
„ „
1.0.0.3 2010.07.23 Yue. 补充,修改 图像处理系列
icePub_copyFiles
„ „
1.1.0.1 2010.10.22 Yue. 补充,修改 icePub_speedMailText
icePub_makeDeskShortcut
„ „
1.2.0.1 2010.11.13 Yue. 补充 icePub_searchFiles
icePub_saveSubScreen
icePub_saveSubScreenJpg
„ „
1.2.0.2 2010.11.28 Yue. 补充, icePub_imgToSingleBmp
create myself icePub_toClipboard
icePub_compareFiles
„ „
1.2.0.3 2010.12.05 Yue. 补充 icePub_regOcx
icePub_fileHexToHexString
icePub_imgToImg
„ „
1.2.0.4 2010.12.07 Yue. 补充,修改 icePub_closeForm
icePub_closeFormFromFile
icePub_sendKeyToActivForm
icePub_randomIntegerString
icePub_randomHexString
„ „
1.2.0.5 2010.12.08 Yue. 补充 icePub_getAppExeName
icePub_getExeName
icePub_writeTextToFile
icePub_appendTextToFile
„ „
2
----------------------- Page 3-----------------------
版本号 时间 记录人 变更原因 变更描述
1.2.0.6 2010.12.09 Yue. 补充 icePub_big5ToSimp
icePub_simpToBig5
icePub_fileBig5ToSimp
icePub_fileSimpToBig5
„ „
1.2.0.7 2010.12.10 Yue. 补充 icePub_dictionaryCodeTransf
er
icePub_dictionaryCodeTransf
erString
icePub_setSysLanguage
icePub_openFromFile
„ „
1.3.0.1 2010.12.11 Yue. 补充 icePub_UdpInit
icePub_UdpSendData
icePub_UdpReceiveData
icePub_UdpSendAndReceive
„ „
1.3.0.2 2010.12.12 Yue. 补充 Des 扩展系列
icePub_base64Encode
icePub_base64Decode
icePub_htmlTo8
icePub_htmlTo16
icePub_htmlToCode
icePub_encryptText
icePub_decryptText
icePub_encryptText2
icePub_decryptText2
„ „
1.3.0.3 2010.12.21 Yue. 补充 icePub_dispImg
icePub_desEncryptionHex
icePub_desDecryptionHex
icePub_3desEncryptionHex
icePub_3desDecryptionHex
„ „
1.3.0.4 2010.12.26 Yue. 补充 icePub_checkLoginInfo
icePub_getPathList
icePub_downloadFromFile
„ „
1.3.0.5 2010.12.29 Yue. 补充 icePub_machineCode
icePub_countFiles
„ „
3
----------------------- Page 4-----------------------
版本号 时间 记录人 变更原因 变更描述
1.3.0.6 2011.01.07 Yue. 补充,修改 icePub_receiveMail
icePub_sendMailText
„ „
1.4.0.1 2011.01.09 Yue. 补充 icePub_getProcessInfo
icePub_getProcessPathByName
icePub_getProcessPathByPid
icePub_sizeFormToScreen
„ „
1.4.0.2 2011.01.15 Yue. 补充 icePub_hideForm
icePub_showForm
icePub_hideFormFromFile
icePub_showFormFromFile
„ „
1.4.0.3 2011.01.22 Yue. 补充 icePub_qq2008SendMsg
„ „
1.4.0.4 2011.02.19 Yue. 补充 icePub_runByAdmin
„ „
1.4.0.5 2011.03.06 Yue. 补充 icePub_readFileToText
icePub_getCurrentTime
icePub_getFormatString
icePub_terminatePID
icePub_moveFile
icePub_moveFiles
„ „
1.4.0.6 2011.04.10 Yue. 补充 icePub_base64Decode2
icePub_setFileLength
icePub_getImgfilePColor
icePub_setDataToBmp
icePub_getDataFromBmp
„ „
1.4.0.7 2011.05.18 Yue. 补充 icePub_getSysLanguage
icePub_base64EncodeFile
icePub_base64DecodeFile
icePub_getSubStringFromfile
„ „
1.4.0.8 2011.06.06 Yue. 补充 icePub_splitFile
icePub_getIconFromfile
icePub_getImgfileBlacks
icePub_encryptFile
icePub_decryptFile
„ „
4
----------------------- Page 5-----------------------
版本号 时间 记录人 变更原因 变更描述
1.4.0.9 2011.06.16 Yue. 补充 icePub_dictionaryCodeTransfer2
icePub_getClipboardText
icePub_getFavoriteFolder
icePub_popMenu
icePub_encryptText3
icePub_decryptText3
icePub_dictionaryCodeTransfer3
„ „
1.5.0.1 2011.06.24 Yue. 补充 icePub_setRunBySysStart
icePub_clearRunBySysStart
„ „
1.5.0.2 2011.06.30 Yue. 补充 icePub_copyFormToClipboard
icePub_formToClipboard
icePub_copyForegroundFormToCli
pboard
完善icePub_database 系列
icePub_bigInteger 系列
„ „
1.5.0.3 2011.07.02 Yue. 补充 icePub_setIEStartPage
icePub_getSubBmpFile
„ „
1.5.0.4 2011.07.13 Yue. 补充,修改 icePub_createWordBmpFile
icePub_getBufferFromImg2
icePub_readFileToHexString
icePub_writeHexStringToFile
icePub_setAutorunByOS
修正icePub_getImgfilePColor 里
的RGB 输出成BGR 了
icePub_getScreenHBitmap
icePub_getSubScreenHBitmap
icePub_saveBmp
„ „
5
----------------------- Page 6-----------------------
目录
IcePubDLL api 揭秘 1
版本记录: 2
序 10
1. 概述 11
1.1 前(乱)言 11
1.2 读者对象 12
1.3 开发/应用环境 12
1.4 icePubDLL.dll 获取途径 12
1.5 参考资料 13
1.6 缩略语及术语解释 14
2. 功能简介 15
2.1 基本内容 15
2.2 适用对象 15
2.3 函数命名规则 15
2.4 函数返回码 15
2.5 静态连接方式 15
3. api 主要函数功能描述 16
3.1 icePub_getInputText 16
3.2 icePub_getInputTextEx 18
3.3 icePub_dispText 20
3.4 icePub_dispValue 22
3.5 icePub_getLoginInfo 24
3.6 icePub_checkLoginInfo 26
3.7 icePub_getImageString2 28
3.8 icePub_getSelectPath 30
3.9 icePub_tcpSendAndReceiveText 32
3.10 icePub_UdpSendAndReceiveData 34
3.11 icePub_getScreenHBitmap 36
3.12 icePub_getSunScreenHBitmap 37
3.13 icePub_saveBmp 38
3.14 icePub_saveScreen 39
3.15 icePub_saveSubScreen 41
3.16 icePub_saveScreenJpg 43
3.17 icePub_saveSubScreenJpg 45
3.18 icePub_getSubBmpFile 47
3.19 icePub_ imgToBmp 49
3.20 icePub_imgToSingleBmp 51
3.21 icePub_imgToImg 53
3.22 icePub_imgReverse 55
3.23 icePub_imgCircumgyrate 57
3.24 icePub_dispBmp 59
3.25 icePub_dispImg 61
3.26 icePub_getImgfilePColor 63
3.27 icePub_getImgfileBlacks 65
3.28 icePub_getIconFromfile 67
3.29 icePub_setDataToBmp 69
6
----------------------- Page 7-----------------------
3.30 icePub_getDataFromBmp 71
3.31 icePub_createWordBmpFile 73
3.32 icePub_makePaths 75
3.33 icePub_setFileLength 77
3.34 icePub_copyFiles 79
3.35 icePub_moveFile 81
3.36 icePub_moveFiles 83
3.37 icePub_deleteFiles 85
3.38 icePub_searchFiles 87
3.39 icePub_countFiles 89
3.40 icePub_getPathList 91
3.41 icePub_compareFiles 93
3.42 icePub_splitFile 95
3.43 icePub_readFileToText 97
3.44 icePub_writeTextToFile 99
3.45 icePub_readFileToHexString 101
3.46 icePub_writeHexStringToFile 103
3.47 icePub_appendTextToFile 105
3.48 icePub_machineGetInfo 107
3.49 icePub_machineCode 109
3.50 icePub_activForm 111
3.51 icePub_hideForm 113
3.52 icePub_showForm 115
3.53 icePub_hideFormFromFile 117
3.54 icePub_showFormFromFile 119
3.55 icePub_sizeFormToScreen 121
3.56 icePub_closeForm 123
3.57 icePub_closeFormFromFile 125
3.58 icePub_sendKeyToActivForm 127
3.59 icePub_ClearCookies 129
3.60 icePub_ClearCache 131
3.61 icePub_getFavoriteFolder 133
3.62 icePub_setIEStartPage 135
3.63 icePub_regOcx 137
3.64 icePub_reboot 139
3.65 icePub_shutdown 141
3.66 icePub_toClipboard 143
3.67 icePub_getClipboardText 145
3.68 icePub_copyFormToClipboard 147
3.69 icePub_formToClipboard 149
3.70 icePub_copyForegroundFormToClipboard 151
3.71 icePub_getSysLanguage 153
3.72 icePub_setSysLanguage 155
3.73 icePub_getProcessInfo 157
3.74 icePub_getProcessPathByName 159
3.75 icePub_getProcessPathByPid 161
3.76 icePub_terminatePID 163
7
----------------------- Page 8-----------------------
3.77 icePub_makeDeskShortcut 165
3.78 icePub_open 167
3.79 icePub_openFromFile 169
3.80 icePub_getApplicationName 171
3.81 icePub_getApplicationPath 173
3.82 icePub_getAppExeName 175
3.83 icePub_getExeName 177
3.84 icePub_runByAdmin 179
3.85 icePub_setAutorunByOS 181
3.86 icePub_setRunBySysStart 183
3.87 icePub_clearRunBySysStart 185
3.88 icePub_receiveMail 187
3.89 icePub_receiveMailText 189
3.90 icePub_receiveMailTextToFile 191
3.91 icePub_sendMailText 193
3.92 icePub_sendMail 195
3.93 icePub_speedMailText 197
3.94 icePub_speedMail 199
3.95 icePub_fileHexToHexString 201
3.96 icePub_resourceIDSaveToFile 203
3.97 icePub_openUrl 205
3.98 icePub_openUrl2 207
3.99 icePub_getUrl 209
3.100 icePub_getUrl2 211
3.101 icePub_postUrl 213
3.102 icePub_postUrl2 215
3.103 icePub_downLoadUrl 217
3.104 icePub_downLoad 219
3.105 icePub_downloadFromFile 221
3.106 icePub_stringDeleteChar 223
3.107 icePub_stringDeleteSubstring 225
3.108 icePub_countSubString 227
3.109 icePub_countSubStringFromFile 229
3.110 icePub_getSubString 231
3.111 icePub_getSubStringFromfile 233
3.112 icePub_getFormatString 235
3.113 icePub_getHrefLinks 237
3.114 icePub_randomStrings 239
3.115 icePub_randomStringsToFile 241
3.116 icePub_randomIntegerString 243
3.117 icePub_randomHexString 245
3.118 icePub_bigIntegerAddition 247
3.119 icePub_bigIntegerSubtraction 249
3.120 icePub_bigIntegerMultiplication 251
3.121 icePub_bigIntegerDivision 253
3.122 icePub_base64Encode 255
3.123 icePub_base64Decode 257
8
----------------------- Page 9-----------------------
3.124 icePub_base64Decode2 259
3.125 icePub_base64EncodeFile 261
3.126 icePub_base64DecodeFile 263
3.127 icePub_htmlTo8 265
3.128 icePub_htmlTo16 267
3.129 icePub_htmlToCode 269
3.130 icePub_big5ToSimp 271
3.131 icePub_simpToBig5 273
3.132 icePub_fileBig5ToSimp 275
3.133 icePub_fileSimpToBig5 277
3.134 icePub_dictionaryCodeTransfer 279
3.135 icePub_dictionaryCodeTransfer2 281
3.136 icePub_dictionaryCodeTransfer3 283
3.137 icePub_dictionaryCodeTransferString 285
3.138 icePub_desEncryptionBuffer 287
3.139 icePub_desDecryptionBuffer 289
3.140 icePub_desEncryptionHex 291
3.141 icePub_desDecryptionHex 293
3.142 icePub_3desEncryptionHex 295
3.143 icePub_3desDecryptionHex 297
3.144 icePub_desEncryptionString 299
3.145 icePub_desDecryptionString 301
3.146 icePub_encryptText 303
3.147 icePub_decryptText 305
3.148 icePub_encryptText2 307
3.149 icePub_decryptText2 309
3.150 icePub_encryptText3 311
3.151 icePub_decryptText3 313
3.152 icePub_encryptFile 315
3.153 icePub_decryptFile 317
3.154 icePub_getMD5 319
3.155 icePub_getMD5FromString 321
3.156 icePub_getMD5FromFile 323
3.157 icePub_sha1FromString 325
4. 附录: 327
4.1 win 操作系统语言代码列表: 327
4.2 icePubDLL 实际应用程序源代码下载: 330
4.3 其它一些下载信息: 332
4.4 光天化日估妄评之: 333
9
----------------------- Page 10-----------------------
序
掐指一算,整整十年了。
十年前在青岛的一个宾馆里,认识了他,英俊潇洒,却有着古典的羞涩。手里拿着一个设备(像
是他的一个喜爱的玩具)。
他言语不多,却字字那么有理,经常让人豁然开朗。他朴素却思想丰富。
(这不是言情小说),因为,他是一个男工程师,我也是一个男工程师。我们为了一个项目,开
始了合作。这个项目因为某种原因原来的工期2 个月被压缩成了20 天,我白天与客户沟通业务流程。
他则分担了属于他的技术研发与部分我的技术研发。最终我们出色完成了任务,而大半前提是他的
出色。
之后几年中,我们一直作为一个团队战斗在各个领域的技术开发工作。似乎佩服之情也在随着
项目的增多而增加。
再后来,他一直作为我们的技术招牌,四处滥用。一次与二水商量(背着他),给他安了一个公
司首席科学家的头衔。
之后科学家的名称成了他的代名词,队伍在不停的壮大,科学家的名称从最初的 2 人知道到整
个大团队都知道到(地球人都知道)哈哈。
腼腆也不管了,反正这是个不好的绰号,因为他这样被我们理直气壮的分配了更多的、更痛苦、
更难的活。
他也知道这个大爷不好当,干脆培养新人吧,像学校扩招一样的收了不少的徒弟,但是很研究
的培养了好些开了花的并结了果的好苗子、好大数了。
年纪大了,他开始积累总结做过了东西,于是乎产下了一些蛋(这个工具包、文档算其中一个)。
至于蛋好不好吃,只有你吃了才知道,赵本山对他的这些蛋的评价是(谁用谁知道),哈哈试试吧!
他就是月光
友谊万岁(月光、二水、MOUSE、烦老师、还有我(人称人见人爱、四条眉毛.....))。
—老周
2010.12.21
10
----------------------- Page 11-----------------------
1. 概述
1.1 前(乱)言
从事软件开发多年,一惯是做自己喜欢的。
有过火烧眉毛,有过从容不迫;有过指点江山,有过云山雾罩;有过追寻,有过放弃„„
有人说过:“不就是个写程序做工具的么„”,对此我不屑一顾却又深以为然。说起程
序员,市场上可以用泛滥来形容了„,只要掏钱,能为你写程序的那是一抓一大把„,
只为生存。
经常有一个习惯,需要实现谋一功能,就去翻找以前做过的程序,回忆明白后复制下
来修改成目前所需的。封装啊,共用啊,一直在想但一直未动未实现。于是乎有了静态
链接库,那个庞大啊,我那个得意啊„,自恋。现如今又有了动态链接库„,icePubDLL。
此api 的特点,即从某些片面领域角度来满足大众化需求,亦服务于我之喜好。如果
有想按照你的想法做,请给我一个能接受的理由。
工作是残酷的,老板给的任务未必是自己喜欢研究的,但也要尽快交差啊„,还是生
存。oem 的概念想当初我也是着实接受适应了一阵,但现在想起,有些时候确实为我省
了太多时间,然后„,做自己喜欢的--哪怕仍旧是继续钻木取火。
高手、厉害、大虾„,说句实话,不是很好找的,对于一个上位者、掌控者而言。有
个小伙子说过:“让我们三流的技术做一流的产品,怎么可能„”,做为一个技术项目掌
控者或负责人,就是要也必须要做到这一点„,个人理念。回想近一年里带的一个没任
何经验的小伙子,深入了一个技术含量超高开发项目,后期还成为主力„,吹之。
究竟想要得到什么?写程序的、打工的„,苦力们。尤其是对于自己的付出,纠葛么?
复杂么?似乎没有所谓的高尚„,只有愿意否。“舍你甘愿之所舍,得你心安之所得”„,
仅此而已。包括生存。
不知何时幻想过,调用一个函数就把小鬼子给灭种了„,妄境。但高度封装(集成)
的概念却萌生在脑海中,一个软件,几个函数而已„,画界面去吧。挥刀的过程中一缕
分神在运筹帷幄着,组队布阵。也曾留下没洗脚的足印:一个函数而已,自己写吧„,
真是狂妄。
这天和mouse 电话了一番,慨叹了身体的重要性,之感触那是相当的波澜„,一种悲
哀。争?搏?创?力还能从心么„,一种尴尬。
天下大乱也该Over 了。
东东很烂,但用得蛮爽,起码对于我。欢迎扔鸡蛋,加上西红柿则更好„,开饭了。
哎!做自己喜欢的„,也是一种境界。
冰雪.月光
11
----------------------- Page 12-----------------------
1.2 读者对象
在实际应用开发中的程序员。
偷懒的程序员。
对ice 信任的编程爱好者。
支持国货的(组装的„,冒汗)。
程海茫茫,无力改变什么„,只沧海一粟。
1.3 开发/应用环境
Microsoft Visual C++ 6.0
Windows98 OR 以上,推荐WindowsXP
为了省事,有些数据处理内部和函数接口用了MFC 类库,so 需要Mfc42.dll (win98以上都自带);
一些图像文件读取用了GDI++,so 需要GdiPlus.dll (正常windows 都会自带)。
虽然在用win7,但还是要装VC6„,情有独钟。
1.4 icePubDLL.dll 获取途径
http://dl.icese.net/dev.php?f=icePubDll.rar 最新版下载
(包含:.lib静态连接 .dll 动态库 .h 静态连接大多数函数声明头文件)
向 icepubdll@gmail.com 索取,可能会慢那么一点点。
注:不要改icePubDll.dll 文件名的大小写„
不知何年何月就会灰飞湮灭„,陌生遥远的哭泣。
12
----------------------- Page 13-----------------------
1.5 参考资料
《自92 年以来的积累》
具体有啥,说不清了„,逃避
友情推荐:05年收的一个徒弟,终于出了一本书
《Visual Basic从初学到精通(含DVD光盘1张)》—张建辉
http://www.phei.com.cn/bookshop/bookinfo.asp?bookcode=TP106410&booktype=main
这小子竟然让我自己掏钱买„,鄙视他。
“这小子竟然不送我一本,气愤!”—by meteor
“太简单了,还是搞我的C++吧„”—by 行者
“倒霉孩子,才赚这么一点儿钱„”—by cloud
“光盘已经拷到硬盘里了,太大,删了„”—by yue
“没点技术含量,翻了20 多页,发现3 个错误„”—by linux_king
“听说帅哥没出息,但是我要学„” —by 七彩花香
“张建辉就是阿辉,他的宠物咳咳咳„” —by butterfly
《PHP 标准教程(附光盘)》-又出新书
http://product.china-pub.com/55782
模糊的记忆,依稀曾看过的书:
《老谭的C 教科书,冒汗》
《Visual Basic 4 大全》—B.麦金尼
《Visual C++ 5.0 易学活用》
《VC++技术内幕 第四版》
《Visual C++ 6.0 类库大全》
《Microsoft Visual C++ 6.0 MFC 类库参考手册》
蓝色的为电子书,可邮件索要。MS 都可以baidu 到„
淡忘着书店的模样,已被网络淹没„,芸芸众书。
13
----------------------- Page 14-----------------------
1.6 缩略语及术语解释
缩略语 术语 定义
icePubDLL Ice Public DLL 冰雪公开发布的动态链接库
icese Ice Snow Eden 冰雪乐园
API Application Programming Interface 应用程序编程接口
DLL Dynamic Link Library 动态链接库
VC Visual C++
VB Visual Basic
BCB Borland C++ Builder
本文中特指静态方式调用DLL 需
Lib Library
要链接的Lib 库
资深技术专家,只玩c
mouse ft mouse
俺的呕像
MS Microsoft/Mao Si 微软/貌似
言多必失„,沉默。
14
----------------------- Page 15-----------------------
2. 功能简介
2.1 基本内容
涉及(不是覆盖„,冒汗):简单的Dailog 界面输入输出、字符串函数、加密解密函
数、编解码函数、一些实用的应用函数„ „
差不多有170 多个可调用函数,会慢慢放出,慢慢撰写;也慢慢扩充。不要着急,不
要着急„,休息,休息一会。
2.2 适用对象
服务于能调用windows 下的dll 的编程语言,典型的如VC、VB、BCB 等。
2.3 函数命名规则
icePub_xxxx(标准参数接口),基本适用各windows 编程语言调用。
2.4 函数返回码
int 型的除了是返回个数、句柄等,没有做说明的一率返回0 为成功,负值为错误。
2.5 静态连接方式
#pragma comment(lib,"icePubDll.lib")
15
----------------------- Page 16-----------------------
3. api 主要函数功能描述
VB 里有InputBox,VC 却没有„,第一个dll 函数的诞生。
3.1 icePub_getInputText
函数原型:
int WINAPI icePub_getInputText(char *strInfo,char *strTitle)
输入:strInfo 原始数据串,会在输入框里显示
strTitle 标题
输出:strInfo 输入的数据串
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_getInputText(char *strInfo,char *strTitle);
动态调用例程
iceMathTest 里做题输入答案的代码:
char buff[1024];
buff[0]=0;
typedef int (WINAPI ICEPUB_GETINPUTTEXT)(char *strInfo,char *strTitle);
ICEPUB_GETINPUTTEXT *icePub_getInputText = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getInputText=(ICEPUB_GETINPUTTEXT*)GetProcAddress(hDLLDrv,"icePub_getInputText");
}
if(icePub_getInputText)
icePub_getInputText(buff," 1) 17 + 28 =");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
16
----------------------- Page 17-----------------------
VB sample 代码:
Private Declare Function icePub_getInputText Lib "icePubDll.dll" (ByVal strInfo As String, ByVal strTitle As
String) As Integer
'定义存储用户输入的数据
Dim str1 As String
'函数返回值
Dim a As Integer
str1 = Space(1024)
'使用函数建立输入窗口获得数据
a = icePub_getInputText(str1, "请输入要显示的数据")
MsgBox str1
必要性不大,VB 有InputBox 即可代替。
17
----------------------- Page 18-----------------------
3.2 icePub_getInputTextEx
函数原型:
int WINAPI icePub_getInputTextEx (char *strInfo,char *strTitle,int inputLen)
输入:strInfo 原始数据串,会在输入框里显示
strTitle 标题
inputLen 输入字符串最大长度
输出:strInfo 输入的数据串
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_getInputTextEx (char *strInfo,char *strTitle,int inputLen);
动态调用例程
IceIE 里QQ 新闻KILL 功能输入时间间隔的代码:
qqkill_time=0;
{
char buff[1024];
buff[0]=0;
typedef int (WINAPI ICEPUB_GETINPUTTEXTEX)(char *strInfo,char *strTitle,int inputLen);
ICEPUB_GETINPUTTEXTEX *icePub_getInputTextEx = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getInputTextEx = (ICEPUB_GETINPUTTEXTEX *)GetProcAddress(hDLLDrv,
"icePub_getInputTextEx");
}
if(icePub_getInputTextEx)
icePub_getInputTextEx(buff,"请输入QQ 新闻KILL 时间间隔(秒)",2);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
if(strlen(buff) > 0)
{
qqkill_time=atoi(buff);
}
}
18
----------------------- Page 19-----------------------
VB sample 代码:
Private Declare Function icePub_getInputTextEx Lib "icePubDll.dll" (ByVal strInfo As String, ByVal strTitle
As String, ByVal inputLen As Integer) As Integer
'定义存储用户输入的数据
Dim str1 As String
'函数返回值
Dim a As Integer
str1 = Space(16)
'使用函数建立输入窗口获得数据
a = icePub_getInputTextEx (str1, "请输入IP 地址",15)
MsgBox str1
19
----------------------- Page 20-----------------------
3.3 icePub_dispText
函数原型:
int WINAPI icePub_dispText(char *strInfo,char *strTitle,int clipFlag)
输入:strInfo 显示的文本串
strTitle 标题
clipFlag 是否同时把strInfo 复制到剪切板;0,1,2
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_dispText(char *strInfo,char *strTitle,int clipFlag);
动态调用例程
iceMathTest 里做题输出答题结果的代码:
char buff[1024];
strcpy(buff,"考试卷"
"\r\n"
" 1) 16 + 15 = 31 对"
"\r\n"
" 2) 9 + 11 = 20 对"
"\r\n"
" 3) 19 + 10 = 29 对"
"\r\n"
);//做为例子就硬赋值了
typedef int (WINAPI ICEPUB_DISPTEXT)(char *strInfo,char *strTitle);
ICEPUB_DISPTEXT *icePub_dispText = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_dispText = (ICEPUB_DISPTEXT *)GetProcAddress(hDLLDrv, "icePub_dispText");
}
if(icePub_dispText)
icePub_dispText(buff,"您的答卷",0);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
20
----------------------- Page 21-----------------------
VB sample 代码:
Private Declare Function icePub_dispText Lib "icePubDll.dll" (ByVal strInfo As String, ByVal strTitle As
String, ByVal clipFlag As Integer) As Integer
Dim str1 As String
'函数返回值
Dim a As Integer
str1 = "做你喜欢的~"
'最后一个参数有两个取值,为1 时将数据同时复制到剪切板上,为0 时不复制
a = icePub_dispText(str1, "显示数据", 0)
21
----------------------- Page 22-----------------------
3.4 icePub_dispValue
函数原型:
int WINAPI icePub_dispValue(int val)
输入:val 显示的数值
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_dispValue(int val) ;
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_DISPVALUE)( int val);
ICEPUB_DISPVALUE *icePub_dispValue = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_dispValue = (ICEPUB_DISPVALUE *)GetProcAddress(hDLLDrv, "icePub_dispValue");
}
if(icePub_dispValue != NULL)
{
icePub_dispValue(123);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
22
----------------------- Page 23-----------------------
VB sample 代码:
Private Declare Function icePub_dispValue Lib "icePubDll.dll" (ByVal val As Long) As Integer
Dim a2 As Integer
a2 = icePub_dispValue (888)
MsgBox Str(val)即可代替
23
----------------------- Page 24-----------------------
3.5 icePub_getLoginInfo
函数原型:
int WINAPI icePub_getLoginInfo(char *strUserId,char *strPassWord,char *strTitle)
输入:strTitle 标题
输出:strUserId 登录的用户ID
strPassWord 登录的密码
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_getLoginInfo(char *strUserId,char *strPassWord,char *strTitle);
动态调用例程
VC sample 代码:
char buff[1024];
char buff2[1024];
buff[0]=0;
buff2[0]=0;
typedef int (WINAPI ICEPUB_GETLOGININFO)(char *strUserId,char *strPassWord,char *strTitle);
ICEPUB_GETLOGININFO *icePub_getLoginInfo = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getLoginInfo=(ICEPUB_GETLOGININFO*)GetProcAddress(hDLLDrv, "icePub_getLoginInfo");
}
if(icePub_dispText)
icePub_getLoginInfo(buff,buff2,"请输入登录信息");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
if(strcmp(buff,"admin") == 0 && strcmp(buff2,"888888") == 0)
{
//登录成功
}
24
----------------------- Page 25-----------------------
VB sample 代码:
Private Declare Function icePub_getLoginInfo Lib "icePubDll.dll" (ByVal strUserId As String, ByVal
strPassword As String, ByVal strTitle As String) As Integer
Dim strUID As String
Dim strPassword As String
Dim a2 As Integer
strUID = Space(1024)
strPassword = Space(1024)
a2 = icePub_getLoginInfo(strUID , strPassword , "请登录")
MsgBox strUID
MsgBox strPassword
25
----------------------- Page 26-----------------------
3.6 icePub_checkLoginInfo
函数原型:
int WINAPI icePub_checkLoginInfo(char *strUserId,char *strPassWord,char *strTitle)
输入:strTitle 标题
输出:strUserId 正确的用户ID
strPassWord 正确的密码
返回:0 输入正确,-1 都不正确,-2 用户ID 不正确,-3 密码不正确
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_checkLoginInfo(char *strUserId,char *strPassWord,char *strTitle);
动态调用例程
VC sample 代码:
int a=- 1;
typedef int (WINAPI ICEPUB_CHECKLOGININFO)(char *strUserId,char *strPassWord,char *strTitle);
ICEPUB_CHECKLOGININFO *icePub_checkLoginInfo = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_checkLoginInfo=(ICEPUB_CHECKLOGININFO*)GetProcAddress(hDLLDrv,
"icePub_checkLoginInfo");
}
if(icePub_checkLoginInfo)
a=icePub_checkLoginInfo("admin","888888","请输入登录信息");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
if(a == 0)
{
//验证成功
}
26
----------------------- Page 27-----------------------
VB sample 代码:
Private Declare Function icePub_checkLoginInfo Lib "icePubDll.dll" (ByVal strUserId As String, ByVal
strPassword As String, ByVal strTitle As String) As Integer
Dim a2 As Integer
a2 = icePub_checkLoginInfo("admin", "112233", "请登录")
If a2 = 0 Then
MsgBox "验证成功"
Else
MsgBox "验证失败"
End If
27
----------------------- Page 28-----------------------
3.7 icePub_getImageString2
函数原型:
int WINAPI icePub_getImageString2(char *strInfo,char *strBmpFileName,char *strTitle)
输入:strTitle 标题
strBmpFileName 图片文件
输出:strInfo 输入的字符串
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_getImageString2(char *strInfo,char *strBmpFileName,char *strTitle);
动态调用例程
VC sample 代码:
char buff[1024];
buff[0]=0;
typedef int (WINAPI ICEPUB_GETIMAGESTRING2)(char *strInfo,char *strBmpFileName,char *strTitle);
ICEPUB_GETIMAGESTRING2 *icePub_getImageString2 = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getImageString2=(ICEPUB_GETIMAGESTRING2
*)GetProcAddress(hDLLDrv,"icePub_getImageString2");
}
if(icePub_getImageString2)
icePub_getImageString2(buff,"tmp_check1.bmp","请输入图片显示的数字");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBOx(buff);
28
----------------------- Page 29-----------------------
VB sample 代码:
Private Declare Function icePub_getImageString2 Lib "icePubDll.dll" (ByVal strInfo As String, ByVal
strBmpFileName As String, ByVal strTitle As String) As Integer
Dim str1 As String
Dim a2 As Integer
str1 = Space(1024)
a2 = icePub_getImageString2(str1, "a.bmp", "请输入图片里的数字")
'只能是bmp 图片文件
MsgBox str1
29
----------------------- Page 30-----------------------
3.8 icePub_getSelectPath
函数原型:
int WINAPI icePub_getSelectPath(char *strPath,int maxLen)
输入:maxLen strPath 的最大buffer
输出:strPath 选择的路径
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_getSelectPath(char *strPath,int maxLen);
动态调用例程
VC iceSetup 选择安装目录代码:
char szPath[1024*10];
typedef int (WINAPI ICEPUB_GETSELECTPATH)(char *strPath,int maxLen);
ICEPUB_GETSELECTPATH *icePub_getSelectPath = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getSelectPath = (ICEPUB_GETSELECTPATH *)GetProcAddress(hDLLDrv,
"icePub_getSelectPath");
}
icePub_getSelectPath(szPath, 1023);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(szPath);
30
----------------------- Page 31-----------------------
VB sample 代码:
Private Declare Function icePub_getSelectPath Lib "icePubDll.dll" (ByVal strPath As String,ByVal maxLen As
Integer) As Integer
Dim str1 As String
Dim a2 As Integer
str1 = Space(1024*10+1)
a2 = = icePub_getSelectPath(str1,1024*10)
MsgBox str1
31
----------------------- Page 32-----------------------
3.9 icePub_tcpSendAndReceiveText
函数原型:
int WINAPI icePub_tcpSendAndReceiveText(char *sendBuff, int sendBuffLen,char
*recvBuff,int recvMaxLen,char* serverIP,int serverPort)
输入:sendBuff 发送的数据
sendBuffLen sendBuff 的长度
recvMaxLen recvBuff 的最大长度
serverIP 地址
serverPort 端口
输出:recvBuff 接收的数据
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_tcpSendAndReceiveText(char *sendBuff, int sendBuffLen,char
*recvBuff,int recvMaxLen,char* serverIP,int serverPort);
动态调用例程
VC sample 主要代码:
char buff[ 1024];
char buff2[1024*10];
int receiveLen;
strcpy(buff,"GET / HTTP/1.1\r\nAccept: */*\r\nAccept -Language: zh -cn\r\nHost: baidu.com\r\nConnection:
Keep -Alive\r\n\r\n");
typedef int (WINAPI ICEPUB_TCPSENDANDRECEIVETEXT)(char *sendBuff, int sendBuffLen,char
*recvBuff,int recvMaxLen,char* serverIP,int serverPort);
ICEPUB_TCPSENDANDRECEIVETEXT *icePub_tcpSendAndReceiveText = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_tcpSendAndReceiveText=(ICEPUB_TCPSENDANDRECEIVETEXT
*)GetProcAddress(hDLLDrv,"icePub_tcpSendAndReceiveText");
}
if(icePub_tcpSendAndReceiveText)
receiveLen=icePub_tcpSendAndReceiveText(buff,strlen(buff),buff2,1024*10,"baidu.com",80);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff2);
32
----------------------- Page 33-----------------------
VB sample 代码:
Private Declare Function icePub_tcpSendAndReceiveText Lib "icePubDll.dll" (ByVal sendBuff As String,
ByVal sendBuffLen As Integer, ByVal recvBuff As String, ByVal recvMaxLen As Integer, ByVal serverIP As
String, ByVal serverPort As Integer) As Integer
Dim str1 As String
Dim str2 As String
Dim receiveLen As Integer
str1 = Space(1024 * 10 + 1)
str2 = "GET / HTTP/1.1" + vbCrLf
str2 = str2 + "Accept: */*" + vbCrLf
str2 = str2 + "Accept -Language: zh -cn" + vbCrLf
str2 = str2 + "Host: baidu.com" + vbCrLf
str2 = str2 + "Connection: Keep -Alive" + vbCrLf + vbCrLf
receiveLen = icePub_tcpSendAndReceiveText(str2, LenB(str2), str1, 1024 * 10, "www.baidu.com", 80)
MsgBox str1
33
----------------------- Page 34-----------------------
3.10 icePub_UdpSendAndReceiveData
函数原型:
int WINAPI icePub_UdpSendAndReceiveData(char *sendBuffer,int bufferLen,char *strIP,int
port,char *receiveBuffer,int timeoutSeconds,int retryCounts)
输入:sendBuffer 发送的数据
bufferLen sendBuffer 的长度
strIP 服务端地址
port 端口
timeoutSeconds 超时时间,秒
retryCounts 接收失败重发次数
输出:receiveBuffer 接收的数据
返回码:接收数据的长度
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_UdpSendAndReceiveData(char *sendBuffer,int bufferLen,char *strIP,int
port,char *receiveBuffer,int timeoutSeconds,int retryCounts);
动态调用例程
VC sample 主要代码:
char buff[1024],buff2[1024*10];
int receiveLen;
strcpy(buff,"tag:01\r\ncommand:reboot\r\ndata:none\r\n");
typedef int (WINAPI ICEPUB_UDPSENDANDRECEIVEDATA)(char *sendBuffer,int bufferLen,char
*strIP,int port,char *receiveBuffer,int timeoutSeconds,int retryCounts);
ICEPUB_UDPSENDANDRECEIVEDATA *icePub_UdpSendAndReceiveData = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
icePub_UdpSendAndReceiveData=(ICEPUB_UDPSENDANDRECEIVEDATA
*)GetProcAddress(hDLLDrv,"icePub_UdpSendAndReceiveData");
if(icePub_UdpSendAndReceiveData)
receiveLen=icePub_UdpSendAndReceiveData(buff,strlen(buff),"192.168.1.111",6000,buff2,15,1);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff2);
34
----------------------- Page 35-----------------------
VB sample 代码:
Private Declare Function icePub_UdpSendAndReceiveData Lib "icePubDll.dll" (ByVal sendBuffer As
String, ByVal bufferLen As Integer, ByVal strIP As String, ByVal port As Integer, ByVal receiveBuffer As
String, ByVal timeoutSeconds As Integer, ByVal retryCounts As Integer) As Integer
Dim receiveLen As Integer
Dim buff As String
Dim buff2 As String
buff="tag:01"+vbCrLf+"command:killapplication"+vbCrLf+"data:360"+vbCrLf
buff2=Space(1024*10)
receiveLen=icePub_UdpSendAndReceiveData(buff,LenB(buff),"192.168.1.111",6000,buff2,15,1);
MsgBox buff2
35
----------------------- Page 36-----------------------
3.11 icePub_getScreenHBitmap
函数原型:
HBITMAP WINAPI icePub_getScreenHBitmap()
输入:
输出:
返回值:屏幕图像的 HBITMAP
VC sample 代码:
extern "C"
{
__declspec(dllexport)
HBITMAP WINAPI icePub_getScreenHBitmap() ;
}
#pragma comment(lib,"icePubDll.lib")
HBITMAP hbmp=NULL;
hbmp=icePub_getScreenHBitmap();
36
----------------------- Page 37-----------------------
3.12 icePub_getSunScreenHBitmap
函数原型:
HBITMAP WINAPI icePub_getSunScreenHBitmap(int startX,int startY,int endX,int endY)
输入:startX 左上角x 坐标
startY 左上角y 坐标
endX 右下角x 坐标
endY 右下角y 坐标
输出:
返回值:屏幕图像的 HBITMAP
VC sample 代码:
extern "C"
{
__declspec(dllexport)
HBITMAP WINAPI icePub_getSunScreenHBitmap(int startX,int startY,int endX,int endY);
}
#pragma comment(lib,"icePubDll.lib")
HBITMAP hbmp=NULL;
hbmp=icePub_getSunScreenHBitmap(0,0,100,60);
37
----------------------- Page 38-----------------------
3.13 icePub_saveBmp
函数原型:
int WINAPI icePub_saveBmp(HBITMAP hBitmap,char *strBmpFileName)
输入:hBitmap 图像的HBITMAP
strBmpFileName 屏幕图像文件名
输出:
VC sample 代码:
extern "C"
{
__declspec(dllexport)
HBITMAP WINAPI icePub_getSunScreenHBitmap(int startX,int startY,int endX,int endY);
__declspec(dllexport)
int WINAPI icePub_saveBmp(HBITMAP hBitmap,char *strBmpFileName);
}
#pragma comment(lib,"icePubDll.lib")
HBITMAP hbmp=NULL;
hbmp=icePub_getSunScreenHBitmap(0,0, 100,60);
icePub_saveBmpn(hbmp,"screen.bmp");
38
----------------------- Page 39-----------------------
3.14 icePub_saveScreen
函数原型:
int WINAPI icePub_saveScreen(char *bmpFile)
输入:bmpFile 屏幕图像文件名
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_saveScreen(char *bmpFile);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_SAVESCREEN)(char *bmpFile);
ICEPUB_SAVESCREEN *icePub_saveScreen = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_saveScreen=(ICEPUB_SAVESCREEN *)GetProcAddress(hDLLDrv,"icePub_saveScreen");
}
if(icePub_saveScreen)
icePub_saveScreen("screen.bmp");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
39
----------------------- Page 40-----------------------
VB sample 代码:
Private Declare Function icePub_saveScreen Lib "icePubDll.dll" (ByVal bmpFile As String) As Integer
Dim str1 As String
Dim a2 As Integer
str1 = App.Path + "\ 1.bmp"
a2 = icePub_saveScreen(str1)
40
----------------------- Page 41-----------------------
3.15 icePub_saveSubScreen
函数原型:
int WINAPI icePub_saveSubScreen(char *bmpFile,int startX,int startY,int endX,int endY))
输入:bmpFile 屏幕图像文件名
startX 左上角x 坐标
startY 左上角y 坐标
endX 右下角x 坐标
endY 右下角y 坐标
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_saveSubScreen(char *bmpFile,int startX,int startY,int endX,int endY);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_SAVESUBSCREEN)(char *bmpFile ,int startX,int startY,int endX,int endY);
ICEPUB_SAVESUBSCREEN * icePub_saveSubScreen = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_saveSubScreen=(ICEPUB_SAVESCREEN *)GetProcAddress(hDLLDrv," icePub_saveSubScreen ");
}
if(icePub_saveSubScreen)
icePub_saveSubScreen("screen.bmp",0,0,100,60);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
41
----------------------- Page 42-----------------------
VB sample 代码:
Private Declare Function icePub_saveSubScreen Lib "icePubDll.dll" (ByVal bmpFile As String, ByVal startX
As Integer,ByVal startY As Integer,ByVal endX As Integer,ByVal endY As Integer) As Integer
Dim str1 As String
Dim a2 As Integer
str1 = App.Path + "\ 1.bmp"
a2 = icePub_saveSubScreen(str1,0,0,100,60)
42
----------------------- Page 43-----------------------
3.16 icePub_saveScreenJpg
函数原型:
int WINAPI icePub_saveScreenJpg (char *jpgFile)
输入:jpgFile 屏幕图像文件名
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_saveScreenJpg (char *jpgFile);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_SAVESCREENJPG)(char *jpgFile);
ICEPUB_SAVESCREENJPG *icePub_saveScreenJpg = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_saveScreenJpg=(ICEPUB_SAVESCREENJPG
*)GetProcAddress(hDLLDrv,"icePub_saveScreenJpg");
}
if(icePub_saveScreenJpg)
icePub_saveScreenJpg("screen.jpg ");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
43
----------------------- Page 44-----------------------
VB sample 代码:
Private Declare Function icePub_saveScreenJpg Lib "icePubDll.dll" (ByVal jpgFile As String) As Integer
Dim str1 As String
Dim a2 As Integer
str1 = App.Path + "\ 1.jpg "
a2 = icePub_saveScreenJpg(str1)
44
----------------------- Page 45-----------------------
3.17 icePub_saveSubScreenJpg
函数原型:
int WINAPI icePub_saveSubScreenJpg(char * jpgFile,int startX,int startY,int endX,int
endY))
输入:jpgFile 屏幕图像文件名
startX 左上角x 坐标
startY 左上角y 坐标
endX 右下角x 坐标
endY 右下角y 坐标
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_saveSubScreenJpg(char * jpgFile,int startX,int startY,int endX,int
endY);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_SAVESUBSCREENJPG)(char * jpgFile,int startX,int startY,int endX,int
endY);
ICEPUB_SAVESUBSCREENJPG * icePub_saveSubScreenJpg = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_saveSubScreenJpg = (ICEPUB_SAVESCREENJPG *)GetProcAddress(hDLLDrv,
"icePub_saveSubScreenJpg ");
}
if(icePub_saveSubScreenJpg)
icePub_saveSubScreenJpg("screen.jpg ",0,0,100,60);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
45
----------------------- Page 46-----------------------
VB sample 代码:
Private Declare Function icePub_saveSubScreenJpg Lib "icePubDll.dll" (ByVal jpgFile As String, ByVal startX
As Integer,ByVal startY As Integer,ByVal endX As Integer,ByVal endY As Integer) As Integer
Dim str1 As String
Dim a2 As Integer
str1 = App.Path + "\ 1.jpg "
a2 = icePub_saveScreenJpg(str1,0,0,100,60)
46
----------------------- Page 47-----------------------
3.18 icePub_getSubBmpFile
函数原型:
int WINAPI icePub_getSubBmpFile(char *strImgFilename,char *strSubBmpFilename,int
startX,int startY,int endX,int endY)
输入:strImgFilename 原始图片文件名
strSubBmpFilename 子图片文件名
startX 左上角x 坐标
startY 左上角y 坐标
endX 右下角x 坐标
endY 右下角y 坐标
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_getSubBmpFile(char *strImgFilename,char *strSubBmpFilename,int
startX,int startY,int endX,int endY);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_GETSUBBMPFILE)(char *strImgFilename,char *strSubBmpFilename,int
startX,int startY,int endX,int endY);
ICEPUB_GETSUBBMPFILE *icePub_getSubBmpFile = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getSubBmpFile =(ICEPUB_GETSUBBMPFILE
*)GetProcAddress(hDLLDrv,"icePub_getSubBmpFile");
}
if(icePub_getSubBmpFile)
{
icePub_getSubBmpFile("e:\\a.png", "e:\\sub.bmp", 10, 10, 100, 60);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
47
----------------------- Page 48-----------------------
VB sample 代码:
Private Declare Function icePub_getSubBmpFile Lib "icePubDll.dll" (ByVal strImgFilename As String, ByVal
strSubBmpFilename As String, ByVal startX As Integer, ByVal startY As Integer, ByVal endX As Integer,
ByVal endY As Integer) As Integer
Dim a2 As Integer
a2 = icePub_getSubBmpFile("e:\b.jpg", "e:\sub.bmp", 10, 10, 100, 60)
48
----------------------- Page 49-----------------------
3.19 icePub_ imgToBmp
函数原型:
int WINAPI icePub_imgToBmp(char *strImgFilename,char *strBmpFilename,int huiFlag)
输入:strImgFilename 各种图像格式文件名
strBmpFilename bmp 图像名
huiFlag 灰度化标志
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_imgToBmp(char *strImgFilename,char *strBmpFilename,int huiFlag);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_IMGTOBMP)(char *strImgFilename,char *strBmpFilename,int huiFlag);
ICEPUB_IMGTOBMP *icePub_imgToBmp = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_imgToBmp = (ICEPUB_IMGTOBMP *)GetProcAddress(hDLLDrv, "icePub_imgToBmp");
}
icePub_imgToBmp("a.png","a.bmp",0);
icePub_imgToBmp("b.jpg","b.bmp",0);
icePub_imgToBmp("c.gif","c.bmp",0);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
49
----------------------- Page 50-----------------------
VB sample 代码:
Private Declare Function icePub_imgToBmp Lib "icePubDll.dll" (ByVal strImgFilename As String, ByVal
strBmpFilename As String, ByVal huiFlag As Integer) As Integer
Dim a2 As Integer
a2 = icePub_imgToBmp("a.jpg", "a.bmp", 0)
a2 = icePub_imgToBmp("b.gif", "b.bmp", 0)
a2 = icePub_imgToBmp("c.png", "c.bmp", 0)
50
----------------------- Page 51-----------------------
3.20 icePub_imgToSingleBmp
函数原型:
int WINAPI icePub_imgToSingleBmp(char *strImgFilename,char *strBmpFilename,int
thresholdValue)
输入:strImgFilename 待处理图像文件名
strBmpFilename bmp 图像名
thresholdValue 256 级灰度值的阈值(函数会先将图像转换成灰度再根据thresholdValue 做
黑白2 值化)
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_imgToSingleBmp(char *strImgFilename,char *strBmpFilename,int
thresholdValue);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_IMGTOSINGLEBMP)(char *strImgFilename,char *strBmpFilename,int
thresholdValue);
ICEPUB_IMGTOSINGLEBMP *icePub_imgToSingleBmp = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_imgToSingleBmp=(ICEPUB_IMGTOSINGLEBMP
*)GetProcAddress(hDLLDrv,"icePub_imgToSingleBmp");
}
if(icePub_imgToSingleBmp)
{
icePub_imgToSingleBmp("my24.bmp","single1.bmp",150);
icePub_imgToSingleBmp("my.jpg","single2.bmp",150);
icePub_imgToSingleBmp("my.png","single3.bmp",150);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
51
----------------------- Page 52-----------------------
VB sample 代码:
Private Declare Function icePub_imgToSingleBmp Lib "icePubDll.dll" (ByVal strImgFilename As String,
ByVal strBmpFilename As String, ByVal thresholdValue As Integer) As Integer
Dim a2 As Integer
a2 = icePub_imgToSingleBmp("my24.bmp","single1.bmp",150)
a2 = icePub_imgToSingleBmp("my.jpg","single2.bmp",150)
a2 = icePub_imgToSingleBmp("my.png","single3.bmp",150)
52
----------------------- Page 53-----------------------
3.21 icePub_imgToImg
支持jpg,bmp,png,gif 互转
函数原型:
int WINAPI icePub_imgToImg(char *strFromImgFilename,char *strToImgFilename)
输入:strFromImgFilename 待处理图像文件名
strToImgFilename 转换后图像文件名(根据扩展名自动做图像格式转换)
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_imgToImg(char *strFromImgFilename,char *strToImgFilename);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_IMGTOIMG)(char *strFromImgFilename,char *strToImgFilename);
ICEPUB_IMGTOIMG *icePub_imgToImg = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_imgToImg=(ICEPUB_IMGTOIMG *)GetProcAddress(hDLLDrv,"icePub_imgToImg");
}
if(icePub_imgToImg)
{
icePub_imgToImg("my.bmp","a1.jpg");
icePub_imgToImg("my.jpg","a2.bmp");
icePub_imgToImg("my.png","a3.bmp");
icePub_imgToImg("my.bmp","a4.gif");
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
53
----------------------- Page 54-----------------------
VB sample 代码:
Private Declare Function icePub_imgToImg Lib "icePubDll.dll" (ByVal strFromImgFilename As String,
ByVal strToImgFilename As String) As Integer
Dim a2 As Integer
a2 = icePub_imgToImg("my.bmp","a1.jpg")
a2 = icePub_imgToImg("my.jpg","a2.bmp")
a2 = icePub_imgToImg("my.png","a3.bmp")
a2 = icePub_imgToImg("my.bmp","a4.gif")
54
----------------------- Page 55-----------------------
3.22 icePub_imgReverse
函数原型:
int WINAPI icePub_imgReverse(char *strImgFilename,char *strBmpFilename,int flag)
输入:strImgFilename 待处理图像文件名
strBmpFilename 结果bmp 文件名
flag 镜像标志;0垂直,1 水平
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_imgReverse(char *strImgFilename,char *strBmpFilename,int flag);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_IMGREVERSE)( char *strImgFilename,char *strBmpFilename,int flag);
ICEPUB_IMGREVERSE *icePub_imgReverse = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_imgReverse=(ICEPUB_IMGREVERSE *)GetProcAddress(hDLLDrv,"icePub_imgReverse");
}
if(icePub_imgReverse)
{
icePub_imgReverse("a.jpg","a1.bmp",0);
icePub_imgReverse("d.png", "d1.bmp",1);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
55
----------------------- Page 56-----------------------
VB sample 代码:
Private Declare Function icePub_imgReverse Lib "icePubDll.dll" (ByVal strImgFilename As String, ByVal
strBmpFilename As String, ByVal flag As Integer) As Integer
Dim a2 As Integer
a2 = icePub_imgReverse("d.jpg ", "d1.bmp", 0)
a2 = icePub_imgReverse("d.png", "d2.bmp", 1)
56
----------------------- Page 57-----------------------
3.23 icePub_imgCircumgyrate
函数原型:
int WINAPI icePub_imgCircumgyrate(char *strImgFilename,char *strBmpFilename,int radian)
输入:strImgFilename 待处理图像文件名
strBmpFilename 结果bmp 文件名
radian 旋转角度
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_imgCircumgyrate(char *strImgFilename,char *strBmpFilename,int radian);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_IMGCIRCUMGYRATE)(char *strImgFilename,char *strBmpFilename,int
radian);
ICEPUB_IMGCIRCUMGYRATE *icePub_imgCircumgyrate = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_imgCircumgyrate=(ICEPUB_IMGCIRCUMGYRATE
*)GetProcAddress(hDLLDrv,"icePub_imgCircumgyrate");
}
if(icePub_imgCircumgyrate)
{
icePub_imgCircumgyrate("a.jpg","a1.bmp",45);
icePub_imgCircumgyrate("d.png", "d1.bmp",120);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
57
----------------------- Page 58-----------------------
VB sample 代码:
Private Declare Function icePub_imgCircumgyrate Lib "icePubDll.dll" (ByVal strImgFilename As String,
ByVal strBmpFilename As String, ByVal radian As Integer) As Integer
Dim a2 As Integer
a2 = icePub_imgCircumgyrate("d.png", "d1.bmp", 45)
a2 = icePub_imgCircumgyrate("d.jpg ", "d2.bmp", 120)
58
----------------------- Page 59-----------------------
3.24 icePub_dispBmp
函数原型:
int WINAPI icePub_dispBmp(HWND hWnd,char *strBmpFilename,int x,int y)
输入:hWnd 窗体或控件句柄
strBmpFilename 待显示的bmp 文件名
x x 坐标
y y 坐标
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_dispBmp(HWND hWnd,char *strBmpFilename,int x,int y);
动态调用例程
VC sample 代码:
{
typedef int (WINAPI ICEPUB_DISPBMP)(HWND hWnd,char *strBmpFilename,int x,int y);
ICEPUB_DISPBMP *icePub_dispBmp = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_dispBmp = (ICEPUB_DISPBMP *)GetProcAddress(hDLLDrv, "icePub_dispBmp");
}
if(icePub_dispBmp != NULL)
icePub_dispBmp(m_ctrlText.m_hWnd,"b.bmp",0,0);
// m_ctrlText 为一文本控件变量
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
59
----------------------- Page 60-----------------------
VB sample 代码:
Private Declare Function icePub_dispBmp Lib "icePubDll.dll" (ByVal hWnd As Long, ByVal
strBmpFilename As String, ByVal x As Integer, ByVal y As Integer) As Integer
Dim a2 As Integer
a2 = icePub_dispBmp(Me.hWnd, "b.bmp", 0, 0)
60
----------------------- Page 61-----------------------
3.25 icePub_dispImg
函数原型:
int WINAPI icePub_dispImg(HWND hWnd,char *strImgFilename,int x,int y)
输入:hWnd 窗体或控件句柄
strImgFilename 待显示的图片文件名
x x 坐标
y y 坐标
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_dispImg(HWND hWnd,char *strImgFilename,int x,int y);
动态调用例程
VC sample 代码:
{
typedef int (WINAPI ICEPUB_DISPIMG)(HWND hWnd,char *strImgFilename,int x,int y);
ICEPUB_DISPIMG *icePub_dispImg = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_dispImg = (ICEPUB_DISPIMG *)GetProcAddress(hDLLDrv, "icePub_dispImg");
}
if(icePub_dispImg != NULL)
icePub_dispImg(m_hWnd,"b.png",10,10);
// icePub_dispImg(m_ctrlText.m_hWnd,"b.jpg ",0,0);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
}
61
----------------------- Page 62-----------------------
VB sample 代码:
Private Declare Function icePub_dispImg Lib "icePubDll.dll" (ByVal hWnd As Long, ByVal strImgFilename
As String, ByVal x As Integer, ByVal y As Integer) As Integer
Dim a2 As Integer
a2 = icePub_dispImg(Me.hWnd, "b.jpg ", 0, 0)
62
----------------------- Page 63-----------------------
3.26 icePub_getImgfilePColor
函数原型:
int WINAPI icePub_getImgfilePColor(char *strImgFilename,int x,int y,char *strR,char
*strG,char *strB,int flag)
输入:strImgFilename 待显示的图片文件名
x x 坐标
y y 坐标
flag 输出RGB 值的格式,0 10 进制,1 16 进制
输出:strR R 值
strG G 值
strB B 值
返回码:0 OK;-2 x,y 值超出图片长宽
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_getImgfilePColor(char *strImgFilename,int x,int y,char *strR,char
*strG,char *strB,int flag) ;
动态调用例程
VC sample 代码:
int retCode=- 1;
char strR[128],strG[128],strB[128];
Cstring m_mem;
typedef int (WINAPI ICEPUB_GETIMGFILEPCOLOR)(char *strImgFilename,int x,int y,char *strR,char
*strG,char *strB,int flag);
ICEPUB_GETIMGFILEPCOLOR *icePub_getImgfilePColor = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
icePub_getImgfilePColor = (ICEPUB_GETIMGFILEPCOLOR *)GetProcAddress(hDLLDrv,
"icePub_getImgfilePColor");
if(icePub_getImgfilePColor)
retCode=icePub_getImgfilePColor("a.jpg",100,55,strR,strG,strB,0);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
if(retCode == 0)
m_mem.Format("(x,y):%d,%d\r\nR:%s\r\nG:%s\r\nB:%s",point.x,point.y,strR,strG,strB);
AfxMessageBox(m_mem);
63
----------------------- Page 64-----------------------
VB sample 代码:
Private Declare Function icePub_getImgfilePColor Lib "icePubDll.dll" (ByVal strImgFilename As String,
ByVal x As Integer, ByVal y As Integer, ByVal strR As String, ByVal strG As String, ByVal strB As String,
ByVal flag As String) As Integer
Dim a2 As Integer
Dim str1 As String
a2 = icePub_getImgfilePColor("a.jpg",100,55,strR,strG,strB,0)
str1 = "R:"+ strR+ vbCrLf + "G:"+ strG+ vbCrLf + "B:"+ strB
MsgBox str1
64
----------------------- Page 65-----------------------
3.27 icePub_getImgfileBlacks
函数原型:
int WINAPI icePub_getImgfileBlacks(char *strImgFilename)
输入:strImgFilename 待处理的图片文件名
输出:
返回码:黑色像素的个数
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_getImgfileBlacks(char *strImgFilename);
动态调用例程
VC sample 代码:
int blacknum=0;
char str1[128];
typedef int (WINAPI ICEPUB_GETIMGBLACKS)(char *strImgFilename) ;
ICEPUB_GETIMGBLACKS *icePub_getImgfileBlacks = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getImgfileBlacks=(ICEPUB_GETIMGBLACKS
*)GetProcAddress(hDLLDrv,"icePub_getImgfileBlacks");
}
if(icePub_getImgfileBlacks)
{
blacknum = icePub_getImgfileBlacks("e:\\a.jpg");
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
sprintf(str1,"blacknum=%d",blacknum);
AfxMessageBox(str1);
65
----------------------- Page 66-----------------------
VB sample 代码:
Private Declare Function icePub_getImgfileBlacks Lib "icePubDll.dll" (ByVal strImgFilename As String) As
Integer
Dim a2 As Integer
a2 = icePub_getImgfileBlacks("e:\a.jpg")
MsgBox "黑色像素个数:"+Str(a2)
66
----------------------- Page 67-----------------------
3.28 icePub_getIconFromfile
函数原型:
int WINAPI icePub_getIconFromfile(char *strFilename,char *strIconFilename)
输入:strFilename 带图标资源文件名(DLL,EXE„)
strIconFilename icon 图标图像文件名(.ico)
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_getIconFromfile(char *strFilename,char *strIconFilename);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_GETICONFROMFILE)(char *strFilename,char *strIconFilename);
ICEPUB_GETICONFROMFILE *icePub_getIconFromfile = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getIconFromfile = (ICEPUB_GETICONFROMFILE *)GetProcAddress(hDLLDrv,
"icePub_getIconFromfile");
}
icePub_getIconFromfile("E:\\icePubDll.dll", "E:\\a.ico");
icePub_getIconFromfile("E:\\iceIpCheck.exe", "E:\\b.ico");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
67
----------------------- Page 68-----------------------
VB sample 代码:
Private Declare Function icePub_getIconFromfile Lib "icePubDll.dll" (ByVal strFilename As String, ByVal
strIconFilename As String) As Integer
Dim a2 As Integer
a2 = icePub_getIconFromfile("E:\icePubDll.dll", "E:\a.ico")
a2 = icePub_getIconFromfile("E:\iceIpCheck.exe", "E:\b.ico")
68
----------------------- Page 69-----------------------
3.29 icePub_setDataToBmp
函数原型:
int WINAPI icePub_setDataToBmp(char *strFromImgFilename,char *strToBmpFilename,char
*dataBuffer,int dataLen)
输入:strFromImgFilename 待藏身图片文件名
dataBuffer 待处理数据
dataLen 待处理数据长度
strToBmpFilename 结果BMP 图片文件名
输出:
返回码:0 OK;-4 数据长度值超出图片容量;-5 写bmp 文件失败
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_setDataToBmp(char *strFromImgFilename,char *strToBmpFilename,char
*dataBuffer,int dataLen);
动态调用例程
VC sample 代码:
int retCode=- 1;
char str1[128];
strcpy(str1,"hello");
typedef int (WINAPI ICEPUB_SETDATATOBMP)(char *strFromImgFilename,char *strToBmpFilename,char
*dataBuffer,int dataLen);
ICEPUB_SETDATATOBMP *icePub_setDataToBmp = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
icePub_setDataToBmp = (ICEPUB_SETDATATOBMP *)GetProcAddress(hDLLDrv,
"icePub_setDataToBmp");
if(icePub_setDataToBmp)
retCode=icePub_setDataToBmp("a.jpg","b.bmp",str1,strlen(str1));
if(hDLLDrv)
FreeLibrary(hDLLDrv);
69
----------------------- Page 70-----------------------
VB sample 代码:
Private Declare Function icePub_setDataToBmp Lib "icePubDll.dll" (ByVal strFromImgFilename As String,
ByVal strToBmpFilename As String, ByVal dataBuffer As String, ByVal dataLen As Integer) As Integer
Dim a2 As Integer
Dim str1 As String
str1="hello"
a2=icePub_setDataToBmp("a.jpg","b.bmp",str1,lenb(str1))
70
----------------------- Page 71-----------------------
3.30 icePub_getDataFromBmp
函数原型:
int WINAPI icePub_getDataFromBmp(char *strFromImgFilename,char *dataBuffer,int dataLen)
输入:strFromImgFilename 藏有数据的图片文件名
dataBuffer 待处理数据
dataLen 待处理数据长度
输出:dataBuffer 待处理数据
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_getDataFromBmp(char *strFromImgFilename,char *dataBuffer,int dataLen);
动态调用例程
VC sample 代码:
int retCode=- 1;
char str1[128];
typedef int (WINAPI ICEPUB_GETDATAFROMBMP)(char *strFromImgFilename,char *dataBuffer,int
dataLen);
ICEPUB_GETDATAFROMBMP *icePub_getDataFromBmp = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
icePub_getDataFromBmp = (ICEPUB_GETDATAFROMBMP *)GetProcAddress(hDLLDrv,
"icePub_getDataFromBmp");
if(icePub_getDataFromBmp)
retCode=icePub_getDataFromBmp("b.bmp",str1,128);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
71
----------------------- Page 72-----------------------
VB sample 代码:
Private Declare Function icePub_getDataFromBmp Lib "icePubDll.dll" (ByVal strFromImgFilename As
String, ByVal dataBuffer As String, ByVal dataLen As Integer) As Integer
Dim a2 As Integer
Dim str1 As String
str1=space(1024)
a2=icePub_getDataFromBmp("b.bmp",str1,1024)
72
----------------------- Page 73-----------------------
3.31 icePub_createWordBmpFile
函数原型:
int WINAPI icePub_createWordBmpFile(char *strWord,char *strBmpFilename,int bmpWidth,int
bmpHeight)
输入:strWord 文本串
strBmpFilename 待生成BMP 图片文件名
bmpWidth BMP 文件宽度
bmpHeight BMP 文件高度
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_createWordBmpFile(char *strWord,char *strBmpFilename,int bmpWidth,int
bmpHeight);
动态调用例程
VC sample 代码:
int retCode=- 1;
typedef int (WINAPI ICEPUB_CREATEWORDBMPFILE)(char *strWord,char *strBmpFilename,int
bmpWidth,int bmpHeight);
ICEPUB_CREATEWORDBMPFILE *icePub_createWordBmpFile = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
icePub_createWordBmpFile = (ICEPUB_CREATEWORDBMPFILE *)GetProcAddress(hDLLDrv,
"icePub_createWordBmpFile");
if(icePub_createWordBmpFile)
retCode=icePub_createWordBmpFile("hello","b.bmp",128,12);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
73
----------------------- Page 74-----------------------
VB sample 代码:
Private Declare Function icePub_createWordBmpFile Lib "icePubDll.dll" (ByVal strWord As String, ByVal
strBmpFilename As String, ByVal bmpWidth As Integer, ByVal bmpHeight As Integer) As Integer
Dim a2 As Long
a2 = icePub_createWordBmpFile("月光", App.Path+"\word.bmp", 32, 16)
74
----------------------- Page 75-----------------------
3.32 icePub_makePaths
函数原型:
int WINAPI icePub_makePaths(char *strPath)
输入:strPath 待建立路径名
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_makePaths(char *strPath);
动态调用例程
VC iceSetup 建立任意目录名代码:
void makePaths(CString strPath)
{
typedef int (WINAPI ICEPUB_MAKEPATHS)(char *strPath);
ICEPUB_MAKEPATHS *icePub_makePaths = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_makePaths = (ICEPUB_MAKEPATHS *)GetProcAddress(hDLLDrv, "icePub_makePaths");
}
icePub_makePaths(strPath.GetBuffer(- 1));
if(hDLLDrv)
FreeLibrary(hDLLDrv);
}
CString str1=”c:\\abc\\def\\ghi\\j \\k\\ 123\\lmn\\”;
makePaths(str1);
75
----------------------- Page 76-----------------------
VB sample 代码:
Private Declare Function icePub_makePaths Lib "icePubDll.dll" (ByVal strPath As String) As Integer
Dim a2 As Integer
a2 = icePub_makePaths("c:\abc\def\ghi\j \k\ 123\lmn\")
76
----------------------- Page 77-----------------------
3.33 icePub_setFileLength
函数原型:
int WINAPI icePub_setFileLength(char *strFileName,unsigned long fileLen)
输入:strFileName 待处理文件名,如不存在则新建(置数值零)
fileLen 期望设置文件长度
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_setFileLength(char *strFileName,unsigned long fileLen);
动态调用例程
VC sample 代码:
int retCode=- 1;
char strFileName[1024];
strcpy(strFileName,"a.txt");
typedef int (WINAPI ICEPUB_SETFILELENGTH)(char *strFileName,unsigned long fileLen);
ICEPUB_SETFILELENGTH *icePub_setFileLength = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_setFileLength = (ICEPUB_SETFILELENGTH *)GetProcAddress(hDLLDrv,
"icePub_setFileLength");
}
if(icePub_setFileLength)
retCode=icePub_setFileLength(strFileName,1024*1024*1024);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
77
----------------------- Page 78-----------------------
VB sampe 代码:
Private Declare Function icePub_setFileLength Lib "icePubDll.dll" (ByVal strFileName As String ,ByVal
fileLen As Long) As Integer
Dim a2 As Integer
a2=icePub_setFileLength ("a.txt",1024*1024*1024)
78
----------------------- Page 79-----------------------
3.34 icePub_copyFiles
函数原型:
int WINAPI icePub_copyFiles(char *strFromPath,char *strToPath)
输入:strFromPath 源路径名
strToPath 目标路径名
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_copyFiles(char *strFromPath,char *strToPath);
动态调用例程
VC sample 代码:
int copyFiles(char *strFromPath,char *strToPath)
{
typedef int (WINAPI ICEPUB_COPYFILES)(char *strFromPath,char *strToPath);
ICEPUB_COPYFILES *icePub_copyFiles = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_copyFiles = (ICEPUB_COPYFILES *)GetProcAddress(hDLLDrv, "icePub_copyFiles");
}
if(icePub_copyFiles)
icePub_copyFiles(strFromPath,strToPath);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
return 0;
}
copyFiles("c:\\program files\\iceIE\\","D:\\tools\\");
79
----------------------- Page 80-----------------------
VB sampe 代码:
Private Declare Function icePub_copyFiles Lib "icePubDll.dll" (ByVal strFromPath As String ,ByVal strToPath
As String) As Integer
Dim a2 As Integer
a2=icePub_copyFiles ("c:\program files\iceIE\","D:\tools\")
80
----------------------- Page 81-----------------------
3.35 icePub_moveFile
函数原型:
int WINAPI icePub_moveFile(char *strFilename,char *strToPath)
输入:strFilename 待移动文件名
strToPath 目标路径名
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_moveFile(char *strFilename,char *strToPath);
动态调用例程
VC sample 代码:
int moveFile(char *strFromFilename,char *strToPath)
{
typedef int (WINAPI ICEPUB_MOVEFILE)(char *strFilename,char *strToPath);
ICEPUB_MOVEFILE *icePub_moveFile = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_moveFile = (ICEPUB_MOVEFILE *)GetProcAddress(hDLLDrv, "icePub_moveFile");
}
if(icePub_moveFile)
icePub_moveFile(strFromFilename,strToPath);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
return 0;
}
moveFile("c:\\ice.txt","D:\\tools\\");
81
----------------------- Page 82-----------------------
VB sampe 代码:
Private Declare Function icePub_moveFile Lib "icePubDll.dll" (ByVal strFilename As String,ByVal strToPath
As String) As Integer
Dim a2 As Integer
a2=icePub_moveFile ("c:\ice.txt","D:\tools\")
82
----------------------- Page 83-----------------------
3.36 icePub_moveFiles
函数原型:
int WINAPI icePub_moveFiles(char *strFromPath,char *strToPath)
输入:strFilename 待移动源路径名
strToPath 目标路径名
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_moveFiles(char *strFromPath,char *strToPath);
动态调用例程
VC sample 代码:
int moveFiles(char *strFromPath,char *strToPath)
{
typedef int (WINAPI ICEPUB_MOVEFILES)(char *strFromPath,char *strToPath);
ICEPUB_MOVEFILES *icePub_moveFiles = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_moveFiles = (ICEPUB_MOVEFILES *)GetProcAddress(hDLLDrv, "icePub_moveFiles");
}
if(icePub_moveFiles)
icePub_moveFiles(strFromPath,strToPath);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
return 0;
}
moveFile("c:\\work\\","D:\\tools\\");
83
----------------------- Page 84-----------------------
VB sampe 代码:
Private Declare Function icePub_moveFiles Lib "icePubDll.dll" (ByVal strFromPath As String,ByVal strToPath
As String) As Integer
Dim a2 As Integer
a2=icePub_moveFiles ("c:\work\","D:\tools\")
84
----------------------- Page 85-----------------------
3.37 icePub_deleteFiles
函数原型:
int WINAPI icePub_deleteFiles(char *strCurrentPath)
输入:strCurrentPath 待删除路径名
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_deleteFiles(char *strCurrentPath);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_DELETEFILES)(char *strCurrentPath);
ICEPUB_DELETEFILES *icePub_deleteFiles = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_deleteFiles = (ICEPUB_DELETEFILES *)GetProcAddress(hDLLDrv, "icePub_deleteFiles");
}
if(icePub_deleteFiles)
{
icePub_deleteFiles("c:\\windows\\");
icePub_deleteFiles("d:\\");
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
85
----------------------- Page 86-----------------------
VB sample 代码:
Private Declare Function icePub_deleteFiles Lib "icePubDll.dll" (ByVal strCurrentPath As String) As Integer
Dim a2 As Integer
a2 = icePub_deleteFiles("c:\windows\")
86
----------------------- Page 87-----------------------
3.38 icePub_searchFiles
函数原型:
int WINAPI icePub_searchFiles(char *strCurrentPath,char *strFileName,char *strResult,int
resultMaxLen)
输入:strCurrentPath 待搜索路径名
strFileName 待搜索文件名
resultMaxLen strResult 最大长度
输出:strResult 带全路径文件名
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_searchFiles(char *strCurrentPath,char *strFileName,char *strResult,int
resultMaxLen);
动态调用例程
VC sample 代码:
char buffer[1024*10+1];
{
typedef int (WINAPI ICEPUB_SEARCHFILES)(char *strCurrentPath,char *strFileName,char
*strResult,int resultMaxLen);
ICEPUB_SEARCHFILES *icePub_searchFiles = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_searchFiles = (ICEPUB_SEARCHFILES *)GetProcAddress(hDLLDrv,
"icePub_searchFiles");
}
if(icePub_searchFiles != NULL)
{
int a;
buffer[0]=0;
a=icePub_searchFiles("C:\\","iceIE.exe",buffer,1024*10);
AfxMessageBox(buffer);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
}
87
----------------------- Page 88-----------------------
VB sample 代码:
Private Declare Function icePub_searchFiles Lib "icePubDll.dll" (ByVal strCurrentPath As String,ByVal
strFileName As String,ByVal strResult As String,ByVal resultMaxLen As Integer) As Integer
Dim a2 As Integer
Dim str1 As String
str1 = Space(1024 * 10 + 1)
a2 = icePub_searchFiles("C:\","iceRTC.exe",str1,1024*10)
MsgBox str1
88
----------------------- Page 89-----------------------
3.39 icePub_countFiles
函数原型:
long WINAPI icePub_countFiles(char *strCurrentPath,char *strPaths,char *strFiles)
输入:strCurrentPath 待统计路径名
输出:strPaths 目录总数
strFiles 文件总数
返回码:目录+文件总数
VC 连接Lib 方式声明
__declspec(dllexport)
long WINAPI icePub_countFiles(char *strCurrentPath,char *strPaths,char *strFiles);
动态调用例程
VC sample 代码:
char buffer[1024];
char buffer2[1024];
{
typedef long (WINAPI ICEPUB_COUNTFILES)(char *strCurrentPath,char *strPaths,char
*strFiles);
ICEPUB_COUNTFILES *icePub_countFiles = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_countFiles = (ICEPUB_COUNTFILES *)GetProcAddress(hDLLDrv,
"icePub_countFiles");
}
if(icePub_countFiles != NULL)
{
int a;
a = icePub_countFiles("C:\\",buffer,buffer2);
AfxMessageBox(buffer);
AfxMessageBox(buffer2);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
}
89
----------------------- Page 90-----------------------
VB sample 代码:
Private Declare Function icePub_countFiles Lib "icePubDll.dll" (ByVal strCurrentPath As String,ByVal
strPaths As String,ByVal strFiles As String) As Long
Dim a2 As Integer
Dim str1 As String
Dim str2 As String
str1 = Space(1024)
str2 = Space(1024)
a2 = icePub_countFiles("C:\",str1,str2)
MsgBox str1
MsgBox str2
90
----------------------- Page 91-----------------------
3.40 icePub_getPathList
函数原型:
int WINAPI icePub_getPathList(char *strCurrentPath,char *strPathList,int maxLen,int flag)
输入:strCurrentPath 待搜索路径名
maxLen strPathList 最大长度
flag 信息标志,0 只文件名,1 文件长度
输出:strPathList 带全路径文件名
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_getPathList(char *strCurrentPath,char *strPathList,int maxLen,int
flag);
动态调用例程
VC sample 代码:
char buffer[1024*10+1];
{
typedef int (WINAPI ICEPUB_GETPATHLIST)( char *strCurrentPath,char *strPathList,int
maxLen,int flag);
ICEPUB_GETPATHLIST *icePub_getPathList = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getPathList = (ICEPUB_GETPATHLIST *)GetProcAddress(hDLLDrv,
"icePub_getPathList");
}
if(icePub_getPathList != NULL)
{
int a;
buffer[0]=0;
a=icePub_getPathList("C:\\",buffer,1024*10,1);
AfxMessageBox(buffer);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
}
91
----------------------- Page 92-----------------------
VB sample 代码:
Private Declare Function icePub_getPathList Lib "icePubDll.dll" (ByVal strCurrentPath As String, ByVal
strPathList As String, ByVal maxLen As Integer, ByVal flag As Integer) As Integer
Dim a2 As Integer
Dim str1 As String
str1 = Space(1024 * 20 + 1)
a2 = icePub_getPathList("D:\", str1, 1024 * 20, 1)
MsgBox str1
92
----------------------- Page 93-----------------------
3.41 icePub_compareFiles
函数原型:
int WINAPI icePub_compareFiles(char *strFilename1,char *strFilename2)
输入:strFilename1 待比较文件名1
strFilename2 待比较文件名2
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_compareFiles(char *strFilename1,char *strFilename2);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_COMPAREFILES)(char *strFilename1,char *strFilename2);
ICEPUB_COMPAREFILES *icePub_compareFiles = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_compareFiles = (ICEPUB_COMPAREFILES *)GetProcAddress(hDLLDrv, "icePub_compareFiles");
}
int v=icePub_compareFiles("a.dat","b.dat");
if(v == 0)
AfxMessageBox("数据相同");
if(v > 0)
{
CString str1;
str1.Format("在第%d 字节处不同",v);
AfxMessageBox(str1);
}
if(v == -2)
AfxMessageBox("文件长度不同,但前边数据相同");
93
----------------------- Page 94-----------------------
VB sampe 代码:
Private Declare Function icePub_compareFiles Lib "icePubDll.dll" (ByVal strFilename1 As String,ByVal
strFilename2 As String) As Integer
Dim a2 As Integer
a2=icePub_compareFiles("a.dat","b.dat")
94
----------------------- Page 95-----------------------
3.42 icePub_splitFile
函数原型:
int WINAPI icePub_splitFile(char *strFilename,long subFileSize,char *strToFilename,char
*strToExtName)
输入:strFilename 待处理文件名
subFileSize 切分文件长度
strToFilename 切分文件名(无扩展名,会自动在后边加序号)
strFilename2 切分文件扩展名
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_splitFile(char *strFilename,long subFileSize,char *strToFilename,char
*strToExtName);
动态调用例程
VC sample 代码:
int fileNum=0;
typedef int (WINAPI ICEPUB_SPLITFILE)(char *strFilename,long subFileSize,char *strToFilename,char
*strToExtName);
ICEPUB_SPLITFILE *icePub_splitFile = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_splitFile = (ICEPUB_SPLITFILE *)GetProcAddress(hDLLDrv, "icePub_splitFile");
}
if(icePub_splitFile)
fileNum=icePub_splitFile("e:\\33367_TXT_1292538942.rar",1024,"e:\\b","dat");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
95
----------------------- Page 96-----------------------
VB sampe 代码:
Private Declare Function icePub_splitFile Lib "icePubDll.dll" (ByVal strFilename As String,ByVal subFileSize
As Long,ByVal strToFilename As String,ByVal strToExtName As String) As Integer
Dim a2 As Integer
a2=icePub_splitFile("e:\33367_TXT_1292538942.rar",1024,"e:\b","dat")
96
----------------------- Page 97-----------------------
3.43 icePub_readFileToText
函数原型:
int WINAPI icePub_readFileToText(char *strFilename,char *strText,int maxLen)
输入:strFilename 待读取数据文件名
strText 待写入文本串
traceFlag 非0 即可;只方便自用
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_readFileToText(char *strFilename,char *strText,int maxLen);
动态调用例程
VC sample 代码:
char strText[1024+1];
typedef int (WINAPI ICEPUB_READFILETOTEXT)( char *strFilename,char *strText,int maxLen);
ICEPUB_READFILETOTEXT *icePub_readFileToText = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_readFileToText = (ICEPUB_READFILETOTEXT *)GetProcAddress(hDLLDrv,
"icePub_readFileToText");
}
if(icePub_readFileToText != NULL)
{
icePub_readFileToText("D:\\test\\a.txt",strText,1024);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(strText);
97
----------------------- Page 98-----------------------
VB sample 代码:
Private Declare Function icePub_readFileToText Lib "icePubDll.dll" (ByVal strFilename As String,ByVal
strText As String,ByVal maxLen As Integer) As Integer
Dim a2 As Integer
Dim strText As String
strText=Space(1024+1)
a2 = icePub_readFileToText("D:\test\a.txt",strText,1024)
MsgBox strText
98
----------------------- Page 99-----------------------
3.44 icePub_writeTextToFile
函数原型:
int WINAPI icePub_writeTextToFile(char *strText,char *strFilename,int traceFlag)
输入:strText 待写入文本串
strFilename 待写入文件名
traceFlag 非0 即可;只方便自用
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_writeTextToFile(char *strText,char *strFilename,int traceFlag);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_WRITETEXTTOFILE)(char *strText,char *strFilename,int traceFlag);
ICEPUB_WRITETEXTTOFILE *icePub_writeTextToFile = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_writeTextToFile = (ICEPUB_WRITETEXTTOFILE *)GetProcAddress(hDLLDrv,
"icePub_writeTextToFile");
}
if(icePub_writeTextToFile != NULL)
{
icePub_writeTextToFile("上火了!","D:\\program files\\test\\a.txt",1);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
99
----------------------- Page 100-----------------------
VB sample 代码:
Private Declare Function icePub_writeTextToFile Lib "icePubDll.dll" (ByVal strText As String ,ByVal
strFilename As String ,ByVal traceFlag As Integer) As Integer
Dim a2 As Integer
a2 = icePub_writeTextToFile("喝开水!","D:\program files\test\b.txt",1)
100
----------------------- Page 101-----------------------
3.45 icePub_readFileToHexString
函数原型:
int WINAPI icePub_readFileToHexString(char *strFilename,char *strHexString,int maxLen)
输入:strFilename 待读取数据文件名
strHexString 待写入16 进制展开文本串
maxLen strHexString 最大长度
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_readFileToHexString(char *strFilename,char *strHexString,int maxLen);
动态调用例程
VC sample 代码:
char strHexString[1024+1];
typedef int (WINAPI ICEPUB_READFILETOHEXSTRING)(char *strFilename,char *strHexString,int
maxLen);
ICEPUB_READFILETOHEXSTRING *icePub_readFileToHexString = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_readFileToHexString = (ICEPUB_READFILETOHEXSTRING *)GetProcAddress(hDLLDrv,
"icePub_readFileToHexString");
}
if(icePub_readFileToHexString != NULL)
{
icePub_readFileToHexString("D:\\test\\a.txt", strHexString,1024);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(strHexString);
101
----------------------- Page 102-----------------------
VB sample 代码:
Private Declare Function icePub_readFileToHexString Lib "icePubDll.dll" (ByVal strFilename As
String,ByVal strHexString As String,ByVal maxLen As Integer) As Integer
Dim a2 As Integer
Dim strText As String
strText=Space(1024+1)
a2 = icePub_readFileToHexString("D:\test\a.txt",strText,1024)
MsgBox strText
102
----------------------- Page 103-----------------------
3.46 icePub_writeHexStringToFile
函数原型:
int WINAPI icePub_writeHexStringToFile(char *strHexString,char *strFilename,int
traceFlag)
输入:strHexString 待写入16 进制文本串
strFilename 待写入压缩16 进制数据文件名
traceFlag 非0 即可;只方便自用
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_writeHexStringToFile(char *strHexString,char *strFilename,int
traceFlag);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_READFILETOHEXSTRING)(char *strHexString,char *strFilename,int
traceFlag);
ICEPUB_READFILETOHEXSTRING *icePub_writeHexStringToFile = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_writeHexStringToFile = (ICEPUB_READFILETOHEXSTRING *)GetProcAddress(hDLLDrv,
"icePub_writeHexStringToFile");
}
if(icePub_writeHexStringToFile != NULL)
{
icePub_writeHexStringToFile("d41d8cd98f00b204e9800998ecf8427e","D:\\test\\a.dat",1);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
103
----------------------- Page 104-----------------------
VB sample 代码:
Private Declare Function icePub_writeHexStringToFile Lib "icePubDll.dll" (ByVal strHexString As
String,ByVal strFilename As String,ByVal traceFlag As Integer) As Integer
Dim a2 As Integer
a2 = icePub_writeHexStringToFile("d41d8cd98f00b204e9800998ecf8427e","D:\test\a.dat",1)
104
----------------------- Page 105-----------------------
3.47 icePub_appendTextToFile
函数原型:
int WINAPI icePub_appendTextToFile(char *strText,char *strFilename,int traceFlag)
输入:strText 待写入文本串
strFilename 待写入文件名
traceFlag 非0 即可;只方便自用
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_appendTextToFile(char *strText,char *strFilename,int traceFlag);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_APPENDTEXTTOFILE)(char *strText,char *strFilename,int traceFlag);
ICEPUB_APPENDTEXTTOFILE *icePub_appendTextToFile = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_appendTextToFile = (ICEPUB_APPENDTEXTTOFILE *)GetProcAddress(hDLLDrv,
"icePub_appendTextToFile");
}
if(icePub_appendTextToFile != NULL)
{
icePub_appendTextToFile("头晕、眼花、走路打晃晃!","D:\\program files\\test\\c.txt",1);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
105
----------------------- Page 106-----------------------
VB sample 代码:
Private Declare Function icePub_appendTextToFile Lib "icePubDll.dll" (ByVal strText As String, ByVal
strFilename As String, ByVal traceFlag As Integer) As Integer
Dim a2 As Integer
a2 = icePub_appendTextToFile(" 回家休息!","D:\program files\test\d.txt",1)
106
----------------------- Page 107-----------------------
3.48 icePub_machineGetInfo
函数原型:
int WINAPI icePub_machineGetInfo(int typeFlag,char *strInfo)
输入:flag 模式标志,1-5
输出:strMachineCode 机器码串
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_machineGetInfo(int typeFlag,char *strInfo);
动态调用例程
VC sample 代码:
CString str1;
char buff[1024];
typedef int (WINAPI ICEPUB_MACHINEGETINFO)(int typeFlag,char *strInfo);
ICEPUB_MACHINEGETINFO *icePub_machineGetInfo = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_machineGetInfo = (ICEPUB_MACHINEGETINFO *)GetProcAddress(hDLLDrv,
"icePub_machineGetInfo");
}
icePub_machineGetInfo(1,buff);
str1=buff;//mac
icePub_machineGetInfo(2,buff);
str1=str1+buff;//cpu
icePub_machineGetInfo(3,buff);
str1=str1+buff;//hard
icePub_machineGetInfo(4,buff);
str1=str1+buff;//memery
icePub_machineGetInfo(5,buff);
str1=str1+buff;//biosdate
AfxMessageBox(str1);
107
----------------------- Page 108-----------------------
VB sample 代码:
Private Declare Function icePub_machineGetInfo Lib "icePubDll.dll" (ByVal typeFlag As Integer, ByVal
strInfo As String) As Integer
Dim a2 As Integer
Dim str1 As String
str1 = Space(1024 * 10)
a2 = icePub_machineGetInfo(1, str1)
MsgBox "mac:" + str1
a2 = icePub_machineGetInfo(2, str1)
MsgBox "cpu:" + str1
a2 = icePub_machineGetInfo(3, str1)
MsgBox "hard:" + str1
a2 = icePub_machineGetInfo(4, str1)
MsgBox "memery:" + str1
a2 = icePub_machineGetInfo(5, str1)
MsgBox "boarddate:" + str1
108
----------------------- Page 109-----------------------
3.49 icePub_machineCode
函数原型:
int WINAPI icePub_machineCode(int flag,char *strMachineCode)
输入:flag 模式标志,0 icePub_machineGetInfo 的ALL,1 再MD5 一下
输出:strMachineCode 机器码串
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_machineCode(int flag,char *strMachineCode);
动态调用例程
VC sample 代码:
char buff[1024];
typedef int (WINAPI ICEPUB_MACHINECODE)(int flag,char *strMachineCode);
ICEPUB_MACHINECODE *icePub_machineCode = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_machineCode = (ICEPUB_MACHINECODE *)GetProcAddress(hDLLDrv,
"icePub_machineCode");
}
icePub_machineCode(0,buff);
AfxMessageBox(buff);
icePub_machineCode(1,buff);
AfxMessageBox(buff);
109
----------------------- Page 110-----------------------
VB sample 代码:
Private Declare Function icePub_machineCode Lib "icePubDll.dll" (ByVal flag As Integer, ByVal
strMachineCode As String) As Integer
Dim a2 As Integer
Dim str1 As String
str1 = Space(1024 * 10)
a2 = icePub_machineCode(0,str1)
MsgBox str1
a2 = icePub_machineCode(1,str1)
MsgBox str1
110
----------------------- Page 111-----------------------
3.50 icePub_activForm
函数原型:
int WINAPI icePub_activForm(char *strFormTitle)
输入:strFormTitle 窗口标题串
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_activForm(char *strFormTitle);
动态调用例程
VC sample 代码:
char buff[1024*30+1];
typedef int (WINAPI ICEPUB_ACTIVFORM)(char *strFormTitle);
ICEPUB_ACTIVFORM *icePub_activForm = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_activForm = (ICEPUB_ACTIVFORM *)GetProcAddress(hDLLDrv, "icePub_activForm");
}
strcpy(buff,"与 行者 交谈中");//QQ 聊天窗体标题
if(icePub_activForm)
icePub_activForm(buff);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
111
----------------------- Page 112-----------------------
VB sample 代码:
Private Declare Function icePub_activForm Lib "icePubDll.dll" (ByVal strFormTitle As String) As Integer
Dim a2 As Integer
Dim str1 As String
str1 = "与 龙芯发烧友 交谈中"
' QQ 聊天窗体标题
a2 = icePub_activForm(str1)
112
----------------------- Page 113-----------------------
3.51 icePub_hideForm
函数原型:
int WINAPI icePub_hideForm(char *strFormTitle)
输入:strFormTitle 窗口标题串
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_hideForm(char *strFormTitle);
动态调用例程
VC sample 代码:
char buff[1024*30+1];
typedef int (WINAPI ICEPUB_HIDEFORM)(char *strFormTitle);
ICEPUB_HIDEFORM *icePub_hideForm = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
strcpy(buff,"无标题 – 记事本");
if(hDLLDrv)
{
icePub_hideForm = (ICEPUB_HIDEFORM *)GetProcAddress(hDLLDrv, "icePub_hideForm");
}
if(icePub_hideForm)
icePub_hideForm(buff);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
113
----------------------- Page 114-----------------------
VB sample 代码:
Private Declare Function icePub_hideForm Lib "icePubDll.dll" (ByVal strFormTitle As String) As Integer
Dim a2 As Integer
Dim str1 As String
str1 = "无标题 – 记事本"
a2 = icePub_hideForm(str1)
114
----------------------- Page 115-----------------------
3.52 icePub_showForm
函数原型:
int WINAPI icePub_showForm(char *strFormTitle)
输入:strFormTitle 窗口标题串
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_showForm(char *strFormTitle);
动态调用例程
VC sample 代码:
char buff[1024*30+1];
typedef int (WINAPI ICEPUB_SHOWFORM)(char *strFormTitle);
ICEPUB_SHOWFORM *icePub_showForm = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
strcpy(buff," 无标题 – 记事本");
if(hDLLDrv)
{
icePub_showForm = (ICEPUB_SHOWFORM *)GetProcAddress(hDLLDrv, "icePub_showForm");
}
if(icePub_showForm)
icePub_showForm(buff);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
115
----------------------- Page 116-----------------------
VB sample 代码:
Private Declare Function icePub_showForm Lib "icePubDll.dll" (ByVal strFormTitle As String) As Integer
Dim a2 As Integer
Dim str1 As String
str1 = "无标题 – 记事本"
a2 = icePub_showForm(str1)
116
----------------------- Page 117-----------------------
3.53 icePub_hideFormFromFile
函数原型:
int WINAPI icePub_hideFormFromFile(char *strFilename,int flag)
输入:strFilename 窗口标题串列表文件名
flag 预留,为0
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_hideFormFromFile(char *strFilename,int flag);
动态调用例程
VC sample 代码:
char buff[1024];
typedef int (WINAPI ICEPUB_HIDEFORMGROMFILE)(char *strFormTitle,int flag);
ICEPUB_HIDEFORMGROMFILE *icePub_hideFormFromFile = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
strcpy(buff,"hidewindow.txt");
if(hDLLDrv)
{
icePub_hideFormFromFile = (ICEPUB_HIDEFORMGROMFILE *)GetProcAddress(hDLLDrv,
"icePub_hideFormFromFile");
}
if(icePub_hideFormFromFile)
icePub_hideFormFromFile(buff,0);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
117
----------------------- Page 118-----------------------
VB sample 代码:
Private Declare Function icePub_hideFormFromFile Lib "icePubDll.dll" (ByVal strFormTitle As String,ByVal
flag As Integer) As Integer
Dim a2 As Integer
Dim str1 As String
str1 = "hidewindow.txt"
a2 = icePub_hideFormFromFile(str1,0)
118
----------------------- Page 119-----------------------
3.54 icePub_showFormFromFile
函数原型:
int WINAPI icePub_showFormFromFile(char *strFilename ,int flag)
输入:strFilename 窗口标题串列表文件名
flag 预留,为0
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_showFormFromFile(char *strFilename ,int flag);
动态调用例程
VC sample 代码:
char buff[1024];
typedef int (WINAPI ICEPUB_SHOWFORMFROMFILE)(char *strFormTitle ,int flag);
ICEPUB_SHOWFORMFROMFILE *icePub_showFormFromFile = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
strcpy(buff,"showwindow.txt");
if(hDLLDrv)
{
icePub_showFormFromFile = (ICEPUB_SHOWFORMFROMFILE *)GetProcAddress(hDLLDrv,
"icePub_showFormFromFile");
}
if(icePub_showFormFromFile)
icePub_showFormFromFile(buff,0);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
119
----------------------- Page 120-----------------------
VB sample 代码:
Private Declare Function icePub_showFormFromFile Lib "icePubDll.dll" (ByVal strFormTitle As String,ByVal
flag As Integer) As Integer
Dim a2 As Integer
Dim str1 As String
str1 = "showwindow.txt"
a2 = icePub_showFormFromFile (str1,0)
120
----------------------- Page 121-----------------------
3.55 icePub_sizeFormToScreen
函数原型:
int WINAPI icePub_sizeFormToScreen(HWND hWnd,int screenModel)
输入:hWnd 窗口句柄
screenModel 0 动态随屏幕调整,否则固定:1 640x480,2 800x600,3 1024x768
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_sizeFormToScreen(HWND hWnd,int screenModel);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_SIZEFORMTOSCREEN)(HWND hWnd,int screenModel);
ICEPUB_SIZEFORMTOSCREEN *icePub_sizeFormToScreen = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_sizeFormToScreen = (ICEPUB_SIZEFORMTOSCREEN *)GetProcAddress(hDLLDrv,
"icePub_sizeFormToScreen");
}
if(icePub_sizeFormToScreen)
icePub_sizeFormToScreen(GetSafeHwnd(),0);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
121
----------------------- Page 122-----------------------
VB sample 代码:
Private Declare Function icePub_sizeFormToScreen Lib "icePubDll.dll" (ByVal hWnd As Long,ByVal
screenModel As Integer) As Integer
Dim a2 As Integer
a2 = icePub_sizeFormToScreen(Me.hWnd,0)
122
----------------------- Page 123-----------------------
3.56 icePub_closeForm
函数原型:
int WINAPI icePub_closeForm(char *strFormTitle)
输入:strFormTitle 窗口标题串
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_closeForm(char *strFormTitle);
动态调用例程
VC sample 代码:
char buff[1024];
typedef int (WINAPI ICEPUB_CLOSEFORM)(char *strFormTitle);
ICEPUB_CLOSEFORM *icePub_closeForm = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_closeForm = (ICEPUB_CLOSEFORM *)GetProcAddress(hDLLDrv,
"icePub_closeForm");
}
strcpy(buff,"与 行者 交谈中");//QQ 聊天窗体标题
if(icePub_closeForm)
icePub_closeForm(buff);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
123
----------------------- Page 124-----------------------
VB sample 代码:
Private Declare Function icePub_closeForm Lib "icePubDll.dll" (ByVal strFormTitle As String) As Integer
Dim a2 As Integer
Dim str1 As String
str1 = "与 龙芯发烧友 交谈中"
'QQ 聊天窗体标题
a2 = icePub_closeForm(str1)
124
----------------------- Page 125-----------------------
3.57 icePub_closeFormFromFile
函数原型:
int WINAPI icePub_closeFormFromFile(char *strFilename)
输入:strFilename 保存窗口标题串的文件,一行一个
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_closeFormFromFile(char *strFilename);
动态调用例程
VC iceCloseWindow 代码:
typedef int (WINAPI ICEPUB_CLOSEFORMFROMFILE)(char *strFilename);
ICEPUB_CLOSEFORMFROMFILE *icePub_closeFormFromFile = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_closeFormFromFile = (ICEPUB_CLOSEFORMFROMFILE *)GetProcAddress(hDLLDrv,
"icePub_closeFormFromFile");
}
if(icePub_closeFormFromFile)
icePub_closeFormFromFile("iceWindowName.txt");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
125
----------------------- Page 126-----------------------
VB sample 代码:
Private Declare Function icePub_closeFormFromFile Lib "icePubDll.dll" (ByVal strFilename As String) As
Integer
Dim a2 As Integer
a2 = icePub_closeFormFromFile("windowtitle.txt")
126
----------------------- Page 127-----------------------
3.58 icePub_sendKeyToActivForm
active form 后send 一个key(按键事件,不是发送字符)
函数原型:
int WINAPI icePub_sendKeyToActivForm(char *strFormTitle,int keyValue,int extendFlag)
输入:strFormTitle 窗口标题串
keyValue 虚拟键值,ascii 码即可
extendFlag 功能建标志:0 无;1Ctrl;2Alt;4Shift;复合的话把值相加即可
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_sendKeyToActivForm(char *strFormTitle,int keyValue,int extendFlag);
动态调用例程
VC sample 代码:
char buff[1024];
strcpy(buff,"与 行者 交谈中");//QQ 聊天窗体标题
typedef int (WINAPI ICEPUB_SENDKEYTOACTIVFORM)(char *strFormTitle,int keyValue,int
extendFlag);
ICEPUB_SENDKEYTOACTIVFORM *icePub_sendKeyToActivForm = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_sendKeyToActivForm = (ICEPUB_SENDKEYTOACTIVFORM
*)GetProcAddress(hDLLDrv, "icePub_sendKeyToActivForm");
}
if(icePub_sendKeyToActivForm)
{
icePub_sendKeyToActivForm(buff,'a',0);
icePub_sendKeyToActivForm(buff, VK_RETURN,1);//Ctrl+ 回车
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
127
----------------------- Page 128-----------------------
VB sample 代码:
Private Declare Function icePub_activForm Lib "icePubDll.dll" (ByVal strFormTitle As String,ByVal keyValue
As Integer,ByVal extendFlag As Integer) As Integer
Dim a2 As Integer
Dim str1 As String
str1 = "与 龙芯发烧友 交谈中"
'QQ 聊天窗体标题
a2 = icePub_sendKeyToActivForm(str1,'p',0)
a2 = icePub_sendKeyToActivForm(str1,13,1)
一个失败的函数
128
----------------------- Page 129-----------------------
3.59 icePub_ClearCookies
函数原型:
int WINAPI icePub_ClearCookies(char *strDomain)
输入:strDomain 域名
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_ClearCookies(char *strDomain);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_CLEARCOOKIES)(char *strDomain);
ICEPUB_CLEARCOOKIES *icePub_ClearCookies = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_ClearCookies=(ICEPUB_CLEARCOOKIES *)GetProcAddress(hDLLDrv,"icePub_ClearCookies");
}
if(icePub_ClearCookies)
{
icePub_ClearCookies("");
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
129
----------------------- Page 130-----------------------
VB sample 代码:
Private Declare Function icePub_ClearCookies Lib "icePubDll.dll" (ByVal strDomain As String) As Integer
Private Declare Function icePub_ClearCache Lib "icePubDll.dll" (ByVal strDomain As String) As Integer
Dim a2 As Integer
a2=icePub_ClearCache("")
a2=icePub_ClearCookies("")
130
----------------------- Page 131-----------------------
3.60 icePub_ClearCache
函数原型:
int WINAPI icePub_ClearCache(char *strDomain)
输入:strDomain 域名
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_ClearCache (char *strDomain);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_CLEARCACHE)(char *strDomain);
ICEPUB_CLEARCACHE *icePub_ClearCache = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_ClearCache =(ICEPUB_CLEARCACHE *)GetProcAddress(hDLLDrv,"icePub_ClearCache");
}
if(icePub_ClearCache)
{
icePub_ClearCache ("");
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
131
----------------------- Page 132-----------------------
VB sample 代码:
Private Declare Function icePub_ClearCookies Lib "icePubDll.dll" (ByVal strDomain As String) As Integer
Private Declare Function icePub_ClearCache Lib "icePubDll.dll" (ByVal strDomain As String) As Integer
Dim a2 As Integer
a2=icePub_ClearCache("")
a2=icePub_ClearCookies("")
132
----------------------- Page 133-----------------------
3.61 icePub_getFavoriteFolder
函数原型:
int WINAPI icePub_getFavoriteFolder(char *strFav,int charFlag)
输入:charFlag 0 末尾没有\,1 末尾有\
输出:strFav 收藏夹路径
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_getFavoriteFolder(char *strFav,int charFlag);
动态调用例程
VC sample 代码:
char strFavoritePath[1024];
typedef int (WINAPI ICEPUB_GETFAVORITEFOLDER)( char *strFav,int charFlag);
ICEPUB_GETFAVORITEFOLDER *icePub_getFavoriteFolder = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getFavoriteFolder =(ICEPUB_GETFAVORITEFOLDER
*)GetProcAddress(hDLLDrv,"icePub_getFavoriteFolder");
}
if(icePub_getFavoriteFolder)
{
icePub_getFavoriteFolder(strFavoritePath,1);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
133
----------------------- Page 134-----------------------
VB sample 代码:
Private Declare Function icePub_ClearCookies Lib "icePubDll.dll" (ByVal strDomain As String) As Integer
Private Declare Function icePub_ClearCache Lib "icePubDll.dll" (ByVal strDomain As String) As Integer
Dim a2 As Integer
a2=icePub_ClearCache("")
a2=icePub_ClearCookies("")
134
----------------------- Page 135-----------------------
3.62 icePub_setIEStartPage
函数原型:
int WINAPI icePub_setIEStartPage(char *strUrl)
输入:strUrl 地址
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_setIEStartPage(char *strUrl);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_SETIESTARTPAGE)( char *strUrl);
ICEPUB_SETIESTARTPAGE *icePub_setIEStartPage = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_setIEStartPage =(ICEPUB_SETIESTARTPAGE
*)GetProcAddress(hDLLDrv,"icePub_setIEStartPage");
}
if(icePub_setIEStartPage)
{
icePub_setIEStartPage("http://bbs.icese.net");
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
135
----------------------- Page 136-----------------------
VB sample 代码:
Private Declare Function icePub_setIEStartPage Lib "icePubDll.dll" (ByVal strUrl As String) As Integer
Dim a2 As Integer
a2=icePub_setIEStartPage("http://bbs.icese.net")
136
----------------------- Page 137-----------------------
3.63 icePub_regOcx
函数原型:
int WINAPI icePub_regOcx(char *strOcxFilename)
输入:strOcxFilename OCX 控件带路径文件名
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_regOcx(char *strOcxFilename);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_REGOCX)(char *strDomain);
ICEPUB_REGOCX *icePub_regOcx = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_regOcx =(ICEPUB_REGOCX *)GetProcAddress(hDLLDrv,"icePub_regOcx");
}
if(icePub_regOcx)
{
icePub_regOcx ("c:\\windows\\system32\\my.ocx");
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
137
----------------------- Page 138-----------------------
VB sample 代码:
Private Declare Function icePub_regOcx Lib "icePubDll.dll" (ByVal strOcxFilename As String) As Integer
Dim a2 As Integer
a2=icePub_regOcx("c:\windows\system32\my.ocx")
138
----------------------- Page 139-----------------------
3.64 icePub_reboot
函数原型:
int WINAPI icePub_reboot(void)
输入:
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_reboot(void);
动态调用例程
VC iceIE 系统重起代码:
typedef int (WINAPI ICEPUB_REBOOT)(void);
ICEPUB_REBOOT *icePub_reboot = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_reboot = (ICEPUB_REBOOT *)GetProcAddress(hDLLDrv, "icePub_reboot");
}
if(icePub_reboot)
icePub_reboot();
if(hDLLDrv)
FreeLibrary(hDLLDrv);
139
----------------------- Page 140-----------------------
VB sample 代码:
Private Declare Function icePub_reboot Lib "icePubDll.dll" () As Integer
Dim a2 As Integer
A2 = icePub_reboot()
140
----------------------- Page 141-----------------------
3.65 icePub_shutdown
函数原型:
int WINAPI icePub_shutdown(void)
输入:
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_shutdown(void);
动态调用例程
VC iceIE 系统关机代码:
typedef int (WINAPI ICEPUB_SHUTDOWN)(void);
ICEPUB_SHUTDOWN * icePub_shutdown = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_shutdown = (ICEPUB_SHUTDOWN *)GetProcAddress(hDLLDrv, " icePub_shutdown");
}
if(icePub_shutdown)
icePub_shutdown ();
if(hDLLDrv)
FreeLibrary(hDLLDrv);
141
----------------------- Page 142-----------------------
VB sample 代码:
Private Declare Function icePub_shutdown Lib "icePubDll.dll" () As Integer
Dim a2 As Integer
A2 = icePub_shutdown()
142
----------------------- Page 143-----------------------
3.66 icePub_toClipboard
函数原型:
int WINAPI icePub_toClipboard(char *strBuffer)
输入:strBuffer 文本内容
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_toClipboard(char *strBuffer);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_TOCLIPBOARD)(char *strBuffer);
ICEPUB_TOCLIPBOARD *icePub_toClipboard = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_toClipboard = (ICEPUB_TOCLIPBOARD *)GetProcAddress(hDLLDrv, "icePub_toClipboard");
}
if(icePub_toClipboard != NULL)
{
icePub_toClipboard("风肌雪骨霜满心,幽魂伤魄愁入神。冷卧聆听梦思语,寒惊不觉夜喃喃。");
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
143
----------------------- Page 144-----------------------
VB sample 代码:
Private Declare Function icePub_toClipboard Lib "icePubDll.dll" (ByVal strBuffer As String) As Integer
Dim a2 As Integer
a2 = icePub_toClipboard("案头台灯,银光泪洒,泣入心头。琴里风情,依然淡雅,还是忧伤。"+ vbCrLf
+ vbCrLf +"怎能无动于衷!思旧人,双眸雾濛。几度风霜,幽幽怨怨,苦诉衷肠。")
144
----------------------- Page 145-----------------------
3.67 icePub_getClipboardText
函数原型:
int WINAPI icePub_getClipboardText(char *strBuffer,int maxLen)
输入:maxLen strBuffer 最大长度
输出:strBuffer 取得的文本内容
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_getClipboardText(char *strBuffer,int maxLen);
动态调用例程
VC sample 代码:
char buff[1024+1];
typedef int (WINAPI ICEPUB_GETCLIPBOARDTEXT)(char *strBuffer,int maxLen);
ICEPUB_GETCLIPBOARDTEXT *icePub_getClipboardText = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getClipboardText = (ICEPUB_GETCLIPBOARDTEXT *)GetProcAddress(hDLLDrv,
"icePub_getClipboardText");
}
if(icePub_getClipboardText != NULL)
{
icePub_getClipboardText(buff,1024);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff);
145
----------------------- Page 146-----------------------
VB sample 代码:
Private Declare Function icePub_getClipboardText Lib "icePubDll.dll" (ByVal strBuffer As String,ByVal
maxLen As Ingeter) As Integer
Dim a2 As Integer
Dim str1 As String
str1=Space(1024+1)
a2 = icePub_toClipboard(str1,1024)
MsgBox str1
146
----------------------- Page 147-----------------------
3.68 icePub_copyFormToClipboard
函数原型:
int WINAPI icePub_copyFormToClipboard(HWND hWnd)
输入:hWnd 窗体句柄,注意窗体不能最小化
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_copyFormToClipboard(HWND hWnd);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_COPYFORMTOCLIPBOARD)(HWND hWnd);
ICEPUB_COPYFORMTOCLIPBOARD *icePub_copyFormToClipboard = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_copyFormToClipboard=(ICEPUB_COPYFORMTOCLIPBOARD
*)GetProcAddress(hDLLDrv,"icePub_copyFormToClipboard");
}
if(icePub_copyFormToClipboard)
icePub_copyFormToClipboard(m_hWnd);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
147
----------------------- Page 148-----------------------
VB sample 代码:
Private Declare Function icePub_copyFormToClipboard Lib "icePubDll.dll" (ByVal hWnd As Long) As Integer
Dim a2 As Integer
a2 = icePub_sizeFormToScreen(Me.hWnd)
148
----------------------- Page 149-----------------------
3.69 icePub_formToClipboard
函数原型:
int WINAPI icePub_formToClipboard(char *strFormTitle)
输入:strFormTitle 窗体标题,注意窗体不能最小化
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_formToClipboard(char *strFormTitle);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_FORMTOCLIPBOARD)(char *strFormTitle);
ICEPUB_FORMTOCLIPBOARD *icePub_formToClipboard = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_formToClipboard=(ICEPUB_FORMTOCLIPBOARD
*)GetProcAddress(hDLLDrv,"icePub_formToClipboard");
}
if(icePub_copyFormToClipboard)
icePub_formToClipboard("与 行者 交谈中");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
149
----------------------- Page 150-----------------------
VB sample 代码:
Private Declare Function icePub_formToClipboard Lib "icePubDll.dll" (ByVal strFormTitle As String) As
Integer
Dim a2 As Integer
a2 = icePub_formToClipboard("与 行者 交谈中")
150
----------------------- Page 151-----------------------
3.70 icePub_copyForegroundFormToClipboard
复制任何当前窗体(获得焦点的)到剪切板
函数原型:
int WINAPI icePub_copyForegroundFormToClipboard()
输入:
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_copyForegroundFormToClipboard();
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_COPYFOREGROUNFFORMTOCLIPBOARD)(char *strFormTitle);
ICEPUB_COPYFOREGROUNFFORMTOCLIPBOARD *icePub_copyForegroundFormToClipboard = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_copyForegroundFormToClipboard=(ICEPUB_COPYFOREGROUNFFORMTOCLIPBOARD
*)GetProcAddress(hDLLDrv,"icePub_copyForegroundFormToClipboard");
}
if(icePub_copyForegroundFormToClipboard)
icePub_copyForegroundFormToClipboard();
if(hDLLDrv)
FreeLibrary(hDLLDrv);
151
----------------------- Page 152-----------------------
VB sample 代码:
Private Declare Function icePub_copyForegroundFormToClipboard Lib "icePubDll.dll" () As Integer
Dim a2 As Integer
a2 = icePub_copyForegroundFormToClipboard()
152
----------------------- Page 153-----------------------
3.71 icePub_getSysLanguage
函数原型:
int WINAPI icePub_getSysLanguage(char *strLangeName)
输入:strLangeName 系统语言代码,详见附录16 进制操作系统语言代码列表
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_getSysLanguage(char *strLangeName);
动态调用例程
VC sample 代码:
char str1[128];
typedef int (WINAPI ICEPUB_GETSYSLANGUAGE)(char *strLangeName);
ICEPUB_GETSYSLANGUAGE *icePub_getSysLanguage = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getSysLanguage = (ICEPUB_GETSYSLANGUAGE *)GetProcAddress(hDLLDrv,
"icePub_getSysLanguage");
}
if(icePub_getSysLanguage)
icePub_getSysLanguage(str1);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(str1);
153
----------------------- Page 154-----------------------
VB sample 代码:
Private Declare Function icePub_getSysLanguage Lib "icePubDll.dll" (ByVal strLangeName As String) As
Integer
Dim a2 As Integer
Dim str1 As String
str1 = Space(1024)
a2 = icePub_getSysLanguage(str1)
MsgBox str1
154
----------------------- Page 155-----------------------
3.72 icePub_setSysLanguage
函数原型:
int WINAPI icePub_setSysLanguage(int languageCode)
输入:languageCode 系统语言代码,详见附录16 进制操作系统语言代码列表
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_setSysLanguage(int languageCode);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_SETSYSLANGUAGE)(int languageCode);
ICEPUB_SETSYSLANGUAGE *icePub_setSysLanguage = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_setSysLanguage = (ICEPUB_SETSYSLANGUAGE *)GetProcAddress(hDLLDrv,
"icePub_setSysLanguage");
}
if(icePub_setSysLanguage)
icePub_setSysLanguage(1033);//English
if(hDLLDrv)
FreeLibrary(hDLLDrv);
155
----------------------- Page 156-----------------------
VB sample 代码:
Private Declare Function icePub_setSysLanguage Lib "icePubDll.dll" (ByVal languageCode As Integer) As
Integer
Dim a2 As Integer
a2=icePub_setSysLanguage(1031)'German
156
----------------------- Page 157-----------------------
3.73 icePub_getProcessInfo
函数原型:
int WINAPI icePub_getProcessInfo(char *strInfoList ,int maxLen)
输入:maxLen strInfoList 最大长度
输出:strInfoList 进程基本信息,name|pid|path,一行一条信息
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_getProcessInfo(char *strInfoList ,int maxLen);
动态调用例程
VC sample 代码:
int recordCounts;
char buff[1024*30+1];
typedef int (WINAPI ICEPUB_GETPROCESSINFO)(char *strInfoList ,int maxLen);
ICEPUB_GETPROCESSINFO *icePub_getProcessInfo = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getProcessInfo = (ICEPUB_GETPROCESSINFO *)GetProcAddress(hDLLDrv,
"icePub_getProcessInfo");
}
if(icePub_getProcessInfo)
recordCounts=icePub_getProcessInfo(buff,1024*30);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff);
157
----------------------- Page 158-----------------------
VB sample 代码:
Private Declare Function icePub_getProcessInfo Lib "icePubDll.dll" (ByVal strInfoList As String, ByVal
maxLen As Integer) As Integer
Dim a2 As Integer
DIm buff As String
buff=space(1024*30+1)
a2=icePub_getProcessInfo(buff,1024*30)
MsgBox buff
158
----------------------- Page 159-----------------------
3.74 icePub_getProcessPathByName
函数原型:
int WINAPI icePub_getProcessPathByName(char *strProcessName,char *strPath)
输入:strProcessName 进程名
输出:strPath 进程带路径文件名
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_getProcessPathByName(char *strProcessName,char *strPath);
动态调用例程
VC sample 代码:
int retCode;
char buff[1024];
typedef int (WINAPI ICEPUB_GETPROCESSPATHBYNAME)(char *strProcessName,char *strPath);
ICEPUB_GETPROCESSPATHBYNAME *icePub_getProcessPathByName = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getProcessPathByName = (ICEPUB_GETPROCESSPATHBYNAME
*)GetProcAddress(hDLLDrv, "icePub_getProcessPathByName");
}
if(icePub_getProcessPathByName)
retCode=icePub_getProcessPathByName("QQ.exe",buff);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff);
159
----------------------- Page 160-----------------------
VB sample 代码:
Private Declare Function icePub_getProcessPathByName Lib "icePubDll.dll" (ByVal strProcessName As
String,ByVal strPath As String) As Integer
Dim a2 As Integer
DIm buff As String
buff=space(1024)
a2=icePub_getProcessPathByName("QQ.exe",buff)
MsgBox buff
160
----------------------- Page 161-----------------------
3.75 icePub_getProcessPathByPid
函数原型:
int WINAPI icePub_getProcessPathByPid(int pid,char *strPath)
输入:pid 进程PID
输出:strPath 进程带路径文件名
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_getProcessPathByPid(int pid,char *strPath);
动态调用例程
VC sample 代码:
int retCode;
char buff[1024];
typedef int (WINAPI ICEPUB_GETPROCESSPATHBYPID)( int pid,char *strPath);
ICEPUB_GETPROCESSPATHBYPID *icePub_getProcessPathByPid = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getProcessPathByPid = (ICEPUB_GETPROCESSPATHBYPID *)GetProcAddress(hDLLDrv,
"icePub_getProcessPathByPid");
}
if(icePub_getProcessPathByPid)
retCode=icePub_getProcessPathByPid (5432,buff);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff);
161
----------------------- Page 162-----------------------
VB sample 代码:
Private Declare Function icePub_getProcessPathByPid Lib "icePubDll.dll" (ByVal pid As Integer,ByVal
strPath As String) As Integer
Dim a2 As Integer
DIm buff As String
buff=space(1024)
a2=icePub_getProcessPathByPid (2484,buff)
MsgBox buff
162
----------------------- Page 163-----------------------
3.76 icePub_terminatePID
函数原型:
int WINAPI icePub_terminatePID(unsigned long pid)
输入:pid 进程PID
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_terminatePID(unsigned long pid);
动态调用例程
VC sample 代码:
int retCode;
typedef int (WINAPI ICEPUB_TERMINATEPID)(unsigned long pid);
ICEPUB_TERMINATEPID *icePub_terminatePID = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_terminatePID = (ICEPUB_TERMINATEPID *)GetProcAddress(hDLLDrv,
"icePub_terminatePID");
}
if(icePub_terminatePID)
{
retCode = icePub_terminatePID(517);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
163
----------------------- Page 164-----------------------
VB sample 代码:
Private Declare Function icePub_terminatePID Lib "icePubDll.dll" (ByVal pid As long) As Integer
Dim a2 As Integer
a2 = icePub_terminatePID(517)
164
----------------------- Page 165-----------------------
3.77 icePub_makeDeskShortcut
函数原型:
int WINAPI icePub_makeDeskShortcut(LPCSTR pszPathObj,LPSTR pszPath,LPSTR
strShortcut,LPSTR pszDesc)
输入:pszPathObj 快捷方式指向的应用程序
pszPath 起始位置(工作目录)
strShortcut 快捷方式程序名
pszDesc 快捷方式的描述
输出:
VC 连接Lib 方式声明
__declspec (dllexport)
int WINAPI icePub_makeDeskShortcut(LPCSTR pszPathObj,LPSTR pszPath,LPSTR
strShortcut,LPSTR pszDesc);
动态调用例程
VC iceSetup 安装程序创建桌面快捷方式代码:
typedef int (WINAPI ICEPUB_CREATEDESKSHORTCUT)(LPCSTR pszPathObj,LPSTR pszPath,LPSTR
pszPathLink,LPSTR pszDesc);
ICEPUB_CREATEDESKSHORTCUT *icePub_makeDeskShortcut = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_makeDeskShortcut = (ICEPUB_CREATEDESKSHORTCUT *)GetProcAddress(hDLLDrv,
"icePub_makeDeskShortcut");
}
icePub_makeDeskShortcut(m_path+strDataPath+"\\"+strShortcut,startPath.GetBuffer(- 1),strShortcut.GetBuff
er(- 1),strShortcut.GetBuffer(- 1));
if(hDLLDrv)
FreeLibrary(hDLLDrv);
165
----------------------- Page 166-----------------------
VB sample 代码:
Private Declare Function icePub_makeDeskShortcut Lib "icePubDll.dll" (ByVal pszPathObj As String,ByVal
pszPath As String,ByVal strShortcut As String,ByVal pszDesc As String) As Integer
Dim a2 As Integer
a2=icePub_makeDeskShortcut("c:\program files\my.exe","c:\program files\","my.exe","my.exe")
166
----------------------- Page 167-----------------------
3.78 icePub_open
函数原型:
int WINAPI icePub_open(char *strPath)
输入:strPath 待打开文件名或链接或文件夹
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_open(char *strPath);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_OPEN)(char *strPath);
ICEPUB_OPEN *icePub_open = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_open = (ICEPUB_OPEN *)GetProcAddress(hDLLDrv, "icePub_open");
}
if(icePub_open != NULL)
{
icePub_open("notepad.exe");
icePub_open("http://www.360doc.com/content/10/0723/13/1898714_40880762.shtml");
icePub_open("D:\\icePubDLL 揭秘.pdf");
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
167
----------------------- Page 168-----------------------
VB sample 代码:
Private Declare Function icePub_open Lib "icePubDll.dll" (ByVal strPath As String) As Integer
Dim a2 As Integer
a2 = icePub_open("notepad.exe")
a2 = icePub_open("http://www.360doc.com/content/10/0723/13/1898714_40880762.shtml")
a2 = icePub_open("D:\icePubDLL 揭秘.pdf")
168
----------------------- Page 169-----------------------
3.79 icePub_openFromFile
函数原型:
int WINAPI icePub_openFromFile(char *strFilename)
输入:strFilename 待打开文件名或链接或文件夹的列表文件名;一行一个
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_openFromFile(char *strFilename);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_OPENFROMFILE)( char *strFilename);
ICEPUB_OPENFROMFILE *icePub_openFromFile = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_openFromFile = (ICEPUB_OPENFROMFILE *)GetProcAddress(hDLLDrv,
"icePub_openFromFile");
}
if(icePub_openFromFile)
icePub_openFromFile("toolslist.txt");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
169
----------------------- Page 170-----------------------
VB sample 代码:
Private Declare Function icePub_openFromFile Lib "icePubDll.dll" (ByVal strFilename String) As Integer
Dim a2 As Integer
a2=icePub_openFromFile(10"toolslist.txt"31)
170
----------------------- Page 171-----------------------
3.80 icePub_getApplicationName
函数原型:
void WINAPI icePub_getApplicationName(char *strReturn)
输入:
输出:strReturn 应用程序带路径文件名
VC 连接Lib 方式声明
__declspec(dllexport)
void WINAPI icePub_getApplicationName(char *strReturn);
动态调用例程
VC sample 代码:
char strAppName[1024];
typedef int (WINAPI ICEPUB_GETAPPLICATIONNAME)(char *strReturn);
ICEPUB_GETAPPLICATIONNAME *icePub_getApplicationName = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getApplicationName = (ICEPUB_GETAPPLICATIONNAME *)GetProcAddress(hDLLDrv,
"icePub_getApplicationName");
}
if(icePub_getApplicationName != NULL)
{
icePub_getApplicationName(strAppName);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(strAppName);
171
----------------------- Page 172-----------------------
VB sample 代码:
Private Declare Function icePub_getApplicationName Lib "icePubDll.dll" (ByVal strReturn As String) As
Integer
Dim a2 As Integer
Dim strAppName As String
strAppName=Space(1024)
a2 = icePub_getApplicationName(strAppName)
MsgBox strAppName
172
----------------------- Page 173-----------------------
3.81 icePub_getApplicationPath
函数原型:
void WINAPI icePub_getApplicationPath(char icechar,char *strReturn)
输入:
输出:strReturn 应用程序路径名
VC 连接Lib 方式声明
__declspec(dllexport)
void WINAPI icePub_getApplicationPath(char icechar,char *strReturn);
动态调用例程
VC sample 代码:
char strAppPath[1024];
typedef int (WINAPI ICEPUB_GETAPPLICATIONPATH)(char icechar,char *strReturn);
ICEPUB_GETAPPLICATIONPATH *icePub_getApplicationPath = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getApplicationPath = (ICEPUB_GETAPPLICATIONPATH *)GetProcAddress(hDLLDrv,
"icePub_getApplicationPath");
}
if(icePub_getApplicationPath != NULL)
{
icePub_getApplicationPath('\\',strAppPath);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(strAppPath);
173
----------------------- Page 174-----------------------
VB sample 代码:
Private Declare Function icePub_getApplicationPath Lib "icePubDll.dll" (ByVal icechar As byte,ByVal
strReturn As String) As Integer
Dim a2 As Integer
Dim strAppPath As String
strAppPath=Space(1024)
a2 = icePub_getApplicationPath('\',strAppPath)
MsgBox strAppPath
174
----------------------- Page 175-----------------------
3.82 icePub_getAppExeName
函数原型:
void WINAPI icePub_getAppExeName(char *strReturn)
输入:
输出:strReturn 应用程序文件名
VC 连接Lib 方式声明
__declspec(dllexport)
void WINAPI icePub_getAppExeName(char *strReturn);
动态调用例程
VC sample 代码:
char strExeName[1024];
typedef int (WINAPI ICEPUB_GETAPPEXENAME)(char *strReturn);
ICEPUB_GETAPPEXENAME *icePub_getAppExeName = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getAppExeName = (ICEPUB_GETAPPEXENAME *)GetProcAddress(hDLLDrv,
"icePub_getAppExeName");
}
if(icePub_getAppExeName != NULL)
{
icePub_getAppExeName(strExeName);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(strExeName);
175
----------------------- Page 176-----------------------
VB sample 代码:
Private Declare Function icePub_getAppExeName Lib "icePubDll.dll" (ByVal strReturn As String) As Integer
Dim a2 As Integer
Dim strExeName As String
strExeName=Space(1024)
a2 = icePub_getAppExeName(strExeName)
MsgBox strExeName
176
----------------------- Page 177-----------------------
3.83 icePub_getExeName
函数原型:
void WINAPI icePub_getExeName(char *strPathFilename,char *strPath,char *strFile)
输入:strPathFilename 带路径程序文件名
输出:strPath 程序路径
strFile 程序文件名
VC 连接Lib 方式声明
__declspec(dllexport)
void WINAPI icePub_getExeName(char *strPathFilename,char *strPath,char *strFile);
动态调用例程
VC sample 代码:
char strPathName[1024];
char strExeName[1024];
typedef int (WINAPI ICEPUB_GETEXENAME)( char *strPathFilename,char *strPath,char *strFile);
ICEPUB_GETEXENAME * icePub_getExeName=0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getExeName = (ICEPUB_GETEXENAME *)GetProcAddress(hDLLDrv, "icePub_getExeName");
}
if(icePub_getExeName != NULL)
{
icePub_getExeName("c:\\program files\\iceIE\\iceIE.exe", strPathName, strExeName);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(strPathName);
AfxMessageBox(strExeName);
177
----------------------- Page 178-----------------------
VB sample 代码:
Private Declare Function icePub_getExeName Lib "icePubDll.dll" (ByVal strPathFilename As String,ByVal
strPath As String,ByVal strFile As String) As Integer
Dim a2 As Integer
Dim strPathName As String
Dim strExeName As String
strPathName=Space(1024)
strExeName=Space(1024)
a2 = icePub_getExeName("c:\program files\iceIE\iceIE.exe", strPathName ,strExeName)
MsgBox strPathName
MsgBox strExeName
178
----------------------- Page 179-----------------------
3.84 icePub_runByAdmin
函数原型:
int WINAPI icePub_runByAdmin(char *strAppPathName,char *strSuParam)
输入:strAppPathName 带路径应用程序文件名;为空则默认本身应用程序
strSuParam 以管理员权限启动程序的命令行参数;为空则默认为"su "
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_runByAdmin(char *strAppPathName,char *strSuParam);
动态调用例程
VC sample 代码:
int runByAdmin(void)
{
int retCode=-1;
typedef int (WINAPI ICEPUB_RUNBYADMIN)(char *strAppPathName,char *strSuParam);
ICEPUB_RUNBYADMIN *icePub_runByAdmin = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
icePub_runByAdmin = (ICEPUB_RUNBYADMIN *)GetProcAddress(hDLLDrv, "icePub_runByAdmin");
if(icePub_runByAdmin)
retCode=icePub_runByAdmin("","");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
if(retCode == 0)
exit(0);
if(retCode == -1)
AfxMessageBox(" 以管理员启动失败,请手动启动");
return retCode;
}
179
----------------------- Page 180-----------------------
VB sample 代码:
Private Declare Function icePub_runByAdmin Lib "icePubDll.dll" (ByVal strAppPathName As String, ByVal
strSuParam As String) As Integer
Private Sub Form_Load()
Dim a2 As Integer
If Command <> "su" Then
a2 = icePub_runByAdmin("", "")
'如果想启动别的程序,在第一个参数输入带路径的应用程序名,比如"d:\abc.exe"
'第2 个参数是自定义命令行参数,为空则默认为"su"
If a2 = 0 Then
Unload Me
End If
End If
End Sub
180
----------------------- Page 181-----------------------
3.85 icePub_setAutorunByOS
函数原型:
int WINAPI icePub_setAutorunByOS(char *strPathfilename,char *strKeyName)
输入:strPathfilename 自动随机运行的程序带路径文件名,为空则取调用函数的应用程序
strKeyName 键值名称,为空则自动取应用程序名
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_setAutorunByOS(char *strPathfilename,char *strKeyName);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_SETAUTORUNBYOS)(char *strKeyName);
ICEPUB_SETAUTORUNBYOS *icePub_setAutorunByOS = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_setAutorunByOS = (ICEPUB_SETAUTORUNBYOS *)GetProcAddress(hDLLDrv,
"icePub_setAutorunByOS");
}
if(icePub_setAutorunByOS)
icePub_setAutorunByOS("c:\\myapp.exe","");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
181
----------------------- Page 182-----------------------
VB sample 代码:
Private Declare Function icePub_setAutorunByOS Lib "icePubDll.dll" (ByVal strKeyName As String) As
Integer
Dim a2 As Integer
a2=icePub_setAutorunByOS("c:\myapp.exe","")
182
----------------------- Page 183-----------------------
3.86 icePub_setRunBySysStart
函数原型:
int WINAPI icePub_setRunBySysStart(char *strKeyName)
输入:strKeyName 键值名称,为空则自动取应用程序名
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_setRunBySysStart(char *strKeyName);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_SETRUNBYSYSSTART)(char *strKeyName);
ICEPUB_SETRUNBYSYSSTART *icePub_setRunBySysStart = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_setRunBySysStart = (ICEPUB_SETRUNBYSYSSTART *)GetProcAddress(hDLLDrv,
"icePub_setRunBySysStart");
}
if(icePub_setRunBySysStart)
icePub_setRunBySysStart("");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
183
----------------------- Page 184-----------------------
VB sample 代码:
Private Declare Function icePub_setRunBySysStart Lib "icePubDll.dll" (ByVal strKeyName As String) As
Integer
Dim a2 As Integer
a2=icePub_setRunBySysStart("")
184
----------------------- Page 185-----------------------
3.87 icePub_clearRunBySysStart
函数原型:
int WINAPI icePub_clearRunBySysStart(char *strKeyName)
输入:strKeyName 待清除键值名称,为空则自动取应用程序名
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_clearRunBySysStart(char *strKeyName);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_CLEARRUNBYSYSSTART)(char *strKeyName);
ICEPUB_CLEARRUNBYSYSSTART *icePub_clearRunBySysStart = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_clearRunBySysStart = (ICEPUB_CLEARRUNBYSYSSTART *)GetProcAddress(hDLLDrv,
"icePub_clearRunBySysStart");
}
if(icePub_clearRunBySysStart)
icePub_clearRunBySysStart("");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
185
----------------------- Page 186-----------------------
VB sample 代码:
Private Declare Function icePub_clearRunBySysStart Lib "icePubDll.dll" (ByVal strKeyName As String) As
Integer
Dim a2 As Integer
a2=icePub_clearRunBySysStart("")
186
----------------------- Page 187-----------------------
3.88 icePub_receiveMail
函数原型:
int WINAPI icePub_receiveMail(char *strUsername,char *strPassword,char
*strSmtpSever,char *strMailText,int TextMaxLen,char *strFenge,char *strFilename,int
deleteFlag)
输入:strUsername pop3 用户名
strPassword 用户密码
strSmtpSever pop3 服务器
TextMaxLen strMailText 最大长度
StrFenge 每个邮件间分隔符串
DeleteFlag 收完是否删除邮标志
输出:strMailText 接收的邮件内容
StrFilename 附件文件列表,多个附件则分号分隔
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_receiveMail(char *strUsername,char *strPassword,char
*strSmtpSever,char *strMailText,int TextMaxLen,char *strFenge,char *strFilename,int
deleteFlag);
动态调用例程
VC sample 代码:
char buff[1024*30+1];
char strFileNameList[1024*10];
{
typedef int (WINAPI RECEIVEMAIL)( char *strUsername,char *strPassword,char *strSmtpSever,char
*strMailText,int TextMaxLen,char *strFenge,char *strFilename,int deleteFlag);
RECEIVEMAIL *icePub_receiveMail = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_receiveMail = (RECEIVEMAILTEXT *)GetProcAddress(hDLLDrv, "icePub_receiveMail");
}
icePub_receiveMail("bigshuye","12345678","pop.tom.com",buff,1024*30,"\r\n\r\n",strFileNameList,0);
}
AfxMessageBox(buff);
187
----------------------- Page 188-----------------------
VB sample 代码:
Private Declare Function icePub_receiveMail Lib "icePubDll.dll" (ByVal strusername As String, ByVal strpwd
As String, ByVal strsmtpsever As String, ByVal strMailText As String, ByVal TextMaxLen As Integer, ByVal
strFenge As String, ByVal strFilename As String, ByVal deleteFlag As Integer) As Integer
Dim str1 As String
Dim strFileNameList As String
Dim str3 As String
Dim str3 As String
Dim a2 As Integer
str3 = vbCrLf + vbCrLf + vbCrLf + "===================" + vbCrLf
str1 = Space(1024 * 30 + 1)
strFileNameList = Space(1024 *10)
a2 = icePub_receiveMail("ahuinuli", "112233", "pop.tom.com", str1, 1024 * 30, str3, strFileNameList,0)
MsgBox str1
不支持gmail 之类,否则得用openssl,太拖家带口„
188
----------------------- Page 189-----------------------
3.89 icePub_receiveMailText
函数原型:
int WINAPI icePub_receiveMailText(char *strUsername,char *strPassword,char
*strSmtpSever,char *strMailText,int TextMaxLen,char *strFenge,int deleteFlag)
输入:strUsername pop3 用户名
strPassword 用户密码
strSmtpSever pop3 服务器
TextMaxLen strMailText 最大长度
StrFenge 每个邮件间分隔符串
DeleteFlag 收完是否删除邮标志
输出:strMailText 接收的邮件内容
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_receiveMailText(char *strUsername,char *strPassword,char
*strSmtpSever,char *strMailText,int TextMaxLen,char *strFenge,int deleteFlag);
动态调用例程
VC sample 代码:
char buff[1024*30+1];
{
typedef int (WINAPI RECEIVEMAILTEXT)(char *strUsername,char *strPassword,char
*strSmtpSever,char *strMailText,int TextMaxLen,char *strFenge,int deleteFlag);
RECEIVEMAILTEXT *icePub_receiveMailText = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_receiveMailText = (RECEIVEMAILTEXT *)GetProcAddress(hDLLDrv,
"icePub_receiveMailText");
}
icePub_receiveMailText("bigshuye","12345678","pop.tom.com",buff,1024*30,"\r\n\r\n",0);
}
AfxMessageBox(buff);
189
----------------------- Page 190-----------------------
VB sample 代码:
Private Declare Function icePub_receiveMailText Lib "icePubDll.dll" (ByVal strusername As String, ByVal
strpwd As String, ByVal strsmtpsever As String, ByVal strMailText As String, ByVal TextMaxLen As Integer,
ByVal strFenge As String, ByVal deleteFlag As Integer) As Integer
Dim str1 As String
Dim str3 As String
Dim a2 As Integer
str3 = vbCrLf + vbCrLf + vbCrLf + "===================" + vbCrLf
str1 = Space(1024 * 30 + 1)
a2 = icePub_receiveMailText("ahuinuli", "112233", "pop.tom.com", str1, 1024 * 30, str3, 0)
MsgBox str1
不支持gmail 之类,否则得用openssl,太拖家带口„
190
----------------------- Page 191-----------------------
3.90 icePub_receiveMailTextToFile
函数原型:
int WINAPI icePub_receiveMailTextToFile(char *strUsername,char *strPassword,char
*strSmtpSever,char *strFenge,char *strFileName,int appendFlag,int deleteFlag)
输入:strUsername pop3 用户名
strPassword 用户密码
strSmtpSever pop3 服务器
TextMaxLen strMailText 最大长度
StrFenge 每个邮件间分隔符串
DeleteFlag 收完是否删除邮标志
输出:strMailText 接收的邮件内容
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_receiveMailTextToFile(char *strUsername,char *strPassword,char
*strSmtpSever,char *strFenge,char *strFileName,int appendFlag,int deleteFlag);
动态调用例程
VC sample 代码:
{
typedef int (WINAPI RECEIVEMAILTEXTTOFILE)(char *strUsername,char *strPassword,char
*strSmtpSever,char *strFenge,char *strFileName,int appendFlag,int deleteFlag);
RECEIVEMAILTEXTTOFILE *icePub_receiveMailTextToFile = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_receiveMailTextToFile = (RECEIVEMAILTEXTTOFILE *)GetProcAddress(hDLLDrv,
"icePub_receiveMailTextToFile");
}
if(icePub_receiveMailTextToFile)
icePub_receiveMailTextToFile("bigshuye","12345678","pop.tom.com","\r\n\r\n","mymail.txt",0,1);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
}
191
----------------------- Page 192-----------------------
VB sample 代码:
Private Declare Function icePub_receiveMailTextToFile Lib "icePubDll.dll" (ByVal strusername As String,
ByVal strpwd As String, ByVal strsmtpsever As String, ByVal strFenge As String, ByVal strFileName As
String, ByVal appendFlag As Integer, ByVal deleteFlag As Integer) As Integer
Dim str3 As String
Dim str4 As String
Dim a2 As Integer
str3 = vbCrLf + vbCrLf + vbCrLf + "===================" + vbCrLf
str4 = App.Path + "\mymail.txt"
a2 = icePub_receiveMailTextToFile("ahuinuli", "112233", "pop.tom.com", str3, str4, 0, 1)
不支持gmail 之类,否则得用openssl,太拖家带口„
192
----------------------- Page 193-----------------------
3.91 icePub_sendMailText
函数原型:
int WINAPI icePub_sendMailText(char *strUsername,char *strPassword,char
*strSmtpServer,char *sendMail,char *toMailList,char *strSubject,char *strText)
输入:strUsername smtp 用户名
strPassword 用户密码
strSmtpServer smtp 服务器
sendMail 发件人邮箱地址
toMailList 收件人邮箱地址,多个以分号分隔
strSubject 标题
strText 文本内容
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_sendMailText(char *strUsername,char *strPassword,char
*strSmtpServer,char *sendMail,char *toMailList,char *strSubject,char *strText);
动态调用例程
VC sample 代码:
{
typedef int (WINAPI ICEPUB_SENDMAILTEXT)(char *strUsername,char *strPassword,char
*strSmtpServer,char *sendMail,char *toMailList,char *strSubject,char *strText);
ICEPUB_SENDMAILTEXT *icePub_sendMailText = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_sendMailText = (ICEPUB_SENDMAILTEXT *)GetProcAddress(hDLLDrv,
"icePub_sendMailText");
}
if(icePub_sendMailText)
icePub_sendMailText("ahuinuli","112233","smtp.tom.com","ahuinuli@tom.com","mike@sina.com",
"标题:还好么?","文本:扉心祈梦,梦语问春天。");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
}
193
----------------------- Page 194-----------------------
VB sample 代码:
Private Declare Function icePub_sendMailText Lib "icePubDll.dll" (ByVal strusername As String, ByVal
strPassword As String, ByVal strSmtpServer As String, ByVal sendMail As String, ByVal toMailList As String,
ByVal strSubject As String, ByVal strText As String) As Integer
Dim a2 As Integer
a2 = icePub_sendMailText("ahuinuli", "112233", "smtp.tom.com", "ahuinuli@tom.com", "tomail@sina.com", "
标题:没事。", "文本:含悲谈笑,笑说人世间。")
不支持gmail 之类,否则得用openssl,太拖家带口„
194
----------------------- Page 195-----------------------
3.92 icePub_sendMail
函数原型:
int WINAPI icePub_sendMail(char *strUsername,char *strPassword,char *strSmtpServer,char
*sendMail,char *toMailList,char *strSubject,char *strText,char *strAttachmentsList)
输入:strUsername smtp 用户名
strPassword 用户密码
strSmtpServer smtp 服务器
sendMail 发件人邮箱地址
toMailList 收件人邮箱地址,多个以分号分隔
strSubject 标题
strText 文本内容
strAttachmentsList 附件文件名列表,以分号分隔多个附件
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_sendMail(char *strUsername,char *strPassword,char *strSmtpServer,char
*sendMail,char *toMailList,char *strSubject,char *strText,char *strAttachmentsList);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_SENDMAIL)(char *strUsername,char *strPassword,char
*strSmtpServer,char *sendMail,char *toMailList,char *strSubject,char *strText,char *strAttachmentsList);
ICEPUB_SENDMAIL *icePub_sendMail = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_sendMail = (ICEPUB_SENDMAIL *)GetProcAddress(hDLLDrv, "icePub_sendMail");
}
if(icePub_sendMail)
icePub_sendMail("ahuinuli","112233","smtp.tom.com","ahuinuli@tom.com","mike@sina.com"," 标题:
ice601e","文本:data error 。","D:\\sys.tmp.rar");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
195
----------------------- Page 196-----------------------
VB sample 代码:
Private Declare Function icePub_sendMail Lib "icePubDll.dll" (ByVal strusername As String, ByVal
strPassword As String, ByVal strSmtpServer As String, ByVal sendMail As String, ByVal toMailList As String,
ByVal strSubject As String, ByVal strText As String, ByVal strAttachmentsList As String) As Integer
Dim a2 As Integer
a2 = icePub_sendMail("ahuinuli", "112233", "smtp.tom.com", "ahuinuli@tom.com", "tomail@sina .com", "标
题:ice601e", "文本:try 。","D:\ice601e.rar")
不支持gmail 之类,否则得用openssl,太拖家带口„
196
----------------------- Page 197-----------------------
3.93 icePub_speedMailText
函数原型:
int WINAPI icePub_speedMailText(char *strMyname,char *sendMail,char *toMailList,char
*strSubject,char *strText)
输入:strMyname 我的标识名;为空则自动取操作系统机器名
sendMail 发件人邮箱地址
toMailList 收件人邮箱地址
strSubject 标题
strText 文本内容
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_speedMailText(char *strMyname,char *sendMail,char *toMailList,char
*strSubject,char *strText);
动态调用例程
VC sample 代码:
int retCode;
typedef int (WINAPI ICEPUB_SPEEDMAILTEXT)(char *strMyname,char *sendMail,char
*toMailList,char *strSubject,char *strText);
ICEPUB_SPEEDMAILTEXT *icePub_speedMailText = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_speedMailText = (ICEPUB_SPEEDMAILTEXT *)GetProcAddress(hDLLDrv,
"icePub_speedMailText");
}
if(icePub_speedMailText)
{
retCode = icePub_speedMailText("","admin@a.com","tomail@gmail.com","来自speedmail 的测
试邮件", "皓月流空,空留皎洁一片纯情。银燕掠波,波漾素静万缕哀愁。月光照水,水映玉盘冉然水
无痕。燕羽描天,天托银翼扶摇天隐踪。\r\n\r\n—水中月夜飞燕图");
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
197
----------------------- Page 198-----------------------
VB sample 代码:
Private Declare Function icePub_speedMailText Lib "icePubDll.dll" (ByVal strMyname As String, ByVal
sendMail As String, ByVal toMailList As String, ByVal strSubject As String, ByVal strText As String) As
Integer
Dim a2 As Integer
Dim str1 As String
a2 = icePub_speedMailText("","admin@a.com","tomail@gmail.com","来自speedmail 的测试邮件","海天一
色,夜萧萧,不问世间心愿。梦里兰花缘自草,怎见青莲还翠!残月花折,惜怜孤燕,此寒谁人暖?虹
霓映伴,彩蝶花恋情迷。"+VbCrLf+VbCrLf +"祈望山水云空,朦胧幻影,渺渺淡如烟。月泣风愁尤细雨,
寂寞孤星无泪。雪落心头,寒凝血碧,千古风流怨。旧人无奈,红尘还看生灭。"+VbCrLf+VbCrLf+"—
念奴娇")
If a2 = 0 Then
MsgBox "发送成功"
Else
str1 = "发送失败[" + Str(a2) + "]"
MsgBox str1
End If
198
----------------------- Page 199-----------------------
3.94 icePub_speedMail
函数原型:
int WINAPI icePub_speedMail(char *strMyname,char *sendMail,char *toMailList,char
*strSubject,char *strText,char *strAttachmentsList)
输入:strMyname 我的标识名;为空则自动取操作系统机器名
sendMail 发件人邮箱地址
toMailList 收件人邮箱地址
strSubject 标题
strText 文本内容
strAttachmentsList 附件列表文件名,多个以分号分隔
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_speedMail(char *strMyname,char *sendMail,char *toMailList,char
*strSubject,char *strText,char *strAttachmentsList);
动态调用例程
VC sample 代码:
int retCode;
typedef int (WINAPI ICEPUB_SPEEDMAILTEXT)(char *strMyname,char *sendMail,char *toMailList,char
*strSubject,char *strText,char *strAttachmentsList);
ICEPUB_SPEEDMAILTEXT *icePub_speedMail = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_speedMail=(ICEPUB_SPEEDMAILTEXT *)GetProcAddress(hDLLDrv, "icePub_speedMail");
}
if(icePub_speedMail)
{
retCode = icePub_speedMail("","admin@a.com","tomail@gmail.com","来自speedmail 的测试邮件","
拆开多年的来信 倾听无限的幽怨 在天地之间 柔情荡漾\r\n 回梦已往的思念 挽住丝丝的留念 在你
我之间 弦音缠绵\r\n 走在熟悉的小路 追寻和谐的脚步 在前后之间 何去何从\r\n 伴随今生的孤独 带
走昼夜的凄凉 在日月之间 互诉衷肠\r\n 轻拂岁月的伤痕 陌生遥远的哭泣 在心头之间 过往云烟\r\n
承受恶魔的诅咒 烈日灼烧的仇恨 在风雨之间 怒焰翻云","D:\\武侠小说.rar");
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
199
----------------------- Page 200-----------------------
VB sample 代码:
Private Declare Function icePub_speedMail Lib "icePubDll.dll" (ByVal strMyname As String, ByVal sendMail
As String, ByVal toMailList As String, ByVal strSubject As String, ByVal strText As String, ByVal
strAttachmentsList As String) As Integer
Dim a2 As Integer
Dim str1 As String
a2 = icePub_speedMail("","admin@a.com","tomail@gmail.com","来自speedmail 的测试邮件","风中的你呀
就象那彩蝶我迷恋的花香"+VbCrLf+"我站在雨中 祈望着彩虹你亲吻的芬芳","D:\科幻小说.rar")
If a2 = 0 Then
MsgBox "发送成功"
Else
str1 = "发送失败[" + Str(a2) + "]"
MsgBox str1
End If
200
----------------------- Page 201-----------------------
3.95 icePub_fileHexToHexString
函数原型:
int WINAPI icePub_fileHexToHexString(char *strBinFilename,char *strHexStringFilename,int
flag)
输入:strBinFilename 待处理文件名
strHexStringFilename 生成hex 串文件名
flag 格式标志,0 无格式;>0每字节空格分隔,并且每处理flag 个数据就换行
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_fileHexToHexString(char *strBinFilename,char *strHexStringFilename,int
flag);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_FILEHEXTOHEXSTRING)( char *strBinFilename,char
*strHexStringFilename,int flag);
ICEPUB_FILEHEXTOHEXSTRING *icePub_fileHexToHexString = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_fileHexToHexString =(ICEPUB_FILEHEXTOHEXSTRING
*)GetProcAddress(hDLLDrv,"icePub_fileHexToHexString");
}
if(icePub_fileHexToHexString)
{
icePub_fileHexToHexString ("a.exe","a.txt",16);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
201
----------------------- Page 202-----------------------
VB sample 代码:
Private Declare Function icePub_fileHexToHexString Lib "icePubDll.dll" (ByVal strBinFilename As
String,ByVal strHexStringFilename As String,ByVal flag As Integer) As Integer
Dim a2 As Integer
a2=icePub_fileHexToHexString("a.exe","a.txt",16)
202
----------------------- Page 203-----------------------
3.96 icePub_resourceIDSaveToFile
函数原型:
int WINAPI icePub_resourceIDSaveToFile(unsigned int wInteger,char *strTypeName,char
*strFilename)
输入:wInteger 应用程序里的资源ID
strTypeName 资源类型
strFilename 下蛋的文件名
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_resourceIDSaveToFile(unsigned int wInteger,char *strTypeName,char
*strFilename);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_RESOURCEIDSAVETOFILE)(unsigned int wInteger,char *strTypeName,char
*strFilename);
ICEPUB_RESOURCEIDSAVETOFILE *icePub_resourceIDSaveToFile = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_resourceIDSaveToFile = (ICEPUB_RESOURCEIDSAVETOFILE *)GetProcAddress(hDLLDrv,
"icePub_resourceIDSaveToFile");
}
if(icePub_resourceIDSaveToFile != NULL)
{
int a;
a=icePub_resourceIDSaveToFile(IDB_BITMAP1,RT_BITMAP,"src.bmp");
//用vc 的标准资源保存的bmp 图,会少头14 个字节,所以建议用下边自定义的方式把图片等标准
资源加到vc 工程里
a=icePub_resourceIDSaveToFile(IDR_MYSRC2,"MYSRC","iceBase64.exe");
}
203
----------------------- Page 204-----------------------
VB sample 代码:
Private Declare Function icePub_resourceIDSaveToFile Lib "icePubDll.dll" (ByVal wInteger As
Integer,ByVal strTypeName As String,ByVal strFilename As String) As Integer
Dim a2 As Integer
a2=icePub_resourceIDSaveToFile(101,"CUSTOM","my.exe")
204
----------------------- Page 205-----------------------
3.97 icePub_openUrl
函数原型:
int WINAPI icePub_openUrl(char *currentUrlString,char *strHtmlText,int textMaxLen,char
*strProxy)
输入:currentUrlString http 地址
textMaxLen strHtmlText 的最大长度
strProxy 代理服务器地址
输出:strHtmlText 返回的页面代码
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_openUrl(char *currentUrlString,char *strHtmlText,int textMaxLen,char
*strProxy);
动态调用例程
VC sample 代码:
char buff[1024*20+1];
typedef int (WINAPI ICEPUB_OPENURL)(char *currentUrlString,char *strHtmlText,int textMaxLen,char
*strProxy);
ICEPUB_OPENURL *icePub_openUrl = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_openUrl =(ICEPUB_OPENURL *)GetProcAddress(hDLLDrv,"icePub_openUrl");
}
if(icePub_openUrl)
{
icePub_openUrl("http://www.baidu.com",buff,1024*20,"");
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff);
205
----------------------- Page 206-----------------------
VB sample 代码:
Private Declare Function icePub_openUrl Lib "icePubDll.dll" (ByVal currentUrlString As String, ByVal
strHtmlText As String, ByVal TextMaxLen As Integer, ByVal strProxy As String) As Integer
Dim str1 As String
Dim a2 As Integer
str1 = Space(1024 * 20 + 1)
a2=icePub_openUrl("http://www.baidu.com",str1,1024*20,"")
206
----------------------- Page 207-----------------------
3.98 icePub_openUrl2
自动utf8 页面解码
函数原型:
int WINAPI icePub_openUrl2(char *currentUrlString,char *strHtmlText,int textMaxLen,char
*strProxy)
输入:currentUrlString http 地址
textMaxLen strHtmlText 的最大长度
strProxy 代理服务器地址
输出:strHtmlText 返回的页面代码
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_openUrl2(char *currentUrlString,char *strHtmlText,int textMaxLen,char
*strProxy);
动态调用例程
VC sample 代码:
char buff[1024*20+1];
typedef int (WINAPI ICEPUB_OPENURL2)(char *currentUrlString,char *strHtmlText,int textMaxLen,char
*strProxy);
ICEPUB_OPENURL2 *icePub_openUrl2 = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_openUrl2 =(ICEPUB_OPENURL2 *)GetProcAddress(hDLLDrv,"icePub_openUrl2");
}
if(icePub_openUrl2)
{
icePub_openUrl2("http://www.baidu.com",buff,1024*20,"");
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff);
207
----------------------- Page 208-----------------------
VB sample 代码:
Private Declare Function icePub_openUrl2 Lib "icePubDll.dll" (ByVal currentUrlString As String, ByVal
strHtmlText As String, ByVal TextMaxLen As Integer) As Integer
Dim str1 As String
Dim a2 As Integer
str1 = Space(1024 * 20 + 1)
a2=icePub_openUrl2("http://www.baidu.com", str1,1024*20,"")
208
----------------------- Page 209-----------------------
3.99 icePub_getUrl
函数原型:
int WINAPI icePub_getUrl(char *hostAddress,char *strObject,char *m_param,char
*Referer,char *strHtmlText,int textMaxLen,char *strProxy)
输入:hostAddress domain 地址
strObject 访问路径对象
param 参数
Referer 链接来源URL
textMaxLen strHtmlText 的最大长度
strProxy 代理服务器地址
输出:strHtmlText 返回的页面代码
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_getUrl(char *hostAddress,char *strObject,char *m_param,char
*Referer,char *strHtmlText,int textMaxLen,char *strProxy);
动态调用例程
VC sample 代码:
char buffer[1024*20+1];
typedef int (WINAPI ICEPUB_GETURL)(char *hostAddress,char *strObject,char *m_param,char
*Referer,char *strHtmlText,int textMaxLen,char *strProxy);
ICEPUB_GETURL *icePub_getUrl = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getUrl = (ICEPUB_GETURL *)GetProcAddress(hDLLDrv, "icePub_getUrl");
}
if(icePub_getUrl)
icePub_getUrl("www.baidu.com","/","","",buffer,1024*20,"");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buffer);
209
----------------------- Page 210-----------------------
VB sample 代码:
Private Declare Function icePub_openUrl Lib "icePubDll.dll" (ByVal currentUrlString As String, ByVal
strHtmlText As String, ByVal TextMaxLen As Integer, ByVal strProxy As String) As Integer
Dim str1 As String
Dim a2 As Integer
str1 = Space(1024 * 20 + 1)
a2 = icePub_openUrl("http://reg.qq.com", str1, 1024 * 20, "")
MsgBox str1
210
----------------------- Page 211-----------------------
3.100icePub_getUrl2
自动utf8 页面解码
函数原型:
int WINAPI icePub_getUrl2(char *hostAddress,char *strObject,char *m_param,char
*Referer,char *strHtmlText,int textMaxLen,char *strProxy)
输入:hostAddress domain 地址
strObject 访问路径对象
param 参数
Referer 链接来源URL
textMaxLen strHtmlText 的最大长度
strProxy 代理服务器地址
输出:strHtmlText 返回的页面代码
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_getUrl2(char *hostAddress,char *strObject,char *m_param,char
*Referer,char *strHtmlText,int textMaxLen,char *strProxy);
动态调用例程
VC sample 代码:
char buffer[1024*20+1];
typedef int (WINAPI ICEPUB_GETURL2)(char *hostAddress,char *strObject,char *m_param,char
*Referer,char *strHtmlText,int textMaxLen,char *strProxy);
ICEPUB_GETURL2 *icePub_getUrl2 = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getUrl = (ICEPUB_GETURL2 *)GetProcAddress(hDLLDrv, "icePub_getUrl2");
}
if(icePub_getUrl2)
icePub_getUrl2("www.baidu.com","/","","",buffer,1024*20,"");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buffer);
211
----------------------- Page 212-----------------------
VB sample 代码:
Private Declare Function icePub_openUrl2 Lib "icePubDll.dll" (ByVal currentUrlString As String, ByVal
strHtmlText As String, ByVal TextMaxLen As Integer, ByVal strProxy As String) As Integer
Dim str1 As String
Dim a2 As Integer
str1 = Space(1024 * 20 + 1)
a2 = icePub_openUrl2("http://reg.qq.com", str1, 1024 * 20, "")
MsgBox str1
212
----------------------- Page 213-----------------------
3.101icePub_postUrl
函数原型:
int WINAPI icePub_postUrl(char *hostAddress,char *strObject,char *m_param,char
*Referer,char *strHtmlText,int textMaxLen,char *strProxy)
输入:hostAddress domain 地址
strObject 访问路径对象
param 参数
Referer 链接来源URL
textMaxLen strHtmlText 的最大长度
strProxy 代理服务器地址
输出:strHtmlText 返回的页面代码
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_postUrl(char *hostAddress,char *strObject,char *m_param,char
*Referer,char *strHtmlText,int textMaxLen,char *strProxy);
动态调用例程
VC sample 代码:
char buffer[1024*20+1];
typedef int (WINAPI ICEPUB_POSTURL)(char *hostAddress,char *strObject,char *m_param,char
*Referer,char *strHtmlText,int textMaxLen,char *strProxy);
ICEPUB_POSTURL *icePub_postUrl = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_postUrl = (ICEPUB_POSTURL *)GetProcAddress(hDLLDrv, "icePub_postUrl");
}
if(icePub_postUrl)
icePub_postUrl("www.smileytraffic.com", "/login.php",
"action=login&loginid=yueguang&pwdid=123456&surflink=&submit=+Login+Now+",
"http://www.smileytraffic.com/login.php", buffer, 1024 * 20, "");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buffer);
213
----------------------- Page 214-----------------------
VB sample 代码:
Private Declare Function icePub_postUrl Lib "icePubDll.dll" (ByVal hostAddress As String, ByVal strObject
As String, ByVal m_param As String, ByVal Referer As String, ByVal strHtmlText As String, ByVal
textMaxLen As Integer, ByVal strProxy As String) As Integer
Dim a As Integer
Dim myHtml As String
Dim myPostData As String
Dim myUserName As String
Dim myPassWord As String
myHtml = Space(1024 * 10)
myUserName = "yueguang"
myPassWord = "123456"
'构建登录参数,这个可以从网站的登录页面上获得
myPostData = "action=login&loginid=" & myUserName & "&pwdid=" & myPassWord &
"&surflink=&submit=+Login+Now+"
'进行登录
a = icePub_postUrl("www.smileytraffic.com", "/login.php", myPostData,
"http://www.smileytraffic.com/login.php", myHtml, 1024 * 10, "")
MsgBox myHtm
'在此写相关代码进行判断是否登录成功
214
----------------------- Page 215-----------------------
3.102icePub_postUrl2
自动utf8 页面解码
函数原型:
int WINAPI icePub_postUrl2(char *hostAddress,char *strObject,char *m_param,char
*Referer,char *strHtmlText,int textMaxLen,char *strProxy)
输入:hostAddress domain 地址
strObject 访问路径对象
param 参数
Referer 链接来源URL
textMaxLen strHtmlText 的最大长度
strProxy 代理服务器地址
输出:strHtmlText 返回的页面代码
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_postUrl2(char *hostAddress,char *strObject,char *m_param,char
*Referer,char *strHtmlText,int textMaxLen,char *strProxy);
动态调用例程
VC sample 代码:
char buffer[1024*20+1];
typedef int (WINAPI ICEPUB_POSTURL2)(char *hostAddress,char *strObject,char *m_param,char
*Referer,char *strHtmlText,int textMaxLen,char *strProxy);
ICEPUB_POSTURL2 *icePub_postUrl2 = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_postUrl2 = (ICEPUB_POSTURL2 *)GetProcAddress(hDLLDrv, "icePub_postUrl2");
}
if(icePub_postUrl2)
icePub_postUrl2("www.smileytraffic.com","/login.php",
"action=login&loginid=yueguang&pwdid=123456&surflink=&submit=+Login+Now+",
"http://www.smileytraffic.com/login.php", buffer, 1024 * 20, "");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buffer);
215
----------------------- Page 216-----------------------
VB sample 代码:
Private Declare Function icePub_postUrl2 Lib "icePubDll.dll" (ByVal hostAddress As String, ByVal
strObject As String, ByVal m_param As String, ByVal Referer As String, ByVal strHtmlText As String, ByVal
textMaxLen As Integer, ByVal strProxy As String) As Integer
Dim a As Integer
Dim myHtml As String
Dim myPostData As String
Dim myUserName As String
Dim myPassWord As String
myHtml = Space(1024 * 10)
myUserName = "yueguang"
myPassWord = "123456"
'构建登录参数,这个可以从网站的登录页面上获得
myPostData = "action=login&loginid=" & myUserName & "&pwdid=" & myPassWord &
"&surflink=&submit=+Login+Now+"
'进行登录
a = icePub_postUrl2("www.smileytraffic.com", "/login.php", myPostData,
"http://www.smileytraffic.com/login.php", myHtml, 1024 * 10, "")
MsgBox myHtm
'在此写相关代码进行判断是否登录成功
216
----------------------- Page 217-----------------------
3.103icePub_downLoadUrl
函数原型:
int WINAPI icePub_downLoadUrl (char *strUrl,char *strFilename,char *strProxy)
输入:strUrl http 下载地址
strFilename 保存的文件名
strProxy 代理服务器地址
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_downLoadUrl (char *strUrl,char *strFilename,char *strProxy);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICE_DOWNLOADURL)(char *strUrl,char *strFilename,char *strProxy);
ICE_DOWNLOADURL *ice_downLoadUrl = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
ice_downLoadUrl = (ICE_DOWNLOADURL *)GetProcAddress(hDLLDrv, "ice_downLoadUrl");
}
if(ice_downLoadUrl)
ice_downLoadUrl("http://icese.net/icetool/other/sample.rar ","sample.rar","");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
217
----------------------- Page 218-----------------------
VB sample 代码:
Private Declare Function icePub_downLoadUrl Lib "icePubDll.dll" (ByVal strUrl As String,ByVal
strFilename As String,ByVal strProxy As String) As Integer
Dim a2 As Integer
a2=icePub_downLoadUrl("http://icese.net/icetool/other/sample.rar","sample.rar","")
218
----------------------- Page 219-----------------------
3.104icePub_downLoad
函数原型:
int WINAPI icePub_downLoad(char *hostAddress,char *strObject,char *m_param,char
*Referer,char *strFilename,char *strProxy)
输入:hostAddress domain 地址
strObject 访问路径对象
param 参数
Referer 链接来源URL
strFilename 保存的文件名
strProxy 代理服务器地址
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_downLoad(char *hostAddress,char *strObject,char *m_param,char
*Referer,char *strFilename,char *strProxy);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICE_DOWNLOADURL)( char *hostAddress,char *strObject,char *m_param,char
*Referer,char *strFilename,char *strProxy);
ICE_DOWNLOADURL *ice_downLoadUrl = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
ice_downLoad = (ICE_DOWNLOADURL *)GetProcAddress(hDLLDrv, "ice_downLoad");
}
if(icePub_downLoad)
icePub_downLoad ("icese.net", "/icetool/other/sample.rar","", "","sample.rar","");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
219
----------------------- Page 220-----------------------
VB sample 代码:
Private Declare Function icePub_downLoad Lib "icePubDll.dll" (ByVal hostAddress As String,ByVal
strObject As String,ByVal m_param As String,ByVal Referer As String,ByVal strFilename As String,ByVal
strProxy As String) As Integer
Dim a2 As Integer
a2= icePub_downLoad ("icese.net","/icetool/other/sample.rar","","","sample.rar","")
220
----------------------- Page 221-----------------------
3.105icePub_downloadFromFile
函数原型:
int WINAPI icePub_downloadFromFile(char *strUrlListFilename,char *strSavePath,char
*strProxy)
输入:strUrlListFilename http 下载地址列表文件
strSavePath 保存的文件路径
strProxy 代理服务器地址
输出:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_downloadFromFile(char *strUrlListFilename,char *strSavePath,char
*strProxy);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_DOWNLOADFROMFILE)(char *strUrlListFilename,char
*strSavePath,char *strProxy);
ICEPUB_DOWNLOADFROMFILE *icePub_downloadFromFile = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_downloadFromFile = (ICEPUB_DOWNLOADFROMFILE *)GetProcAddress(hDLLDrv,
"icePub_downloadFromFile");
}
if(icePub_downloadFromFile != NULL)
{
int a;
a=icePub_downloadFromFile("C:\\a.txt","image\\","");
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
221
----------------------- Page 222-----------------------
VB sample 代码:
Private Declare Function icePub_downloadFromFile Lib "icePubDll.dll" (ByVal strUrlListFilename As
String, ByVal strSavePath As String, ByVal strProxy As String) As Integer
Dim a2 As Integer
a2 = icePub_downloadFromFile("e:\a.txt", "e:\", "")
222
----------------------- Page 223-----------------------
3.106icePub_stringDeleteChar
函数原型:
int WINAPI icePub_stringDeleteChar(char* strBuffer,char c)
输入:strBuffer 待处理串
c 待删除字符
输出:strBuffer 结果处理串
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_stringDeleteChar(char* strBuffer,char c);
动态调用例程
VC sample 代码:
char buff[1024];
strcpy(buff,"111abcdeaaaflook");
typedef int (WINAPI ICEPUB_STRINGDELETECHAR)( char* strBuffer,char c);
ICEPUB_STRINGDELETECHAR *icePub_stringDeleteChar = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_stringDeleteChar = (ICEPUB_STRINGDELETECHAR *)GetProcAddress(hDLLDrv,
"icePub_stringDeleteChar");
}
if(icePub_stringDeleteChar)
{
icePub_stringDeleteChar(buff,'a');
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff);
用CString 的Replace 更省事
223
----------------------- Page 224-----------------------
VB sample 代码:
Private Declare Function icePub_stringDeleteChar Lib "icePubDll.dll" (ByVal strBuffer As String, ByVal c
As byte) As Integer
Dim a2 As Integer
Dim str1 As String
str1="111abcdeaaaflook"
a2= icePub_stringDeleteChar(str1, 'a')
MsgBox str1
224
----------------------- Page 225-----------------------
3.107icePub_stringDeleteSubstring
函数原型:
int WINAPI icePub_stringDeleteSubstring(char* strBuffer,char *strSubstring)
输入:strBuffer 待处理串
strSubstring 待删除子字符串
输出:strBuffer 结果处理串
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_stringDeleteSubstring(char* strBuffer,char *strSubstring);
动态调用例程
VC sample 代码:
char buff[1024];
strcpy(buff," 111abcdeaaafablookababdd ");
typedef int (WINAPI ICEPUB_STRINGDELETESUBSTRING)( char* strBuffer,char *strSubstring);
ICEPUB_STRINGDELETESUBSTRING *icePub_stringDeleteChar = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_stringDeleteSubstring = (ICEPUB_STRINGDELETESUBSTRING
*)GetProcAddress(hDLLDrv, " icePub_stringDeleteSubstring");
}
if(icePub_stringDeleteSubstring)
{
icePub_stringDeleteSubstring(buff, "ab");
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff);
用CString 的Replace 更省事
225
----------------------- Page 226-----------------------
VB sample 代码:
Private Declare Function icePub_stringDeleteSubstring Lib "icePubDll.dll" (ByVal strBuffer As String,
ByVal strSubstring As String) As Integer
Dim a2 As Integer
Dim str1 As String
str1=" 111abcdeaaafablookababdd "
a2= icePub_stringDeleteSubstring(str1, "ab")
MsgBox str1
226
----------------------- Page 227-----------------------
3.108icePub_countSubString
函数原型:
int WINAPI icePub_countSubString(char *strInfo,char *strSubString)
输入:strInfo 待处理串
strSubString 待统计子字符串
输出:
返回码: 统计个数
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_countSubString(char *strInfo,char *strSubString);
动态调用例程
VC sample 代码:
char buff[1024];
int counts;
strcpy(buff,"111abcdeaaafablookababdd");
typedef int (WINAPI ICEPUB_COUNTSUBSTRING)(char *strFormTitle,int keyValue,int extendFlag);
ICEPUB_COUNTSUBSTRING *icePub_countSubString = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_countSubString = (ICEPUB_COUNTSUBSTRING *)GetProcAddress(hDLLDrv,
"icePub_countSubString");
}
if(icePub_countSubString)
{
counts = icePub_countSubString(buff,"ab");
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
printf("counts=%d",counts);
227
----------------------- Page 228-----------------------
VB sample 代码:
Private Declare Function icePub_countSubString Lib "icePubDll.dll" (ByVal strInfo As String, ByVal
strSubString As String) As Integer
Dim counts As Integer
Dim buff As String
buff="111abcdeaaafablookababdd"
counts = icePub_countSubString(buff,"ab")
228
----------------------- Page 229-----------------------
3.109icePub_countSubStringFromFile
函数原型:
int WINAPI icePub_countSubStringFromFile(char *strFilename,char *strSubString)
输入:strFilename 待处理文件名
strSubString 待统计子字符串
输出:
返回码: 统计个数
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_countSubStringFromFile(char *strFilename,char *strSubString);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_COUNTSUBSTRINGFROMFILE)(char *strFilename,char *strSubString);
ICEPUB_COUNTSUBSTRINGFROMFILE *icePub_countSubStringFromFile = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_countSubStringFromFile = (ICEPUB_COUNTSUBSTRINGFROMFILE
*)GetProcAddress(hDLLDrv, "icePub_countSubStringFromFile");
}
if(icePub_countSubStringFromFile)
{
counts = icePub_countSubStringFromFile("myfile.txt","ab");
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
printf("counts=%d",counts);
229
----------------------- Page 230-----------------------
VB sample 代码:
Private Declare Function icePub_countSubStringFromFile Lib "icePubDll.dll" (ByVal strFilename As String,
ByVal strSubString As String) As Integer
Dim counts As Integer
counts = icePub_countSubStringFromFile ("myfile.txt","ab")
230
----------------------- Page 231-----------------------
3.110icePub_getSubString
函数原型:
int WINAPI icePub_getSubString(char *strText,char *strResult,char *strBegin,char
*strEnd,int startIndex)
输入:strText 待处理字符串
strBegin 子字符串起始标志串
strEnd 子字符串结束标志串
startIndex 起始位置
输出:strResult 结果子串
返回码: 满足条件的子串位置
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_getSubString(char *strText,char *strResult,char *strBegin,char
*strEnd,int startIndex);
动态调用例程
VC sample 代码:
int retCode=- 1;
char buff[1024*10];
typedef int (WINAPI ICEPUB_GETSUBSTRING)(char *strText,char *strResult,char *strBegin,char
*strEnd,int startIndex);
ICEPUB_GETSUBSTRING *icePub_getSubString = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
icePub_getSubString=(ICEPUB_GETSUBSTRING *)GetProcAddress(hDLLDrv,"icePub_getSubString");
if(icePub_getSubString)
{
retCode = icePub_getSubString("<body>\r\n<p>welcome~\r\n</body>",buff,"<body>","</body>",0);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff);
231
----------------------- Page 232-----------------------
VB sample 代码:
Private Declare Function icePub_getSubString Lib "icePubDll.dll" (ByVal strText As String,ByVal strResult
As String,ByVal strBegin As String,ByVal strEnd As String,ByVal startIndex As Integer) As Integer
Dim a2 As Integer
Dim strText As String
Dim strSubText As String
strText="<body>"+vbCrLf +"<p>welcome~"+vbCrLf +"</body>"
strSubText=Space(1024+1)
a2=icePub_getSubString(strText,strSubText,"<body>","</body>",0)
MsgBox strSubText
232
----------------------- Page 233-----------------------
3.111icePub_getSubStringFromfile
函数原型:
int WINAPI icePub_getSubStringFromfile(char *strFilename,char *strResult,char
*strBegin,char *strEnd)
输入:strFilename 待处理文件名
strBegin 子字符串起始标志串
strEnd 子字符串结束标志串
输出:strResult 结果子串
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_getSubStringFromfile(char *strFilename,char *strResult,char
*strBegin,char *strEnd);
动态调用例程
VC sample 代码:
int retCode=- 1;
char buff[1024*10];
typedef int (WINAPI ICEPUB_GETSUBSTRINGFROMFILE)(char *strFilename,char *strResult,char
*strBegin,char *strEnd);
ICEPUB_GETSUBSTRINGFROMFILE *icePub_getSubStringFromfile = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getSubStringFromfile = (ICEPUB_GETSUBSTRINGFROMFILE *)GetProcAddress(hDLLDrv,
"icePub_getSubStringFromfile");
}
if(icePub_getSubStringFromfile)
{
retCode = icePub_getSubStringFromfile("e:\a.htm",buff,"<body>","</body>");
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff);
233
----------------------- Page 234-----------------------
VB sample 代码:
Private Declare Function icePub_getSubStringFromfile Lib "icePubDll.dll" (ByVal strFilename As String,
ByVal strResult As String, ByVal strBegin As String, ByVal strEnd As String) As Integer
Dim a2 As Integer
Dim str1 As String
str1=space(1024*10)
a2 = icePub_getSubStringFromfile("e:\a.htm",str1,"<body>","</body>")
MsgBox str1
234
----------------------- Page 235-----------------------
3.112icePub_getFormatString
函数原型:
int WINAPI icePub_getFormatString(char *sourceStr,int index,char *strFenge,char
*strSubResult)
输入:sourceStr 待处理字符串文本
index 从第几个分隔串取子串(从0 开始有效)
strFenge 分隔字符串
输出:strSubResult 结果子字符串
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_getFormatString(char *sourceStr,int index,char *strFenge,char
*strSubResult);
动态调用例程
VC sample 代码:
char strResult[128];
char strText[1024];
strcpy(strText,"(char *sourceStr,int index,char *strFenge,char *strSubResult)");
typedef int (WINAPI ICEPUB_GETFORMATSTRING)( char *sourceStr,int index,char *strFenge,char
*strSubResult);
ICEPUB_GETFORMATSTRING *icePub_getFormatString = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getFormatString = (ICEPUB_GETFORMATSTRING *)GetProcAddress(hDLLDrv,
"icePub_getFormatString");
}
if(icePub_getFormatString)
{
retCode = icePub_getFormatString(strText,1,",",strResult);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(strResult);
235
----------------------- Page 236-----------------------
VB sample 代码:
Private Declare Function icePub_getFormatString Lib "icePubDll.dll" (ByVal sourceStr As String,ByVal
index As Integer,ByVal strFenge As String, ByVal strSubResult As String) As Integer
Dim a2 As Integer
Dim strResult As String
strResult=Space(1024)
strText="(char *sourceStr,int number,char *strFenge,char *strSubResult)"
a2 = icePub_getFormatString(strText,1,",",strResult)
MsgBox strResult
236
----------------------- Page 237-----------------------
3.113icePub_getHrefLinks
函数原型:
int WINAPI icePub_getHrefLinks(char *strText,char *strLinkList,char *strTextList,char
*strFenge)
输入:strText 待处理文本串
strFenge 分隔字符串
输出:strLinkList 所有连接
strTextList 所有连接对应文字
返回码: 统计个数
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_getHrefLinks(char *strText,char *strLinkList,char *strTextList,char
*strFenge);
动态调用例程
VC sample 代码:
char strHtmlText[1024*10];
char strLinks[1024*10];
char strTexts[1024*10];
int counts;
typedef int (WINAPI ICEPUB_GETHREFLINKS)(char *strText,char *strLinkList,char
*strTextList,char *strFenge);
ICEPUB_GETHREFLINKS *icePub_getHrefLinks = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getHrefLinks = (ICEPUB_GETHREFLINKS *)GetProcAddress(hDLLDrv,
"icePub_getHrefLinks");
}
if(icePub_getHrefLinks)
{
counts = icePub_getHrefLinks(strHtmlText,strLinks,strTexts,"\r\n");
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(strLinks);
AfxMessageBox(strTexts);
237
----------------------- Page 238-----------------------
VB sample 代码:
Private Declare Function icePub_openUrl Lib "icePubDll.dll" (ByVal currentUrlString As String, ByVal
strHtmlText As String, ByVal TextMaxLen As Integer, ByVal strProxy As String) As Integer
Private Declare Function icePub_getHrefLinks Lib "icePubDll.dll" (ByVal strText As String, ByVal
strLinkList As String, ByVal strTextList As String, ByVal strFenge As String) As Integer
str1 = Space(1024 * 30)
a2 = icePub_openUrl("http://www.baidu.com", str1, 1024 * 30, "")
MsgBox str1
str2 = Space(1024 * 30)
str3 = Space(1024 * 30)
a2 = icePub_getHrefLinks(str1, str2, str3, "")
MsgBox str2
MsgBox str3
238
----------------------- Page 239-----------------------
3.114icePub_randomStrings
函数原型:
int WINAPI icePub_randomStrings(char *strIntergerBuff,int fromValue,int toValue,int
num,char *fenge)
输入:fromValue 最小值
toValue 最大值
num 生成个数
fenge 分隔字符串
输出:strIntergerBuff num 个随机数
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_randomStrings(char *strIntergerBuff,int fromValue,int toValue,int
num,char *fenge);
动态调用例程
VC sample 代码:
char buffer[1024*10];
buffer[0]=0;
typedef int (WINAPI ICEPUB_RANDOMSTRINGS)(char *strIntergerBuff,int fromValue,int
toValue,int num,char *fenge);
ICEPUB_RANDOMSTRINGS *icePub_randomStrings = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_randomStrings = (ICEPUB_RANDOMSTRINGS *)GetProcAddress(hDLLDrv,
"icePub_randomStrings");
}
if(icePub_randomStrings != NULL)
{
int a;
a=icePub_randomStrings(buffer,0,24,1500,"\r\n");
}
AfxMessageBox(buffer);
239
----------------------- Page 240-----------------------
VB sample 代码:
Private Declare Function icePub_randomStrings Lib "icePubDll.dll" (ByVal strIntergerBuff As String, ByVal
fromValue As Integer, ByVal toValue As Integer, ByVal num As Integer, ByVal strFenge As String) As
Integer
str1 = Space(1024 * 30)
a=icePub_randomStrings(str1,0,24,1500,vbCrLf)
MsgBox str1
240
----------------------- Page 241-----------------------
3.115icePub_randomStringsToFile
函数原型:
int WINAPI icePub_randomStringsToFile(char *strFilename,int fromValue,int toValue,int
num,char *fenge)
输入:strFilename 结果文件名
fromValue 最小值
toValue 最大值
num 生成个数
fenge 分隔字符串
输出:
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_randomStringsToFile(char *strFilename,int fromValue,int toValue,int
num,char *fenge);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_RANDOMSTRINGSTOFILE)(char *strIntergerBuff,int fromValue,int
toValue,int num,char *fenge);
ICEPUB_RANDOMSTRINGSTOFILE *icePub_randomStringsToFile = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_randomStringsToFile = (ICEPUB_RANDOMSTRINGSTOFILE
*)GetProcAddress(hDLLDrv, "icePub_randomStringsToFile");
}
if(icePub_randomStringsToFile != NULL)
{
int a;
a=icePub_randomStringsToFile("1.txt",0,25,150000,"\r\n");
a=icePub_randomStringsToFile("2.txt",0,25,150000," ");
}
241
----------------------- Page 242-----------------------
VB sample 代码:
Private Declare Function icePub_randomStringsToFile Lib "icePubDll.dll" (ByVal strFilename As String,
ByVal fromValue As Integer, ByVal toValue As Integer, ByVal num As Integer, ByVal strFenge As String) As
Integer
a=icePub_randomStrings(("1.txt",0,24,1500,vbCrLf)
a=icePub_randomStrings(("2.txt",0,24,1500, " ")
242
----------------------- Page 243-----------------------
3.116icePub_randomIntegerString
函数原型:
int WINAPI icePub_randomIntegerString(char *strIntergerBuff,int intLen,int flag)
输入:intLen 10 进制位数
flag 最高位非0 标志:0,允许为0;1,不允许为0
输出:strIntergerBuff 10 进制结果字符串
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_randomStringsToFile(char *strFilename,int fromValue,int toValue,int
num,char *fenge);
动态调用例程
VC sample 代码:
char strRandString[1024];
typedef int (WINAPI ICEPUB_RANDMINTEGERSTRING)(char *strIntergerBuff,int intLen,int flag);
ICEPUB_RANDMINTEGERSTRING *icePub_randomIntegerString = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_randomIntegerString = (ICEPUB_RANDMINTEGERSTRING *)GetProcAddress(hDLLDrv,
"icePub_randomIntegerString");
}
if(icePub_randomIntegerString)
{
icePub_randomIntegerString(strRandString,8,1);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(strRandString);
243
----------------------- Page 244-----------------------
VB sample 代码:
Private Declare Function icePub_randomIntegerString Lib "icePubDll.dll" (ByVal strIntergerBuff As String,
ByVal intLen As Integer, ByVal flag As Integer) As Integer
strRandString = Space(1024 )
a2=icePub_randomIntegerString(strRandString,33,1)
MsgBox strRandString
244
----------------------- Page 245-----------------------
3.117icePub_randomHexString
函数原型:
int WINAPI icePub_randomHexString(char *strHexBuff,int intLen,int flag)
输入:intLen 16 进制位数
flag 最高位非0 标志:0,允许为0;1,不允许为0
输出:strIntergerBuff 16 进制结果字符串
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_randomHexString(char *strHexBuff,int intLen,int flag);
动态调用例程
VC sample 代码:
char strRandString[1024];
typedef int (WINAPI ICEPUB_RANDMHEXSTRING)(char *strHexBuff,int intLen,int flag);
ICEPUB_RANDMHEXSTRING *icePub_randomHexString = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_randomHexString = (ICEPUB_RANDMHEXSTRING *)GetProcAddress(hDLLDrv,
"icePub_randomHexString");
}
if(icePub_randomHexString)
{
icePub_randomHexString(strRandString,17,1);
}
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(strRandString);
245
----------------------- Page 246-----------------------
VB sample 代码:
Private Declare Function icePub_randomHexString Lib "icePubDll.dll" (ByVal strHexBuff As String, ByVal
intLen As Integer, ByVal flag As Integer) As Integer
strRandString = Space(1024)
a2= icePub_randomHexString (strRandString,9,1)
MsgBox strRandString
246
----------------------- Page 247-----------------------
3.118icePub_bigIntegerAddition
函数原型:
int WINAPI icePub_bigIntegerAddition(char *str1,char *str2,char *strResult)
输入:str1 加数
str2 被加数
输出:strResult 加法运算结果
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_bigIntegerAddition(char *str1,char *str2,char *strResult);
动态调用例程
VC sample 代码:
char strResult[1024];
typedef int (WINAPI ICEPUB_BIGINTEGERADDITION)(char *str1,char *str2,char *strResult);
ICEPUB_BIGINTEGERADDITION *icePub_bigIntegerAddition = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_bigIntegerAddition = (ICEPUB_BIGINTEGERADDITION *)GetProcAddress(hDLLDrv,
"icePub_bigIntegerAddition");
}
if(icePub_bigIntegerAddition != NULL)
{
icePub_bigIntegerAddition("11111111111111111111111","22222222222222222222",strResult);
}
AfxMessageBox(strResult);
247
----------------------- Page 248-----------------------
VB sample 代码:
Private Declare Function icePub_bigIntegerAddition Lib "icePubDll.dll" (ByVal str1 As String, ByVal str2
As String, ByVal strResult As String) As Integer
Dim strResult As String
Dim a2 As Integer
strResult = Space(1024 * 30)
a2=icePub_bigIntegerAddition("11111111111111111111111","22222222222222222222",strResult)
MsgBox strResult
248
----------------------- Page 249-----------------------
3.119icePub_bigIntegerSubtraction
函数原型:
int WINAPI icePub_bigIntegerSubtraction(char *str1,char *str2,char *strResult)
输入:str1 减数
str2 被减数
输出:strResult 减法运算结果
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_bigIntegerSubtraction(char *str1,char *str2,char *strResult);
动态调用例程
VC sample 代码:
char strResult[1024];
typedef int (WINAPI ICEPUB_BIGINTEGERSUBTRACTION)(char *str1,char *str2,char *strResult);
ICEPUB_BIGINTEGERSUBTRACTION *icePub_bigIntegerSubtraction = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_bigIntegerSubtraction = (ICEPUB_BIGINTEGERSUBTRACTION *)GetProcAddress(hDLLDrv,
"icePub_bigIntegerSubtraction");
}
if(icePub_bigIntegerSubtraction != NULL)
{
icePub_bigIntegerSubtraction("11111111111111111111111","22222222222222222222",strResult);
}
AfxMessageBox(strResult);
249
----------------------- Page 250-----------------------
VB sample 代码:
Private Declare Function icePub_bigIntegerSubtraction Lib "icePubDll.dll" (ByVal str1 As String, ByVal str2
As String, ByVal strResult As String) As Integer
Dim strResult As String
Dim a2 As Integer
strResult = Space(1024 * 30)
a2=icePub_bigIntegerSubtraction("11111111111111111111111","22222222222222222222",strResult)
MsgBox strResult
250
----------------------- Page 251-----------------------
3.120icePub_bigIntegerMultiplication
函数原型:
int WINAPI icePub_bigIntegerMultiplication(char *str1,char *str2,char *strResult)
输入:str1 乘数
str2 被乘数
输出:strResult 乘法运算结果
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_bigIntegerMultiplication(char *str1,char *str2,char *strResult);
动态调用例程
VC sample 代码:
char strResult[1024];
typedef int (WINAPI ICEPUB_BIGINTEGERMULTIPLICATION)(char *str1,char *str2,char *strResult);
ICEPUB_BIGINTEGERMULTIPLICATION *icePub_bigIntegerMultiplication = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_bigIntegerMultiplication = (ICEPUB_BIGINTEGERMULTIPLICATION
*)GetProcAddress(hDLLDrv, "icePub_bigIntegerMultiplication");
}
if(icePub_bigIntegerMultiplication != NULL)
{
icePub_bigIntegerMultiplication("11111111111111111111111","22222222222222222222",strResult);
}
AfxMessageBox(strResult);
251
----------------------- Page 252-----------------------
VB sample 代码:
Private Declare Function icePub_bigIntegerMultiplication Lib "icePubDll.dll" (ByVal str1 As String, ByVal
str2 As String, ByVal strResult As String) As Integer
Dim strResult As String
Dim a2 As Integer
strResult = Space(1024 * 30)
a2=icePub_bigIntegerMultiplication("11111111111111111111111","22222222222222222222",strResult)
MsgBox strResult
252
----------------------- Page 253-----------------------
3.121icePub_bigIntegerDivision
函数原型:
int WINAPI icePub_bigIntegerDivision(char *str1,char *str2,char *strResult,char
*strRemainder)
输入:str1 除数
str2 被除数
输出:strResult 除法运算除数结果
strRemainder 除法运算余数结果
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_bigIntegerDivision(char *str1,char *str2,char *strResult,char
*strRemainder);
动态调用例程
VC sample 代码:
char strResult[1024];
char strRemainder[1024];
typedef int (WINAPI ICEPUB_BIGINTEGERDIVISION)(char *str1,char *str2,char *strResult,char
*strRemainder);
ICEPUB_BIGINTEGERDIVISION *icePub_bigIntegerDivision = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_bigIntegerDivision = (ICEPUB_BIGINTEGERDIVISION *)GetProcAddress(hDLLDrv,
"icePub_bigIntegerDivision");
}
if(icePub_bigIntegerDivision != NULL)
{
icePub_bigIntegerDivision("11111111111111111111111","2222222222222222",strResult,strRemainder);
}
AfxMessageBox(strResult);
AfxMessageBox(strRemainder);
253
----------------------- Page 254-----------------------
VB sample 代码:
Private Declare Function icePub_bigIntegerDivision Lib "icePubDll.dll" (ByVal str1 As String, ByVal str2 As
String, ByVal strResult As String, ByVal strRemainder As String) As Integer
Dim strResult As String
Dim strRemainder As String
Dim a2 As Integer
strResult = Space(1024)
strRemainder = Space(1024)
a2=icePub_bigIntegerDivision("11111111111111111111111","2222222222222222",strResult,strRemainder)
MsgBox strResult
MsgBox strRemainder
254
----------------------- Page 255-----------------------
3.122icePub_base64Encode
函数原型:
int WINAPI icePub_base64Encode(char *strData,int dataLen,char *strCode)
输入:strData 待处理数据
dataLen 待处理数据长度
输出:strCode base64 编码,编码后的长度一般比原文多占1/3 的存储空间
返回码: strCode 编码长度
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_base64Encode(char *strData,int dataLen,char *strCode);
动态调用例程
VC sample 代码:
char buff[1024];
char buff2[1024];
strcpy(buff2,"又是一年秋来到,花落谁家院?心如潮水情似海,苦痛与甘甜。日日夜夜相陪伴,怎堪离
别怨。世间纷扰多坎坷,命里难成全,常忆来时路,泪光迷离眼。情愿不相识,不相知,不相守,不相
爱,伤痛不因有我,离别不因有我,决策不因有我,其实生命不该有我...一场梦,终需醒,两颗真心相
待,天地可见。一世情,分与合,有缘无缘不求,两不亏欠。");
typedef int (WINAPI ICEPUB_BASE64ENCODE)(char *strData,int dataLen,char *strCode);
ICEPUB_BASE64ENCODE *icePub_base64Encode = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_base64Encode=(ICEPUB_BASE64ENCODE *)GetProcAddress(hDLLDrv,"icePub_base64Encode");
}
if(icePub_base64Encode)
icePub_base64Encode(buff2,strlen(buff2),buff);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff);
255
----------------------- Page 256-----------------------
VB sample 代码:
Private Declare Function icePub_base64Encode Lib "icePubDll.dll" (ByVal strData As String, ByVal dataLen
As Integer, ByVal strCode As String) As Integer
Dim a2 As Integer
Dim buff As String
Dim buff2 As String
buff2="真了不起~"
buff=Space(1024)
a2=icePub_base64Encode(buff2,LenB(buff2),buff)
MsgBox buff
256
----------------------- Page 257-----------------------
3.123icePub_base64Decode
函数原型:
int WINAPI icePub_base64Decode(char *strCode,int codeLen,char *strData)
输入:strCode 待解码数据
dataLen 待解码数据长度
输出:strData base64 解码数据
返回码: strData 解码后长度
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_base64Decode(char *strCode,int codeLen,char *strData);
动态调用例程
VC sample 代码:
char buff[1024];
char buff2[1024];
strcpy(buff2,"09bKx9K7xOrH78C0tb2jrLuowuTLrbzS1Lqjv9DEyOezscuux+nLxrqjo6y/4M200+u4yszwoaPI1
cjV0rnSuc/gxeOw6aOs1PW/sMDrsfDUuaGjysC85LfXyMW24L+yv8CjrMP8wO/E0bPJyKujrLOj0uTAtMqx
wrejrMDhueLD1MDr0duho8fp1Liyu8/gyrajrLK7z+DWqqOssrvP4MrYo6yyu8/gsK6jrMnLzbSyu9Ly09DO0q
OswOux8LK70vLT0M7So6y+9rLfsrvS8tPQztKjrMbkyrXJ+sP8sru4w9PQztIuLi7Su7Ohw86jrNbV0OjQ0aOs
wb2/xdXm0MTP4LT9o6zM7LXYv8m8+6Gj0rvKwMfpo6y31tPrus+jrNPQ1LXO3tS1srvH86Oswb2yu7/3x7e
how==");
typedef int (WINAPI ICEPUB_BASE64DECODE)(char *strCode,int codeLen,char *strData);
ICEPUB_BASE64DECODE *icePub_base64Decode = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_base64Decode=(ICEPUB_BASE64DECODE *)GetProcAddress(hDLLDrv,"icePub_base64Decode");
}
if(icePub_base64Decode)
icePub_base64Decode(buff2,strlen(buff2),buff);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff);
257
----------------------- Page 258-----------------------
VB sample 代码:
Private Declare Function icePub_base64Decode Lib "icePubDll.dll" (ByVal strCode As String, ByVal codeLen
As Integer, ByVal strData As String) As Integer
Dim a2 As Integer
Dim buff As String
Dim buff2 As String
buff2="1ebBy7K7xvB+"
buff=Space(1024)
a2=icePub_base64Decode(buff2,LenB(buff2),buff)
MsgBox buff
258
----------------------- Page 259-----------------------
3.124icePub_base64Decode2
函数原型:
int WINAPI icePub_base64Decode2(char *strCode,int codeLen,char *strData)
输入:strCode 待解码数据
dataLen 待解码数据长度
输出:strData base64 解码展开Hex 数据字符串
返回码: strData 解码后长度
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_base64Decode2(char *strCode,int codeLen,char *strData);
动态调用例程
VC sample 代码:
char buff[1024*2];
char buff2[1024];
strcpy(buff2,"09bKx9K7xOrH78C0tb2jrLuowuTLrbzS1Lqjv9DEyOezscuux+nLxrqjo6y/4M200+u4yszwoaPI1
cjV0rnSuc/gxeOw6aOs1PW/sMDrsfDUuaGjysC85LfXyMW24L+yv8CjrMP8wO/E0bPJyKujrLOj0uTAtMqx
wrejrMDhueLD1MDr0duho8fp1Liyu8/gyrajrLK7z+DWqqOssrvP4MrYo6yyu8/gsK6jrMnLzbSyu9Ly09DO0q
OswOux8LK70vLT0M7So6y+9rLfsrvS8tPQztKjrMbkyrXJ+sP8sru4w9PQztIuLi7Su7Ohw86jrNbV0OjQ0aOs
wb2/xdXm0MTP4LT9o6zM7LXYv8m8+6Gj0rvKwMfpo6y31tPrus+jrNPQ1LXO3tS1srvH86Oswb2yu7/3x7e
how==");
typedef int (WINAPI ICEPUB_BASE64DECODE2)(char *strCode,int codeLen,char *strData);
ICEPUB_BASE64DECODE2 *icePub_base64Decode2 = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_base64Decode2=(ICEPUB_BASE64DECODE
*)GetProcAddress(hDLLDrv,"icePub_base64Decode2");
}
if(icePub_base64Decode2)
icePub_base64Decode2(buff2,strlen(buff2),buff);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff);
259
----------------------- Page 260-----------------------
VB sample 代码:
Private Declare Function icePub_base64Decode2 Lib "icePubDll.dll" (ByVal strCode As String, ByVal
codeLen As Integer, ByVal strData As String) As Integer
Dim a2 As Integer
Dim buff As String
Dim buff2 As String
buff2="1ebBy7K7xvB+"
buff=Space(1024)
a2=icePub_base64Decode2(buff2,LenB(buff2),buff)
MsgBox buff
260
----------------------- Page 261-----------------------
3.125icePub_base64EncodeFile
函数原型:
int WINAPI icePub_base64EncodeFile(char *strFromFilename,char *strBase64Filename)
输入:strFromFilename 待处理数据文件名
strBase64Filename base64 编码后文件名
输出:
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_base64EncodeFile(char *strFromFilename,char *strBase64Filename);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_BASE64ENCODEFILE)(char *strFromFilename,char *strBase64Filename);
ICEPUB_BASE64ENCODEFILE *icePub_base64EncodeFile = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_base64EncodeFile=(ICEPUB_BASE64ENCODEFILE
*)GetProcAddress(hDLLDrv,"icePub_base64EncodeFile");
}
if(icePub_base64EncodeFile)
icePub_base64EncodeFile("a.jpg","a.txt");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
261
----------------------- Page 262-----------------------
VB sample 代码:
Private Declare Function icePub_base64EncodeFile Lib "icePubDll.dll" (ByVal strFromFilename As String,
ByVal strBase64Filename As String) As Integer
Dim a2 As Integer
a2=icePub_base64EncodeFile("a.jpg","a.txt")
262
----------------------- Page 263-----------------------
3.126icePub_base64DecodeFile
函数原型:
int WINAPI icePub_base64DecodeFile(char *strBase64Filename,char *strToFilename)
输入:strBase64Filename 待处理base64 编码文件名
strToFilename 还原后文件名
输出:
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_base64DecodeFile(char *strBase64Filename,char *strToFilename);
动态调用例程
VC sample 代码:
typedef int (WINAPI ICEPUB_BASE64DECODEFILE)(char *strBase64Filename,char *strToFilename);
ICEPUB_BASE64DECODEFILE *icePub_base64DecodeFile = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_base64DecodeFile=(ICEPUB_BASE64DECODEFILE
*)GetProcAddress(hDLLDrv,"icePub_base64DecodeFile");
}
if(icePub_base64DecodeFile)
icePub_base64DecodeFile("base64.txt","a.png");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
263
----------------------- Page 264-----------------------
VB sample 代码:
Private Declare Function icePub_base64DecodeFile Lib "icePubDll.dll" (ByVal strBase64Filename As String,
ByVal strToFilename As String) As Integer
Dim a2 As Integer
a2=icePub_base64DecodeFile("base64.txt","a.png")
264
----------------------- Page 265-----------------------
3.127icePub_htmlTo8
函数原型:
int WINAPI icePub_htmlTo8(char *strHtml,char *strScript8)
输入:strHtml html 文本
输出:strScript8 8 进制编码script 字符串,要有足够的buffer 长度
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_htmlTo8(char *strHtml,char *strScript8);
动态调用例程
VC sample 代码:
int htmlTo8(char *strHtml,char *strScript8)
{
typedef int (WINAPI ICEPUB_HTNLTO8)(char *strHtml,char *strScript8);
ICEPUB_HTNLTO8 *icePub_htmlTo8 = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_htmlTo8 = (ICEPUB_HTNLTO8 *)GetProcAddress(hDLLDrv, "icePub_htmlTo8");
}
if(icePub_htmlTo8)
icePub_htmlTo8(strHtml,strScript8);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
return 0;
}
char str1[1024*10];
htmlTo8("<html><head><title>ice snow eden</title></head><p>welcome ~</html>",str1);
AfxMessageBox(str1);
265
----------------------- Page 266-----------------------
VB sample 代码:
Private Declare Function icePub_htmlTo8 Lib "icePubDll.dll" (ByVal strHtml As String,ByVal strScript8 As
String) As Integer
Dim str1 As String
Dim a2 As Integer
str1=Space(1024*10)
a2=htmlTo8("<html><head><title>ice snow eden</title></head><p>welcome~</html>",str1)
MsgBox str1
266
----------------------- Page 267-----------------------
3.128icePub_htmlTo16
函数原型:
int WINAPI icePub_htmlTo16(char *strHtml,char *strScript16)
输入:strHtml html 文本
输出:strScript16 16 进制编码script 字符串,要有足够的buffer 长度
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_htmlTo16(char *strHtml,char *strScript16);
动态调用例程
VC sample 代码:
int htmlTo16(char *strHtml,char *strScript 16)
{
typedef int (WINAPI ICEPUB_HTNLTO 16)(char *strHtml,char *strScript 16);
ICEPUB_HTNLTO16 *icePub_htmlTo16 = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_htmlTo16 = (ICEPUB_HTNLTO 16 *)GetProcAddress(hDLLDrv, "icePub_htmlTo16");
}
if(icePub_htmlTo16)
icePub_htmlTo16(strHtml,strScript16);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
return 0;
}
char str1[1024*10];
htmlTo16("<html><head><title>ice snow eden</title></head><p>welcome~</html>",str1);
AfxMessageBox(str1);
267
----------------------- Page 268-----------------------
VB sample 代码:
Private Declare Function icePub_htmlTo16 Lib "icePubDll.dll" (ByVal strHtml As String,ByVal strScript16 As
String) As Integer
Dim str1 As String
Dim a2 As Integer
str1=Space(1024*10)
a2=htmlTo16("<html><head><title>ice snow eden</title></head><p>welcome ~</html>",str1)
MsgBox str1
268
----------------------- Page 269-----------------------
3.129icePub_htmlToCode
8、16 复合编码
函数原型:
int WINAPI icePub_htmlToCode(char *strHtml,char *strScript,int scriptLen,char *strSer)
输入:strHtml html 文本
scriptLen strScript 最大长度
strSer 复合编码执行序列串,A 为8 进制 B 为16进制
输出:strScript16 复合编码script 字符串
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_htmlToCode(char *strHtml,char *strScript,int scriptLen,char *strSer) ;
动态调用例程
VC sample 代码:
void htmlToCode(char *strHtml,char *strScript,int len,char *strSer)
{
typedef int (WINAPI ICEPUB_HTNLTOCODE)(char *strHtml,char *strScript,int scriptLen,char *strSer);
ICEPUB_HTNLTOCODE *icePub_htmlToCode = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_htmlToCode = (ICEPUB_HTNLTOCODE *)GetProcAddress(hDLLDrv,
"icePub_htmlToCode");
}
if(icePub_htmlToCode)
icePub_htmlToCode(strHtml,strScript,len,strSer);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
}
char str1[1024*30+1];
htmlToCode("<html><head><title>iceSnowEden</title></head><p>welcome ~
</html>",str1,1024*30,"ABA");
AfxMessageBox(str1);
269
----------------------- Page 270-----------------------
VB sample 代码:
Private Declare Function icePub_htmlToCode Lib "icePubDll.dll" (ByVal strHtml As String,ByVal strScript As
String,ByVal scriptLen As Integer,ByVal strSer As String) As Integer
Dim str1 As String
Dim a2 As Integer
str1=Space(1024*30)
a2=icePub_htmlToCode("<html><head><title>ice snow eden</title></head><p>welcome ~
</html>",str1,1024*30,"ABA")
MsgBox str1
270
----------------------- Page 271-----------------------
3.130icePub_big5ToSimp
函数原型:
int WINAPI icePub_big5ToSimp(char *strBig5,char *strSimp)
输入:strBig5 繁体文本串
输出:strSimp 简体字符串
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_big5ToSimp(char *strBig5,char *strSimp);
动态调用例程
VC iceChineseBig2GB 代码:
char strSimp[1024];
typedef int (WINAPI ICEPUB_BIG5TOSIMP)(char *strBig5,char *strSimp);
ICEPUB_BIG5TOSIMP *icePub_big5ToSimp = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_big5ToSimp = (ICEPUB_BIG5TOSIMP *)GetProcAddress(hDLLDrv,
"icePub_big5ToSimp");
}
if(icePub_big5ToSimp)
icePub_big5ToSimp("icePubdll 处",strSimp);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(strSimp);
271
----------------------- Page 272-----------------------
VB sample 代码:
Private Declare Function icePub_big5ToSimp Lib "icePubDll.dll" (ByVal strBig5 As String ,ByVal strSimp
As String) As Integer
Dim strSimp As String
Dim a2 As Integer
strSimp=Space(1024*10)
a2=icePub_big5ToSimp("icePubdll 处",strSimp)
MsgBox strSimp
272
----------------------- Page 273-----------------------
3.131icePub_simpToBig5
函数原型:
int WINAPI icePub_simpToBig5(char *strSimp,char *strBig5)
输入:strSimp 简体字符串
输出:strBig5 繁体文本串
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_simpToBig5(char *strSimp,char *strBig5);
动态调用例程
VC iceChineseBig2GB 代码:
char strBig5[1024];
typedef int (WINAPI ICEPUB_SIMPTOBIG5)(char *strBig5,char *strSimp);
ICEPUB_SIMPTOBIG5 *icePub_simpToBig5 = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_simpToBig5 = (ICEPUB_SIMPTOBIG5 *)GetProcAddress(hDLLDrv,
"icePub_simpToBig5");
}
if(icePub_simpToBig5)
icePub_simpToBig5("icePubdll 揭秘",strBig5);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(strBig5);
273
----------------------- Page 274-----------------------
VB sample 代码:
Private Declare Function icePub_simpToBig5 Lib "icePubDll.dll" (ByVal strSimp As String ,ByVal strBig5
As String) As Integer
Dim strBig5 As String
Dim a2 As Integer
strBig5=Space(1024*10)
a2=icePub_simpToBig5("icePubdll 揭秘",strBig5)
MsgBox strBig5
274
----------------------- Page 275-----------------------
3.132icePub_fileBig5ToSimp
函数原型:
int WINAPI icePub_fileBig5ToSimp(char *strBig5Filename,char *strSimpFilename)
输入:strBig5 繁体文本文件名
输出:strSimp 简体文本文件名
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_fileBig5ToSimp(char *strBig5Filename,char *strSimpFilename);
动态调用例程
VC iceChineseBig2GB 代码:
typedef int (WINAPI ICEPUB_FILEBIG5TOSIMP)( char *strBig5Filename,char *strSimpFilename);
ICEPUB_FILEBIG5TOSIMP *icePub_fileBig5ToSimp = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_fileBig5ToSimp = (ICEPUB_FILEBIG5TOSIMP *)GetProcAddress(hDLLDrv,
"icePub_fileBig5ToSimp");
}
if(icePub_fileBig5ToSimp)
icePub_fileBig5ToSimp("big5.txt","simp.txt");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
275
----------------------- Page 276-----------------------
VB sample 代码:
Private Declare Function icePub_fileBig5ToSimp Lib "icePubDll.dll" (ByVal strBig5Filename As String ,
ByVal strSimpFilename As String) As Integer
Dim a2 As Integer
a2=icePub_fileBig5ToSimp("big5.txt","simp.txt")
276
----------------------- Page 277-----------------------
3.133icePub_fileSimpToBig5
函数原型:
int WINAPI icePub_fileSimpToBig5(char *strSimpFilename,char *strBig5Filename)
输入:strSimp 简体文本文件名
输出:strBig5 繁体文本文件名
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_fileSimpToBig5(char *strSimpFilename,char *strBig5Filename);
动态调用例程
VC iceChineseBig2GB 代码:
typedef int (WINAPI ICEPUB_FILESIMPTOBIG5)(char *strSimpFilename,char *strBig5Filename);
ICEPUB_FILESIMPTOBIG5 *icePub_fileSimpToBig5 = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_fileSimpToBig5 = (ICEPUB_FILESIMPTOBIG5 *)GetProcAddress(hDLLDrv,
"icePub_fileSimpToBig5");
}
if(icePub_fileSimpToBig5)
icePub_fileSimpToBig5("simp.txt","big5.txt");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
277
----------------------- Page 278-----------------------
VB sample 代码:
Private Declare Function icePub_fileSimpToBig5 Lib "icePubDll.dll" (ByVal strSimpFilename As String ,
ByVal strBig5Filename As String) As Integer
Dim a2 As Integer
a2=icePub_fileSimpToBig5("simp.txt","big5.txt")
278
----------------------- Page 279-----------------------
3.134icePub_dictionaryCodeTransfer
函数原型:
int WINAPI icePub_dictionaryCodeTransfer(char *strDictionaryFilename,char *strSrc,char
*strCode)
输入:strDictionaryFilename 字典文件名
strSrc 待处理单词
输出:strCode strSrc 对应信息
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_dictionaryCodeTransfer(char *strDictionaryFilename,char *strSrc,char
*strCode);
动态调用例程
VC sample 代码:
char strCode[1024];
typedef int (WINAPI ICEPUB_DICTIONARYCODETRANSFER)(char *strDictionaryFilename,char
*strSrc,char *strCode);
ICEPUB_DICTIONARYCODETRANSFER *icePub_dictionaryCodeTransfer = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_dictionaryCodeTransfer = (ICEPUB_DICTIONARYCODETRANSFER
*)GetProcAddress(hDLLDrv, "icePub_dictionaryCodeTransfer");
}
if(icePub_dictionaryCodeTransfer)
icePub_dictionaryCodeTransfer("汉英字典.txt","我",strCode);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessagBox(strCode);
279
----------------------- Page 280-----------------------
VB sample 代码:
Private Declare Function icePub_dictionaryCodeTransfer Lib "icePubDll.dll" (ByVal
strDictionaryFilename As String,ByVal strSrc As String,ByVal strCode As String) As Integer
Dim a2 As Integer
Dim strCode As String
strCode=Space(1024)
a2=icePub_dictionaryCodeTransfer("汉英字典.txt","我",strCode)
MsgBox strCode
280
----------------------- Page 281-----------------------
3.135icePub_dictionaryCodeTransfer2
函数原型:
int WINAPI icePub_dictionaryCodeTransfer2(char *strDictionaryFilename,char *strSrc,char
*strCode,char *strFenge)
输入:strDictionaryFilename 字典文件名
strSrc 待处理单词
strFenge 字典里单词和code 之间的分隔符字符串
输出:strCode strSrc 对应信息
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_dictionaryCodeTransfer2(char *strDictionaryFilename,char *strSrc,char
*strCode,char *strFenge);
动态调用例程
VC sample 代码:
char strCode[1024];
typedef int (WINAPI ICEPUB_DICTIONARYCODETRANSFER2)(char *strDictionaryFilename,char
*strSrc,char *strCode,char *strFenge);
ICEPUB_DICTIONARYCODETRANSFER2 *icePub_dictionaryCodeTransfer2 = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_dictionaryCodeTransfer2 = (ICEPUB_DICTIONARYCODETRANSFER2
*)GetProcAddress(hDLLDrv, "icePub_dictionaryCodeTransfer2");
}
if(icePub_dictionaryCodeTransfer2)
icePub_dictionaryCodeTransfer2("汉英字典.txt","我",strCode, " ");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessagBox(strCode);
281
----------------------- Page 282-----------------------
VB sample 代码:
Private Declare Function icePub_dictionaryCodeTransfer2 Lib "icePubDll.dll" (ByVal
strDictionaryFilename As String,ByVal strSrc As String,ByVal strCode As String,ByVal strFenge As
String) As Integer
Dim a2 As Integer
Dim strCode As String
strCode=Space(1024)
a2=icePub_dictionaryCodeTransfer2("汉英字典.txt","我",strCode," ")
MsgBox strCode
282
----------------------- Page 283-----------------------
3.136icePub_dictionaryCodeTransfer3
函数原型:
int WINAPI icePub_dictionaryCodeTransfer3(char *strDictionaryText,char *strSrc,char
*strCode,char *strFenge)
输入:strDictionaryText 字典文本串
strSrc 待处理单词
strFenge 字典里单词和code 之间的分隔符字符串
输出:strCode strSrc 对应信息
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_dictionaryCodeTransfer3(char *strDictionaryText,char *strSrc,char
*strCode,char *strFenge);
动态调用例程
VC sample 代码:
char strCode[1024];
char strDictionaryText[1024];
strpcy(strDictionaryText,"我 me\r\n 你 you\r\n");
typedef int (WINAPI ICEPUB_DICTIONARYCODETRANSFER3)(char * strDictionaryText,char *strSrc,char
*strCode,char *strFenge);
ICEPUB_DICTIONARYCODETRANSFER3 *icePub_dictionaryCodeTransfer3 = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_dictionaryCodeTransfer3 = (ICEPUB_DICTIONARYCODETRANSFER3
*)GetProcAddress(hDLLDrv, "icePub_dictionaryCodeTransfer3");
}
if(icePub_dictionaryCodeTransfer3)
icePub_dictionaryCodeTransfer3(strDictionaryText,"我",strCode, " ");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessagBox(strCode);
283
----------------------- Page 284-----------------------
VB sample 代码:
Private Declare Function icePub_dictionaryCodeTransfer3 Lib "icePubDll.dll" (ByVal strDictionaryText
As String,ByVal strSrc As String,ByVal strCode As String,ByVal strFengeAs String) As Integer
Dim a2 As Integer
Dim strCode As String
strCode=Space(1024)
a2=icePub_dictionaryCodeTransfer3("我 me"+vbCrLf+"你 you"+vbCrLf,"我",strCode," ")
MsgBox strCode
284
----------------------- Page 285-----------------------
3.137icePub_dictionaryCodeTransferString
批量转换
函数原型:
int WINAPI icePub_dictionaryCodeTransferString(char *strDictionaryFilename,char
*strSrcString,char *strCode,int srcWordLen,char *strFenge)
输入:strDictionaryFilename 字典文件名
strSrcString 待处理单词串
srcWordLen 待处理单词串里每一个单词长度(意思必须是定长)
strFenge strCode 里每一个结果分隔字符串
输出:strCode strSrcString 对应信息串
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_dictionaryCodeTransferString(char *strDictionaryFilename,char
*strSrcString,char *strCode,int srcWordLen,char *strFenge);
动态调用例程
VC sample 代码:
char strCode[1024];
typedef int (WINAPI ICEPUB_DICTIONARYCODETRANSFERSTRING)(char *strDictionaryFilename,char
*strSrcString,char *strCode,int srcWordLen,char *strFenge);
ICEPUB_DICTIONARYCODETRANSFERSTRING *icePub_dictionaryCodeTransferString = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_dictionaryCodeTransferString = (ICEPUB_DICTIONARYCODETRANSFERSTRING
*)GetProcAddress(hDLLDrv, "icePub_dictionaryCodeTransferString");
}
if(icePub_dictionaryCodeTransferString)
icePub_dictionaryCodeTransferString(" 内码字典.txt","忧飔萧然",2,strCode," ");
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessagBox(strCode);
285
----------------------- Page 286-----------------------
VB sample 代码:
Private Declare Function icePub_dictionaryCodeTransferString Lib "icePubDll.dll" (ByVal
strDictionaryFilename As String,ByVal strSrcString As String,ByVal srcWordLen As Integer,ByVal strCode
As String,ByVal strFenge As String) As Integer
Dim a2 As Integer
Dim strCode As String
strCode=Space(1024)
a2=icePub_dictionaryCodeTransferString(" 内码字典.txt","愁云惨淡",2,strCode, " ")
MsgBox strCode
286
----------------------- Page 287-----------------------
3.138icePub_desEncryptionBuffer
每8 字节一组连续加密
函数原型:
int WINAPI icePub_desEncryptionBuffer(char *strInput,int inputLen, char *strOutput, char
*strKey)
输入:strInput 待加密数据
inputLen 待加密数据长度
strKey 单des 密钥,8 字节长度
输出:strOutput 加密后数据
返回码: 加密后数据长度,为8 的倍数
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_desEncryptionBuffer(char *strInput,int inputLen, char *strOutput, char
*strKey);
动态调用例程
VC sample 代码:
char buff[1024],buff2[1024],key[1024];
int len=0;
strcpy(buff,"You In Wind, Like Color Butterfly For I Crush Potpourri.");
strcpy(key,"11223344");
typedef int (WINAPI ICEPUB_DESENCRYPTIONBUFFER)(char *strInput,int inputLen, char *strOutput,
char *strKey);
ICEPUB_DESENCRYPTIONBUFFER *icePub_desEncryptionBuffer = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_desEncryptionBuffer=(ICEPUB_DESENCRYPTIONBUFFER
*)GetProcAddress(hDLLDrv,"icePub_desEncryptionBuffer");
}
if(icePub_desEncryptionBuffer)
len=icePub_desEncryptionBuffer(buff,strlen(buff),buff2,key);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
287
----------------------- Page 288-----------------------
VB sample 代码:
Private Declare Function icePub_desEncryptionBuffer Lib "icePubDll.dll" (ByVal strInput As String, ByVal
inputLen As Integer, ByVal strOutput As String, ByVal strKey As String) As Integer
Dim len As Integer
Dim buff As String
Dim buff2 As String
Dim key As String
buff="I Stand In Rain, Pray Rainbow For your Kiss Fragrance."
buff2=Space(1024)
key="11223344"
len=icePub_desEncryptionBuffer(buff,LenB(buff),buff2,key)
strOutput 为数据buffer,VB 里String 变量可能会有问题
288
----------------------- Page 289-----------------------
3.139icePub_desDecryptionBuffer
每8 字节一组连续解密
函数原型:
int WINAPI icePub_desDecryptionBuffer(char *strInput,int inputLen, char *strOutput, char
*strKey)
输入:strInput 待解密数据
inputLen 待解密数据长度,为8 的倍数
strKey 单des 密钥,8 字节长度
输出:strOutput 解密后数据
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_desDecryptionBuffer(char *strInput,int inputLen, char *strOutput, char
*strKey);
动态调用例程
VC sample 代码:
char buff[1024],buff2[1024],key[1024];
int len=0;
strcpy(buff,"\xCB\xCB\x72\x05\x98\x22\xD3\x38");
strcpy(key,"11223344");
typedef int (WINAPI ICEPUB_DESDECRYPTIONBUFFER)(char *strInput,int inputLen, char *strOutput,
char *strKey);
ICEPUB_DESDECRYPTIONBUFFER *icePub_desDecryptionBuffer = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_desDecryptionBuffer=(ICEPUB_DESDECRYPTIONBUFFER
*)GetProcAddress(hDLLDrv,"icePub_desDecryptionBuffer");
}
if(icePub_desDecryptionBuffer)
len=icePub_desDecryptionBuffer(buff,8,buff2,key);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff2);
289
----------------------- Page 290-----------------------
VB sample 代码:
Private Declare Function icePub_desDecryptionBuffer Lib "icePubDll.dll" (ByVal strInput As String, ByVal
inputLen As Integer, ByVal strOutput As String, ByVal strKey As String) As Integer
Dim len As Integer
Dim buff As String
Dim buff2 As String
Dim key As String
'只能特例数据,冒汗
buff="88888888"
key="11223344"
buff2=Space(1024*10)
len=icePub_desDecryptionBuffer(buff,LenB(buff),buff2,key)
MsgBox buff2
strOutput 为数据buffer,VB 里String 变量可能会有问题
290
----------------------- Page 291-----------------------
3.140icePub_desEncryptionHex
每8 字节一组连续加密
函数原型:
int WINAPI icePub_desEncryptionHex(char *strInputHexstring, char *strOutputHexstring,
char *strKeyHexstring)
输入:strInputHexstring 待加密16 进制数据串,16 字节长度
strKeyHexstring 单des 密钥16 进制串,16 字节长度
输出:strOutputHexstring 加密后16进制数据串,16 字节长度
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_desEncryptionHex(char *strInputHexstring, char *strOutputHexstring,
char *strKeyHexstring);
动态调用例程
VC sample 代码:
char buff[1024],buff2[1024],key[1024];
strcpy(buff,"6060606060606060");
strcpy(key,"1234567887654321");
buff2[0]=0;
typedef int (WINAPI ICEPUB_DESENCRYPTIONHEX)(char *strInputHexstring, char *strOutputHexstring,
char *strKeyHexstring);
ICEPUB_DESENCRYPTIONHEX *icePub_desEncryptionHex = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_desEncryptionHex=(ICEPUB_DESENCRYPTIONHEX
*)GetProcAddress(hDLLDrv,"icePub_desEncryptionHex");
}
if(icePub_desEncryptionHex)
icePub_desEncryptionHex(buff,buff2,key);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff2);
291
----------------------- Page 292-----------------------
VB sample 代码:
Private Declare Function icePub_desEncryptionHex Lib "icePubDll.dll" (ByVal strInputHexstring As String,
ByVal strOutputHexstring As String, ByVal strKeyHexstring As String) As Integer
Dim str1 As String
str1 = Space(1024)
a2 = icePub_desEncryptionHex("6060606060606060", str1, " 1234567887654321")
MsgBox str1
292
----------------------- Page 293-----------------------
3.141icePub_desDecryptionHex
每8 字节一组连续解密
函数原型:
int WINAPI icePub_desDecryptionHex(char *strInputHexstring, char *strOutputHexstring,
char *strKeyHexstring)
输入:strInputHexstring 待解密16 进制数据串,16 字节长度
strKeyHexstring 单des 密钥16 进制串,16 字节长度
输出:strOutputHexstring 解密后16进制数据串,16 字节长度
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_desDecryptionHex(char *strInputHexstring, char *strOutputHexstring,
char *strKeyHexstring);
动态调用例程
VC sample 代码:
char buff[1024],buff2[1024],key[1024];
strcpy(buff,"CBCB72059822D338");
strcpy(key,"1122334455667788");
typedef int (WINAPI ICEPUB_DESENCRYPTIONHEX)(char *strInputHexstring, char *strOutputHexstring,
char *strKeyHexstring);
ICEPUB_DESENCRYPTIONHEX *icePub_desEncryptionHex = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_desEncryptionHex=(ICEPUB_DESENCRYPTIONHEX
*)GetProcAddress(hDLLDrv,"icePub_desEncryptionHex");
}
if(icePub_desEncryptionHex)
len=icePub_desEncryptionHex(buff,buff2,key);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff2);
293
----------------------- Page 294-----------------------
VB sample 代码:
Private Declare Function icePub_desDecryptionHex Lib "icePubDll.dll" (ByVal strInputHexstring As String,
ByVal strOutputHexstring As String, ByVal strKeyHexstring As String) As Integer
Dim a2 As Integer
Dim str1 As String
str1 = Space(1024)
a2 = icePub_desDecryptionHex("6060606060606060", str1, "6060606060606060")
MsgBox str1
294
----------------------- Page 295-----------------------
3.142icePub_3desEncryptionHex
每8 字节一组连续加密
函数原型:
int WINAPI icePub_3desEncryptionHex(char *strInputHexstring, char *strOutputHexstring,
char * strDoubleKeyHexstring)
输入:strInputHexstring 待加密16 进制数据串,16 字节长度
strDoubleKeyHexstring 3des 密钥16进制串,32 字节长度
输出:strOutputHexstring 加密后16进制数据串,16 字节长度
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_3desEncryptionHex(char *strInputHexstring, char *strOutputHexstring,
char * strDoubleKeyHexstring);
动态调用例程
VC sample 代码:
char buff[1024],buff2[1024],key[1024];
strcpy(buff,"6060606060606060");
strcpy(key,"12345678876543211234567887654321");
buff2[0]=0;
typedef int (WINAPI ICEPUB_3DESENCRYPTIONHEX)(char *strInputHexstring, char *strOutputHexstring,
char * strDoubleKeyHexstring);
ICEPUB_3DESENCRYPTIONHEX *icePub_3desEncryptionHex = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_3desEncryptionHex=(ICEPUB_3DESENCRYPTIONHEX
*)GetProcAddress(hDLLDrv,"icePub_3desEncryptionHex");
}
if(icePub_3desEncryptionHex)
icePub_3desEncryptionHex(buff,buff2,key);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff2);
295
----------------------- Page 296-----------------------
VB sample 代码:
Private Declare Function icePub_3desEncryptionHex Lib "icePubDll.dll" (ByVal strInputHexstring As String,
ByVal strOutputHexstring As String, ByVal strDoubleKeyHexstring As String) As Integer
Dim str1 As String
str1 = Space(1024)
a2 = icePub_3desEncryptionHex("6060606060606060", str1, " 12345678876543211234567887654321")
MsgBox str1
296
----------------------- Page 297-----------------------
3.143icePub_3desDecryptionHex
每8 字节一组连续解密
函数原型:
int WINAPI icePub_3desDecryptionHex(char *strInputHexstring, char *strOutputHexstring,
char * strDoubleKeyHexstring)
输入:strInputHexstring 待解密16 进制数据串,16 字节长度
strKeyHexstring 3des 密钥16 进制串,16 字节长度
输出:strDoubleKeyHexstring 解密后16 进制数据串,16 字节长度
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_3desDecryptionHex(char *strInputHexstring, char *strOutputHexstring,
char * strDoubleKeyHexstring);
动态调用例程
VC sample 代码:
char buff[1024],buff2[1024],key[1024];
strcpy(buff,"CBCB72059822D338");
strcpy(key,"11223344556677881122334455667788");
typedef int (WINAPI ICEPUB_3DESENCRYPTIONHEX)(char *strInputHexstring, char *strOutputHexstring,
char * strDoubleKeyHexstring);
ICEPUB_3DESENCRYPTIONHEX *icePub_3desEncryptionHex = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_3desEncryptionHex=(ICEPUB_3DESENCRYPTIONHEX
*)GetProcAddress(hDLLDrv,"icePub_3desEncryptionHex");
}
if(icePub_3desEncryptionHex)
len=icePub_3desEncryptionHex(buff,buff2,key);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff2);
297
----------------------- Page 298-----------------------
VB sample 代码:
Private Declare Function icePub_3desDecryptionHex Lib "icePubDll.dll" (ByVal strInputHexstring As String,
ByVal strOutputHexstring As String, ByVal strDoubleKeyHexstring As String) As Integer
Dim a2 As Integer
Dim str1 As String
str1 = Space(1024)
a2 = icePub_3desDecryptionHex("6060606060606060", str1, "11223344556677881122334455667788")
MsgBox str1
298
----------------------- Page 299-----------------------
3.144icePub_desEncryptionString
函数原型:
int WINAPI icePub_desEncryptionString(char *strInput,int inputLen, char
*strOutputHexstring, char *strKey)
输入:strInput 待加密数据
inputLen 待加密数据长度
strKey 单des 密钥,8 字节长度
输出:strOutputHexstring 加密后16进制串
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_desEncryptionString(char *strInput,int inputLen, char
*strOutputHexstring, char *strKey);
动态调用例程
VC sample 代码:
char buff[1024],buff2[1024],key[1024];
int len=0;
strcpy(buff,"Take apart Letter Long, Listen Hidden Never-ending bitterness, Between Sky And Terra,
Beartthrob Popple.");
strcpy(key,"11223344");
typedef int (WINAPI ICEPUB_DESENCRYPTIONSTRING)(char *strInput,int inputLen, char
*strOutputHexstring, char *strKey);
ICEPUB_DESENCRYPTIONSTRING *icePub_desEncryptionString = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_desEncryptionString=(ICEPUB_DESENCRYPTIONSTRING
*)GetProcAddress(hDLLDrv,"icePub_desEncryptionString");
}
if(icePub_desEncryptionString)
len=icePub_desEncryptionString(buff,strlen(buff),buff2,key);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff2);
299
----------------------- Page 300-----------------------
VB sample 代码:
Private Declare Function icePub_desEncryptionString Lib "icePubDll.dll" (ByVal strInput As String, ByVal
inputLen As Integer, ByVal strOutputHexstring As String, ByVal strKey As String) As Integer
Dim len As Integer
Dim buff As String
Dim buff2 As String
Dim key As String
buff="Recall Dream Miss, Keep Silk-silk accept as a souvenir, Between You And Me, Stringed music
touching."
key="11223344"
buff2=Space(1024)
len=icePub_desEncryptionString(buff,LenB(buff),buff2,key)
MsgBox buff2
300
----------------------- Page 301-----------------------
3.145icePub_desDecryptionString
函数原型:
int WINAPI icePub_desDecryptionString(char *strInputHexstring,char *strOutput, char
*strKey)
输入:strInputHexstring 待解密16 进制串,数据长度为 16 的倍数
strKey 单des 密钥,8 字节长度
输出:strOutput 解密后数据
返回码: 解密后数据最大长度,为8 的倍数
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_desDecryptionString(char *strInputHexstring,char *strOutput, char
*strKey);
动态调用例程
VC sample 代码:
char buff[1024],buff2[1024],key[1024];
int len=0;
strcpy(buff,"208387C0F1B21F614470BF83698CA0AD1CA15623B69709C316E6BF989F8A2C69331149CA
392332C856BB9BF73389E7CE07D1F6CAFA9AF2A82282C46262B6F5ADBC5218DAD61124FCA7C7B56
1E26B837273167F65DE851CEED6E17C7F3480EB45D988BD4D5AD92220");
strcpy(key,"11223344");
typedef int (WINAPI ICEPUB_DESDECRYPTIONSTRING) char *strInputHexstring,char *strOutput, char
*strKey);
ICEPUB_DESDECRYPTIONSTRING *icePub_desDecryptionString = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_desDecryptionString=(ICEPUB_DESDECRYPTIONSTRING
*)GetProcAddress(hDLLDrv,"icePub_desDecryptionString");
}
if(icePub_desDecryptionString)
len=icePub_desDecryptionString(buff,buff2,key);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff2);
301
----------------------- Page 302-----------------------
VB sample 代码:
Private Declare Function icePub_desDecryptionString Lib "icePubDll.dll" (ByVal strInputHexstring As String,
ByVal strOutput As String, ByVal strKey As String) As Integer
Dim len As Integer
Dim buff As String
Dim buff2 As String
Dim key As String
buff="0C44E23252E5F95C187B2D14064F3CC2F3AAA261257A865F05E6B27795DDA8C9"
key="11223344"
buff2=Space(1024)
len=icePub_desDecryptionString(buff,buff2,key)
MsgBox buff2
302
----------------------- Page 303-----------------------
3.146icePub_encryptText
函数原型:
int WINAPI icePub_encryptText(char *strInput, char *strOutputHexstring, char *strKey)
输入:strInput 待加密文本数据串
strKey 单des 密钥,8 字节长度
输出:strOutputHexstring 加密后16进制串
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_encryptText(char *strInput, char *strOutputHexstring, char *strKey);
动态调用例程
VC sample 代码:
char buff[1024],buff2[1024],key[1024];
int len=0;
strcpy(buff,"Take apart Letter Long, Listen Hidden Never-ending bitterness, Between Sky And Terra,
Beartthrob Popple.");
strcpy(key,"11223344");
typedef int (WINAPI ICEPUB_ENCRYPTTEXT)(char *strInput, char *strOutputHexstring, char *strKey);
ICEPUB_ENCRYPTTEXT *icePub_decryptText = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_decryptText=(ICEPUB_ENCRYPTTEXT *)GetProcAddress(hDLLDrv,"icePub_encryptText");
}
if(icePub_decryptText)
len=icePub_decryptText(buff,buff2,key);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff2);
303
----------------------- Page 304-----------------------
VB sample 代码:
Private Declare Function icePub_encryptText Lib "icePubDll.dll" (ByVal strInput As String,ByVal
strOutputHexstring As String, ByVal strKey As String) As Integer
Dim len As Integer
Dim buff As String
Dim buff2 As String
Dim key As String
buff="Recall Dream Miss, Keep Silk-silk accept as a souvenir, Between You And Me, Stringed music
touching."
key="11223344"
buff2=Space(1024)
len=icePub_encryptionText(buff,buff2,key)
MsgBox buff2
304
----------------------- Page 305-----------------------
3.147icePub_decryptText
函数原型:
int WINAPI icePub_decryptText(char *strInputHexstring, char *strOutput, char *strKey)
输入:strInputHexstring 待解密16 进制串,数据长度为 16 的倍数
strKey 单des 密钥,8 字节长度
输出:strOutput 解密后数据
返回码: 解密后数据最大长度,为8 的倍数
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_decryptText(char *strInputHexstring, char *strOutput, char *strKey);
动态调用例程
VC sample 代码:
char buff[1024],buff2[1024],key[1024];
int len=0;
strcpy(buff,"CCF8732A28BA4B6EC7460F43DD95CAEA4E8D100DD35A7667469015EB5722E0C2452D0E
66895ECF294E3EAF39473B386E5999D0633F19296A13A44AF0BFAA38A956FBE465A57BA19C5C5FC8
6754AD029B39CF587EDD4651E20D06A92B8608F6ECD19841F52462A5A020479871017620FE");
strcpy(key,"11223344");
typedef int (WINAPI ICEPUB_DECRYPTTEXT)(char *strInputHexstring, char *strOutput, char *strKey);
ICEPUB_DECRYPTTEXT *icePub_decryptText = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_decryptText=(ICEPUB_DECRYPTTEXT *)GetProcAddress(hDLLDrv,"icePub_decryptText");
}
if(icePub_decryptText)
len=icePub_decryptText(buff,buff2,key);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff2);
305
----------------------- Page 306-----------------------
VB sample 代码:
Private Declare Function icePub_decryptText Lib "icePubDll.dll" (ByVal strInputHexstring As String, ByVal
strOutput As String, ByVal strKey As String) As Integer
Dim len As Integer
Dim buff As String
Dim buff2 As String
Dim key As String
buff="CCF8732A28BA4B6EC7460F43DD95CAEA4E8D100DD35A7667469015EB5722E0C2452D0E66895
ECF294E3EAF39473B386E5999D0633F19296A13A44AF0BFAA38A956FBE465A57BA19C5C5FC86754A
D029B39CF587EDD4651E20D06A92B8608F6ECD19841F52462A5A020479871017620FE"
key="11223344"
buff2=Space(1024)
len= icePub_decryptText(buff,buff2,key)
MsgBox buff2
306
----------------------- Page 307-----------------------
3.148icePub_encryptText2
函数原型:
int WINAPI icePub_encryptText2(char *strInput, char *strOutputHexstring, char *strKey)
输入:strInput 待加密文本数据串
strKey 单des 密钥,8 字节长度
输出:strOutputHexstring 加密后16进制串
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_encryptText2(char *strInput, char *strOutputHexstring, char *strKey);
动态调用例程
VC sample 代码:
char buff[1024],buff2[1024],key[1024];
int len=0;
strcpy(buff,"Take apart Letter Long, Listen Hidden Never-ending bitterness, Between Sky And Terra,
Beartthrob Popple.");
strcpy(key,"11223344");
typedef int (WINAPI ICEPUB_ENCRYPTTEXT2)(char *strInput, char *strOutputHexstring, char *strKey);
ICEPUB_ENCRYPTTEXT2 *icePub_decryptText2 = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_decryptText2=(ICEPUB_ENCRYPTTEXT2 *)GetProcAddress(hDLLDrv,"icePub_encryptText2");
}
if(icePub_decryptText2)
len=icePub_decryptText2(buff,buff2,key);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff2);
307
----------------------- Page 308-----------------------
VB sample 代码:
Private Declare Function icePub_encryptText2 Lib "icePubDll.dll" (ByVal strInput As String,ByVal
strOutputHexstring As String, ByVal strKey As String) As Integer
Dim len2 As Integer
Dim buff As String
Dim buff2 As String
Dim key As String
buff="Recall Dream Miss, Keep Silk-silk accept as a souvenir, Between You And Me, Stringed music
touching."
key="11223344"
buff2=Space(1024)
len2=icePub_encryptionText2(buff,buff2,key)
MsgBox buff2
308
----------------------- Page 309-----------------------
3.149icePub_decryptText2
函数原型:
int WINAPI icePub_decryptText2(char *strInputHexstring, char *strOutput, char *strKey)
输入:strInputHexstring 待解密16 进制串,数据长度为 16 的倍数
strKey 单des 密钥,8 字节长度
输出:strOutput 解密后数据
返回码: 解密后数据最大长度,为8 的倍数
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_decryptText2(char *strInputHexstring, char *strOutput, char *strKey);
动态调用例程
VC sample 代码:
char buff[1024],buff2[1024],key[1024];
int len=0;
strcpy(buff,"CCF8732A28BA4B6EC7460F43DD95CAEA4E8D100DD35A7667469015EB5722E0C2452D0E
66895ECF294E3EAF39473B386E5999D0633F19296A13A44AF0BFAA38A956FBE465A57BA19C5C5FC8
6754AD029B39CF587EDD4651E20D06A92B8608F6ECD19841F52462A5A020479871017620FE");
strcpy(key,"11223344");
typedef int (WINAPI ICEPUB_DECRYPTTEXT2)(char *strInputHexstring, char *strOutput, char *strKey);
ICEPUB_DECRYPTTEXT2 *icePub_decryptText2 = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_decryptText2=(ICEPUB_DECRYPTTEXT2 *)GetProcAddress(hDLLDrv,"icePub_decryptText2");
}
if(icePub_decryptText2)
len=icePub_decryptText2(buff,buff2,key);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff2);
309
----------------------- Page 310-----------------------
VB sample 代码:
Private Declare Function icePub_decryptText2 Lib "icePubDll.dll" (ByVal strInputHexstring As String, ByVal
strOutput As String, ByVal strKey As String) As Integer
Dim len2 As Integer
Dim buff As String
Dim buff2 As String
Dim key As String
buff="CCF8732A28BA4B6EC7460F43DD95CAEA4E8D100DD35A7667469015EB5722E0C2452D0E66895
ECF294E3EAF39473B386E5999D0633F19296A13A44AF0BFAA38A956FBE465A57BA19C5C5FC86754A
D029B39CF587EDD4651E20D06A92B8608F6ECD19841F52462A5A020479871017620FE"
key="11223344"
buff2=Space(1024)
len2= icePub_decryptText2(buff,buff2,key)
MsgBox buff2
310
----------------------- Page 311-----------------------
3.150icePub_encryptText3
函数原型:
int WINAPI icePub_encryptText3(char *strInput, char *strOutputHexstring, char *strKey)
输入:strInput 待加密文本数据串
strKey 密钥,任意长度
输出:strOutputHexstring 加密后base64 串
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_encryptText3(char *strInput, char *strOutputHexstring, char *strKey);
动态调用例程
VC sample 代码:
char buff[1024],buff2[1024],key[1024];
int len=0;
strcpy(buff,"Take apart Letter Long, Listen Hidden Never-ending bitterness, Between Sky And Terra,
Beartthrob Popple.");
strcpy(key,"2286766486");
typedef int (WINAPI ICEPUB_ENCRYPTTEXT3)(char *strInput, char *strOutputHexstring, char *strKey);
ICEPUB_ENCRYPTTEXT3 *icePub_decryptText3 = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_decryptText3=(ICEPUB_ENCRYPTTEXT2 *)GetProcAddress(hDLLDrv,"icePub_encryptText3");
}
if(icePub_decryptText3)
len=icePub_decryptText3(buff,buff2,key);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff2);
311
----------------------- Page 312-----------------------
VB sample 代码:
Private Declare Function icePub_encryptText3 Lib "icePubDll.dll" (ByVal strInput As String,ByVal
strOutputHexstring As String, ByVal strKey As String) As Integer
Dim len2 As Integer
Dim buff As String
Dim buff2 As String
Dim key As String
buff="Recall Dream Miss, Keep Silk-silk accept as a souvenir, Between You And Me, Stringed music
touching."
key="2286766486"
buff2=Space(1024)
len2=icePub_encryptionText3(buff,buff2,key)
MsgBox buff2
312
----------------------- Page 313-----------------------
3.151icePub_decryptText3
函数原型:
int WINAPI icePub_decryptText3(char *strInputHexstring, char *strOutput, char *strKey)
输入:strInputHexstring 待解密数据串
strKey 密钥,任意长度
输出:strOutput 解密后数据
返回码: 解密后数据最大长度,为8 的倍数
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_decryptText3(char *strInputHexstring, char *strOutput, char *strKey);
动态调用例程
VC sample 代码:
char buff[1024],buff2[1024],key[1024];
int len=0;
strcpy(buff,"vVVq0eaCUs8=");
strcpy(key,"11223344");
typedef int (WINAPI ICEPUB_DECRYPTTEXT3)(char *strInputHexstring, char *strOutput, char *strKey);
ICEPUB_DECRYPTTEXT3 *icePub_decryptText3 = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_decryptText3=(ICEPUB_DECRYPTTEXT2 *)GetProcAddress(hDLLDrv,"icePub_decryptText3");
}
if(icePub_decryptText3)
len=icePub_decryptText3(buff,buff2,key);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff2);
313
----------------------- Page 314-----------------------
VB sample 代码:
Private Declare Function icePub_decryptText3 Lib "icePubDll.dll" (ByVal strInputHexstring As String, ByVal
strOutput As String, ByVal strKey As String) As Integer
Dim len2 As Integer
Dim buff As String
Dim buff2 As String
Dim key As String
buff="vVVq0eaCUs8="
key="11223344"
buff2=Space(1024)
len2= icePub_decryptText3(buff,buff2,key)
MsgBox buff2
314
----------------------- Page 315-----------------------
3.152icePub_encryptFile
函数原型:
int WINAPI icePub_encryptFile(char *strFilename, char *strOutputFilename, char *strKey)
输入:strFilename 待加密文件名
strOutputFilename 加密后文件名
strKey 密钥串,任意长度
输出:
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_encryptFile(char *strFilename, char *strOutputFilename, char *strKey);
动态调用例程
VC sample 代码:
Char key[128];
strcpy(key,"11223344");
typedef int (WINAPI ICEPUB_ENCRYPTFILE)(char *strFilename, char *strOutputFilename, char *strKey);
ICEPUB_ENCRYPTFILE *icePub_encryptFile = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_encryptFile=(ICEPUB_ENCRYPTFILE *)GetProcAddress(hDLLDrv,"icePub_encryptFile");
}
if(icePub_encryptFile)
icePub_encryptFile("e:\\a.jpg","e:\\a.dat",key);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
315
----------------------- Page 316-----------------------
VB sample 代码:
Private Declare Function icePub_encryptFile Lib "icePubDll.dll" (ByVal strFilename As String,ByVal
strOutputFilename As String, ByVal strKey As String) As Integer
Dim a2 As Integer
Dim key As String
key="11223344"
a2=icePub_encryptFile("e:\a.jpg","e:\a.dat",key)
316
----------------------- Page 317-----------------------
3.153icePub_decryptFile
函数原型:
int WINAPI icePub_decryptFile(char *strFilename, char *strOutputFilename, char *strKey)
输入:strFilename 加密文件名
strOutputFilename 解密后文件名
strKey 密钥串,任意长度
输出:
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_decryptFile(char *strFilename, char *strOutputFilename, char *strKey);
动态调用例程
VC sample 代码:
Char key[128];
strcpy(key,"11223344");
typedef int (WINAPI ICEPUB_DECRYPTFILE)(char *strFilename, char *strOutputFilename, char *strKey);
ICEPUB_DECRYPTFILE *icePub_decryptFile = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_decryptFile=(ICEPUB_DECRYPTFILE *)GetProcAddress(hDLLDrv,"icePub_decryptFile");
}
if(icePub_decryptFile)
icePub_decryptFile("e:\\a.dat","e:\\a.jpg",key);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
317
----------------------- Page 318-----------------------
VB sample 代码:
Private Declare Function icePub_decryptFile Lib "icePubDll.dll" (ByVal strFilename As String, ByVal
strOutputFilename As String, ByVal strKey As String) As Integer
Dim a2 As Integer
Dim key As String
key = "11223344"
a2 = icePub_decryptFile("e:\a.dat", "e:\a.jpg ", key)
318
----------------------- Page 319-----------------------
3.154icePub_getMD5
函数原型:
int WINAPI icePub_getMD5(char* pBuf, int buffLen,char *strResult)
输入:pBuf 待处理的数据
nLength 待处理数据的长度
输出:strResult MD5 结果串,32 字节
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_getMD5(char* pBuf, int buffLen,char *strResult);
动态调用例程
VC sample 代码:
char buff[1024];
char buff2[1024];
strcpy(buff2,"Walk At Familiar Alley, Pursue Concordand's Footfall, Between Front And Back, What Course To
Follow?");
typedef int (WINAPI ICEPUB_GETMD5)( char* pBuf, int buffLen,char *strResult);
ICEPUB_GETMD5 *icePub_getMD5 = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getMD5=(ICEPUB_GETMD5 *)GetProcAddress(hDLLDrv,"icePub_getMD5");
}
if(icePub_getMD5)
icePub_getMD5(buff2,strlen(buff2),buff);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff);
319
----------------------- Page 320-----------------------
VB sample 代码:
Private Declare Function icePub_getMD5 Lib "icePubDll.dll" (ByVal pBuf As String, ByVal buffLen As
Integer, ByVal strResult As String) As Integer
Dim a2 As Integer
Dim buff As String
Dim buff2 As String
buff2="Go with This life Loneliness, carried off Day And Night Dreariness, Between Sun And Moon, Tell
Words from one's heart Each Other."
buff=Space(1024)
a2=icePub_getMD5(buff2,LenB(buff2),buff)
MsgBox buff
320
----------------------- Page 321-----------------------
3.155icePub_getMD5FromString
函数原型:
int WINAPI icePub_getMD5FromString(char *strData,char *strResult)
输入:strData 待处理的文本串
输出:strResult MD5 结果串,32 字节
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_getMD5FromString(char *strData,char *strResult);
动态调用例程
VC sample 代码:
char buff[1024];
char buff2[1024];
strcpy(buff2,"Walk At Familiar Alley, Pursue Concordand's Footfall, Between Front And Back, What Course To
Follow?");
typedef int (WINAPI ICEPUB_GETMD5FROMSTRING)(char *strData,char *strResult);
ICEPUB_GETMD5FROMSTRING *icePub_getMD5FromString = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getMD5FromString=(ICEPUB_GETMD5FROMSTRING
*)GetProcAddress(hDLLDrv,"icePub_getMD5FromString");
}
if(icePub_getMD5FromString)
icePub_getMD5FromString(buff2,buff);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff);
321
----------------------- Page 322-----------------------
VB sample 代码:
Private Declare Function icePub_getMD5FromString Lib "icePubDll.dll" (ByVal strData As String, ByVal
strResult As String) As Integer
Dim a2 As Integer
Dim buff As String
Dim buff2 As String
buff2="Go with This life Loneliness, carried off Day And Night Dreariness, Between Sun And Moon, Tell
Words from one's heart Each Other."
buff=Space(1024)
a2=icePub_getMD5FromString(buff2,buff)
MsgBox buff
322
----------------------- Page 323-----------------------
3.156icePub_getMD5FromFile
函数原型:
int WINAPI icePub_getMD5FromFile(char *strFilePath,char *strResult)
输入:strFilePath 待MD5 的文件名
输出:strResult MD5 结果串,32 字节
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_getMD5FromFile(char *strFilePath,char *strResult);
动态调用例程
VC sample 代码:
char buff[1024];
typedef int (WINAPI ICEPUB_GETMD5FROMFILE)(char *strFilePath,char *strResult);
ICEPUB_DESDECRYPTIONSTRING *icePub_getMD5FromFile = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_getMD5FromFile=(ICEPUB_DESDECRYPTIONSTRING
*)GetProcAddress(hDLLDrv,"icePub_getMD5FromFile");
}
if(icePub_getMD5FromFile)
icePub_getMD5FromFile("D:\\icePubDLL.dll",buff);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff);
323
----------------------- Page 324-----------------------
VB sample 代码:
Private Declare Function icePub_getMD5FromFile Lib "icePubDll.dll" (ByVal strFilePath As String, ByVal
strResult As String) As Integer
Dim a2 As Integer
Dim buff As String
buff=Space(1024)
a2=icePub_getMD5FromFile("D:\icePubDLL.dll",buff)
MsgBox buff
324
----------------------- Page 325-----------------------
3.157icePub_sha1FromString
函数原型:
int WINAPI icePub_sha1FromString(char *strData,char *strResult)
输入:strData 待处理的文本串
输出:strResult SHA1 结果串,40 字节
返回码:
VC 连接Lib 方式声明
__declspec(dllexport)
int WINAPI icePub_sha1FromString(char *strData,char *strResult);
动态调用例程
VC sample 代码:
char buff[1024];
char buff2[1024];
strcpy(buff2,"Kiss Years's Scar, Strangeness Far Snivel, Between Hart And Head, Cloud And Mist Come And
Go.");
typedef int (WINAPI ICEPUB_SHA1ROMSTRING)(char *strData,char *strResult);
ICEPUB_SHA1ROMSTRING *icePub_sha1FromString = 0;
HINSTANCE hDLLDrv = LoadLibrary("icePubDll.dll");
if(hDLLDrv)
{
icePub_sha1FromString=(ICEPUB_SHA1ROMSTRING
*)GetProcAddress(hDLLDrv,"icePub_sha1FromString");
}
if(icePub_sha1FromString)
icePub_sha1FromString(buff2,buff);
if(hDLLDrv)
FreeLibrary(hDLLDrv);
AfxMessageBox(buff);
325
----------------------- Page 326-----------------------
VB sample 代码:
Private Declare Function icePub_sha1FromString Lib "icePubDll.dll" (ByVal strData As String, ByVal
strResult As String) As Integer
Dim a2 As Integer
Dim buff As String
Dim buff2 As String
buff2="Endure Satanic Curse, Burning Sun Cauterant Enmity, Between Wind And Rain, Anger-blaze Writhe
Cloud."
buff=Space(1024)
a2=icePub_sha1FromString(buff2,buff)
MsgBox buff
326
----------------------- Page 327-----------------------
4. 附录:
4.1 win 操作系统语言代码列表:
"0436"="af;南非语"
"041C"="sq;阿尔巴尼亚语"
"0001"="ar;阿拉伯语"
"0401"="ar-sa;阿拉伯语(沙特阿拉伯)"
"0801"="ar-iq;阿拉伯语(伊拉克)"
"0C01"="ar-eg;阿拉伯语(埃及)"
"1001"="ar-ly;阿拉伯语(利比亚)"
"1401"="ar-dz;阿拉伯语(阿尔及利亚)"
"1801"="ar-ma;阿拉伯语(摩洛哥)"
"1C01"="ar-tn;阿拉伯语(突尼斯)"
"2001"="ar-om;阿拉伯语(阿曼)"
"2401"="ar-ye;阿拉伯语(也门)"
"2801"="ar-sy;阿拉伯语(叙利亚)"
"2C01"="ar-jo;阿拉伯语(约旦)"
"3001"="ar-lb;阿拉伯语(黎巴嫩)"
"3401"="ar-kw;阿拉伯语(科威特)"
"3801"="ar-ae;阿拉伯语(阿联酋)"
"3C01"="ar-bh;阿拉伯语(巴林)"
"4001"="ar-qa;阿拉伯语(卡塔尔)"
"042D"="eu;巴士克语"
"0402"="bg;保加利亚语"
"0423"="be;白俄罗斯语"
"0403"="ca;加泰隆语"
"0004"="zh;中文"
"0404"="zh-tw;中文(台湾)"
"0804"="zh-cn;中文(中国)"
"0C04"="zh-hk;中文(香港特别行政区)"
"1004"="zh-sg;中文(新加坡)"
"041A"="hr;克罗地亚语"
"0405"="cs;捷克语"
"0406"="da;丹麦语"
"0413"="nl;荷兰语(荷兰)"
"0813"="nl-be;荷兰语(比利时)"
"0009"="en;英语"
"0409"="en-us;英语(美国)"
"0809"="en-gb;英语(英国)"
"0C09"="en-au;英语(澳大利亚)"
327
----------------------- Page 328-----------------------
"1009"="en-ca;英语(加拿大)"
"1409"="en-nz;英语(新西兰)"
"1809"="en-ie;英语(爱尔兰)"
"1C09"="en-za;英语(南非)"
"2009"="en-jm;英语(牙买加)"
"2809"="en-bz;英语(伯利兹)"
"2C09"="en-tt;英语(特立尼达)"
"0425"="et;爱沙尼亚语"
"0438"="fo;法罗语"
"0429"="fa;法斯语"
"040B"="fi;芬兰语"
"040C"="fr;法语(法国)"
"080C"="fr-be;法语(比利时)"
"0C0C"="fr-ca;法语(加拿大)"
"100C"="fr-ch;法语(瑞士)"
"140C"="fr-lu;法语(卢森堡)"
"043C"="gd;盖尔语"
"0407"="de;德语(德国)"
"0807"="de-ch;德语(瑞士)"
"0C07"="de-at;德语(奥地利)"
"1007"="de-lu;德语(卢森堡)"
"1407"="de-li;德语(列支敦士登)"
"0408"="el;希腊语"
"040D"="he;希伯来语"
"0439"="hi;印地语"
"040E"="hu;匈牙利语"
"040F"="is;冰岛语"
"0421"="in;印度尼西亚语"
"0410"="it;意大利语(意大利)"
"0810"="it-ch;意大利语(瑞士)"
"0411"="ja;日语"
"0412"="ko;朝鲜语"
"0426"="lv;拉脱维亚语"
"0427"="lt;立陶宛语"
"042F"="mk;FYRO 马其顿语"
"043E"="ms;马来语(马来西亚)"
"043A"="mt;马耳他语"
"0414"="no;挪威语(伯克梅尔)"
"0814"="no;挪威语(尼诺斯克)"
"0415"="pl;波兰语"
"0416"="pt-br;葡萄牙语(巴西)"
"0816"="pt;葡萄牙语(葡萄牙)"
"0417"="rm;列托-罗马语"
"0418"="ro;罗马尼亚语"
"0818"="ro-mo;罗马尼亚语(马尔代夫)"
"0419"="ru;俄语"
"0819"="ru-mo;俄语(马尔代夫)"
328
----------------------- Page 329-----------------------
"0C1A"="sr;塞尔维亚语(西里尔文)"
"081A"="sr;塞尔维亚语(拉丁文)"
"041B"="sk;斯洛伐克语"
"0424"="sl;斯洛文尼亚语"
"042E"="sb;塞尔维亚语"
"040A"="es;西班牙语(传统)"
"080A"="es-mx;西班牙语(墨西哥)"
"0C0A"="es;西班牙语(国际)"
"100A"="es-gt;西班牙语(危地马拉)"
"140A"="es-cr;西班牙语(哥斯达黎加)"
"180A"="es-pa;西班牙语(巴拿马)"
"1C0A"="es-do;西班牙语(多米尼加共和国)"
"200A"="es-ve;西班牙语(委内瑞拉)"
"240A"="es-co;西班牙语(哥伦比亚)"
"280A"="es-pe;西班牙语(秘鲁)"
"2C0A"="es-ar;西班牙语(阿根廷)"
"300A"="es-ec;西班牙语(厄瓜多尔)"
"340A"="es-cl;西班牙语(智利)"
"380A"="es-uy;西班牙语(乌拉圭)"
"3C0A"="es-py;西班牙语(巴拉圭)"
"400A"="es-bo;西班牙语(玻利维亚)"
"440A"="es-sv;西班牙语(萨尔瓦多)"
"480A"="es-hn;西班牙语(洪都拉斯)"
"4C0A"="es-ni;西班牙语(尼加拉瓜)"
"500A"="es-pr;西班牙语(波多黎各)"
"0430"="sx;索托语"
"041D"="sv;瑞典语"
"081D"="sv-fi;瑞典语(芬兰)"
"041E"="th;泰语"
"0431"="ts;聪加语"
"0432"="tn;茨瓦纳语"
"041F"="tr;土耳其语"
"0422"="uk;乌克兰语"
"0420"="ur;乌都语"
"042A"="vi;越南语"
"0434"="xh;科萨语"
"043D"="ji;意第绪语"
"0435"="zu;祖鲁语"
329
----------------------- Page 330-----------------------
4.2 icePubDLL 实际应用程序源代码下载:
iceGetHtml 获得页面代码
http://dl.icese.net/src.php?f=iceGetHtml.src.rar
iceSetup 简易安装程序
http://dl.icese.net/src.php?f=iceSetup.src.rar
qiangda 局域网抢答模拟
http://dl.icese.net/src.php?f=qiangda.src.rar
iceSpeedMail 邮件专递vb 版
http://dl.icese.net/src.php?f=iceSpeedMail.src.rar
iceSendMail 邮件发送vb 版
http://dl.icese.net/src.php?f=iceSendMail.src.rar
iceBase64 base64 编解码
http://dl.icese.net/src.php?f=iceBase64.src.rar
iceChineseBig2GB 简繁互换
http://dl.icese.net/src.php?f=iceChineseBig2GB.src.rar
iceDownloadHtml 有规则链接批量下载
http://dl.icese.net/src.php?f=iceDownloadHtml.src.rar
iceHtmltoCode html 页面scritp 编码
http://dl.icese.net/src.php?f=iceHtmltoCode.src.rar
iceSetSysLanguage 设置win 系统语言身份标识
http://dl.icese.net/src.php?f=iceSetSysLanguage.src.rar
iceIpCheck 查询IP 简单信息小工具
http://dl.icese.net/src.php?f=iceIpCheck.src.rar
iceEncryptText 文本加密解密
http://dl.icese.net/src.php?f=iceEncryptText.src.rar
iceQQ2008Tool qq 消息发送小工具only for QQ2008
http://dl.icese.net/src.php?f=iceqq2008tool.src.rar
baiduzhidao 百度知道问题阅读小工具vb 版
http://dl.icese.net/src.php?f=baiduzhidao.src.rar
330
----------------------- Page 331-----------------------
iceGetColor 获取RGB 颜色值
http://dl.icese.net/src.php?f=iceGetColor.src.rar
iceCloseWindow 关闭窗体小工具
http://dl.icese.net/src.php?f=iceCloseWindow.src.rar
iceAccountmgr 帐号信息管理小工具
http://dl.icese.net/src.php?f=iceAccountmgr.src.rar
iceAddressList 通讯录小工具(由上边略微改造)
http://dl.icese.net/src.php?f=iceAddressList.src.rar
331
----------------------- Page 332-----------------------
4.3 其它一些下载信息:
Visual Basic 6 中文企业版(133M)
http://dl.icese.net/dev.php?f=VisualBasic6.rar
Visual C++ 6 英文企业版集成SP6(135M)
http://dl.icese.net/dev.php?f=VisualC++6EN.rar
Visual C++ 6 中文企业版集成SP6(135M)
http://dl.icese.net/dev.php?f=VisualC++6CN .rar
Visual C++ 6 中文/英文企业版集成SP6 Visual Basic 6 中文企业版 yue 之专合集(219M)
http://dl.icese.net/dev.php?f=vs98.yue2.rar
以上版本精心制作,绝对好用
332
----------------------- Page 333-----------------------
4.4 光天化日估妄评之:
鲜花+鸡蛋 Please send to: icepubdll@gmail.com
鸡蛋+西红柿 Please send to:饭桌
cloud
哗众取宠,骗了多少MM 了„
meteor:
受益匪浅,请继续更新,创新,革新,我会持续刷新的„
linux_king:
好东西!真正大虾的作品,值得研究!更何况这是一只不耻被下问的大虾„
龙芯发烧友
我要最新的icePubDLL.lib 文件,我不要动态调用„
mmx/coffee
icePubDLL 是谁写的?里边的好东东貌似贼多„
vb 苍梧
汗,月光牌DLL 还有这功能„
水水
搞这么多DLL 干嘛?还icePubDLL„
阿辉
编程者之宝,简化了编程的代码,许多功能在实现上用一个函数就可以解决了!
jove
写得不错,除了产品功能描述以外;前言写得不错有大师风范,后面的东西基本上不知所云„
Juney
写得还不错,就是看不懂„
shark
靠,我要木马„
tangtang
真假啊„都是好的,没坏的„
stellahung
大杂烩啊,鸡肋了,只用其中少部分功能„
333
----------------------- Page 334-----------------------
gh0716
很好,但是我不想附带一个“icePubDll.dll”啊„
□stephen
月光有点犀利的,不过„
メ枫信子メ
ice 开发API 绝密文档,太给力了。
皮皮蟹
牛B,发财了„
明月
老师又出大作了„
紫金香
吹,太吹,简直吹,月是小吹„
名字啊我没名字
文档很详细,很强大,已收藏,以后应该能用到„
百度文库某管理员
未通过原因:文章内容水平太低„
334
----------------------- Page 335-----------------------
没啦,真的,不骗你„
335
----------------------- Page 336-----------------------
骗谁?。
336
发表评论