分析教程内有QQ邮件 已经过期
+ I; x% ?4 ~- g( B) n4 Q, G- V等FTP好了我再上传
9 o# n0 N/ h9 @/ e7 x) k, O0 k5 s/ E: O1 Z
9 ]/ u0 H4 y5 q
上传完毕; M$ u0 s8 a! ^- T/ `; v3 L
ftp好像上传了看不到下载目录..或许我的账号有误吧
% z; p- U4 o% e! l# z
' X- U \' g1 W' z写了那么久,值得鼓励一下吧~回帖吧~5 K' Y/ ?: ]% v
0 E; U+ D# e- G刚刚发完就给下载了...不回帖支持~不厚道么~内附解包代码
% k1 Z% Y& z+ C4 u, F: B: |
; o' r6 A# c- P& k% d3 C! w0 k8 b/ W m" ^2 x
0 x, J7 c. Z. P* z6 E4 w/ o, E T3 ?; m5 J$ M8 i
9 S' _$ O* v1 ^9 U+ u; r
* ~3 q. i E2 Z$ v[strike]QQmail上传ing...[/strike]: ~' d+ F' h( ], |: L
* w+ x. p# Q+ H2 z# S% Q- Z. S" p
教程分上下,A是准备工作和废话/ D; \" y" [1 n
B是废话+操作" q* m3 e# b6 c. d* ?/ ~
% @8 S9 R( E* a5 ~: X9 a; }水品有限...所以东西自然也有限,高手自觉略过吧.....; o' k ~" S7 d) I) L- g9 d1 @
4 ?; u/ V5 V0 o
主要代码拷贝到这里了,那个俺学习的时候,给我踩踩blog..., {) Y' w2 ]. P; Q8 Y- s
# D+ g1 [5 d9 F5 G* j2 u教程补充: ' h$ `9 g/ k: B; n; J# _
这个只是一个demo而已..还有太多地方该去改进,这个活交给聪明的你了。 2 B) i6 b5 j: J& G5 b( O% y
本来还有一个小工具的,可是呢,受限于信用问题,已经投稿便不能发了。。。
/ W: @- e& i4 Q c操作文件C是王道,但是使用其他工具也没有问题的,甚至是轻量脚本php/ x4 X" i6 ~. k# q5 A5 B0 t5 x
如果你也用VB6或者VBNET可以考虑FSO,[其实和GET PUT一样的]. I0 ^/ i- W( w4 D$ V) v
例子中没有告诉大家要注意资源的使用,比如初始化[虽然我有做]和% \8 [# K* z/ F& H* |
注销使用了的变量,我放到程序结束的时候了。
' d9 W! Y9 U& _+ B! h+ F程序中没有检验传入数据,请注意,那个提取我检验过了,所以就删除掉了,+ Q5 e$ I9 u! X# ~4 t- ]- m
那个indexB,的范围改成图片的数量就可以了,估计是手误吧...
+ r" f ], ]; J, | 前面几个字符的处理其实也简单,不停的更换前面的那个头部结构声明,然后读取
! T0 h' q7 d& q) W' \ g* Q看看能和什么匹配就好,或者你就跟踪程序操作文件吧,在读取文件的API处下断+ D5 J; e* g6 @# Q5 e, i( y
我去学习了,所以去踩博客吧~呵呵~- h& f, E2 n6 {/ o
- Private Sub FirUnPack2()
- Dim strPathLen As Integer
- Dim strPathChar() As String * 1
- Dim strResPath As String
- Dim intSize As Integer
- Dim bData() As Byte
- Dim lngSize As Long
- Dim strFilePath As String
- Dim tmpStep As Single, lngIndex As Long, lngFileNumA As Long, lngFileNumB As Long
- strFilePath = App.Path & "\test.adv"
- lngFileNumA = FreeFile
- tmpStep = &HC + 1
- Dim lngIndexB As Long
- Open strFilePath For Binary As #lngFileNumA
-
- For lngIndexB = 0 To 1064
- Get #lngFileNumA, tmpStep, strPathLen
- ReDim strPathChar(1 To strPathLen)
- tmpStep = tmpStep + 4
- Get #lngFileNumA, tmpStep, strPathChar()
- strResPath = ""
- For lngIndex = 1 To strPathLen
- strResPath = strResPath & strPathChar(lngIndex)
- Next
-
- tmpStep = tmpStep + Len(strResPath) + 2
- Get #lngFileNumA, tmpStep, intSize
-
- If intSize = 0 Then
- tmpStep = tmpStep - 2
- Get #lngFileNumA, tmpStep, intSize
-
- If intSize < 0 Then
- lngSize = 65536 + intSize
- ReDim bData(1 To lngSize)
- tmpStep = tmpStep + 4
- Get #lngFileNumA, tmpStep, bData()
-
- tmpStep = tmpStep + lngSize
-
- Else
-
- ReDim bData(1 To intSize)
- tmpStep = tmpStep + 4
- Get #lngFileNumA, tmpStep, bData()
-
- tmpStep = tmpStep + intSize
-
- End If
- Else
- tmpStep = tmpStep - 2
- Get #lngFileNumA, tmpStep, lngSize
- ReDim bData(1 To lngSize)
- tmpStep = tmpStep + 4
- Get #lngFileNumA, tmpStep, bData()
- tmpStep = tmpStep + lngSize
- End If
-
- lngFileNumB = FreeFile
- CreateNewDirectory (Mid$(strResPath, 1, InStrRev(strResPath, "\")))
- strFilePath = strResPath
- Open strFilePath For Binary As #lngFileNumB
- Put #lngFileNumB, 1, bData()
- Close #lngFileNumB
- Next lngIndexB
- Close #lngFileNumA
- End Sub
复制代码 [/hide] |