问题和改进在此更新。
补充模块。
教程下载:
CHINAAVG FTP资源内…
水品有限…所以东西自然也有限,高手自觉略过吧…..
教程补充:
这个只是一个demo而已..还有太多地方该去改进,这个活交给聪明的你了。 本来还有一个小工具的,可是呢,受限于信用问题,已经投稿便不能发了。。。 操作文件C是王道,但是使用其他工具也没有问题的,甚至是轻量脚本php 如果你也用VB6或者VBNET可以考虑FSO,[其实和GET PUT一样的] 例子中没有告诉大家要注意资源的使用,比如初始化[虽然我有做]和 注销使用了的变量,我放到程序结束的时候了。 程序中没有检验传入数据,请注意,那个提取我检验过了,所以就删除掉了, 那个indexB,的范围改成图片的数量就可以了,估计是手误吧… 前面几个字符的处理其实也简单,不停的更换前面的那个头部结构声明,然后读取 看看能和什么匹配就好,或者你就跟踪程序操作文件吧,在读取文件的API处下断 我去学习了,所以去踩博客吧~呵呵~
Option Explicit
Private Declare Function OpenFile _
Lib "kernel32" (ByVal lpFileName As String, _
lpReOpenBuff As OFSTRUCT, _
ByVal wStyle As Long) As Long
Private Type OFSTRUCT
cBytes As Byte
fFixedDisk As Byte
nErrCode As Integer
Reserved1 As Integer
Reserved2 As Integer
szPathName(128) As Byte
End Type
Public Function FileExist(strFilePath As String) As Boolean
Dim lngResult As Long
Dim strucFname As OFSTRUCT
lngResult = OpenFile(strFilePath, strucFname, &H4000)
If lngResult = -1 Then
FileExist = False
Else
FileExist = True
End If
End Function
Option Explicit
Private Declare Function CreateDirectory _
Lib "kernel32" _
Alias "CreateDirectoryA" (ByVal lpPathName As String, _
lpSecurityAttributes As SECURITY_ATTRIBUTES) As Long
Private Type SECURITY_ATTRIBUTES
nLength As Long
lpSecurityDescriptor As Long
bInheritHandle As Long
End Type
Public Sub CreateNewDirectory(NewDirectory As String)
Dim sDirTest As String
Dim SecAttrib As SECURITY_ATTRIBUTES
Dim bSuccess As Boolean
Dim sPath As String
Dim iCounter As Integer
Dim sTempDir As String
Dim iFlag As Integer
iFlag = 0
sPath = NewDirectory
If Right(sPath, Len(sPath)) <> "" Then
sPath = sPath & ""
End If
iCounter = 1
Do Until InStr(iCounter, sPath, "") = 0
iCounter = InStr(iCounter, sPath, "")
sTempDir = Left(sPath, iCounter)
sDirTest = Dir(sTempDir)
iCounter = iCounter + 1
SecAttrib.lpSecurityDescriptor = &O0
SecAttrib.bInheritHandle = False
SecAttrib.nLength = Len(SecAttrib)
bSuccess = CreateDirectory(sTempDir, SecAttrib)
Loop
End Sub