十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
先声明一个委托:
目前成都创新互联公司已为千余家的企业提供了网站建设、域名、虚拟空间、网站托管维护、企业网站设计、吕梁网站维护等服务,公司将坚持客户导向、应用为本的策略,正道将秉承"和谐、参与、激情"的文化,与客户和合作伙伴齐心协力一起成长,共同发展。
Public Delegate Function EnumChildProc(hwnd As Integer, iParam As Integer) As Integer
然后才能使用回调函数,回调函数的参数要和委托完全一致。
然后那个 API 函数需要这样声明:
Declare Function EnumChildWindows Lib "user32" (hWndParent As Integer, lpEnumFunc As EnumChildProc, lParam As Integer) As Integer
Dim file1 As FileStream
filename = "c:\temp\MyTest.txt"
Dim GetData(4) As Byte, s(4) As Char
file1 = System.IO.File.OpenRead(filename)
Dim CMGs As Long
Dim DPBo As Long
Dim i As Integer = 0, j As Integer
While file1.Read(GetData, 0, 5) 0
i = i + 1
For j = 0 To 4
s(j) = ChrW(GetData(j))
Next
If s = "CMG=""" Then CMGs = i
If s = "[Host" Then DPBo = i - 2 : Exit While
End While
主要是vb点虐 取消了定长字符串, 所以用字节数组读入, 还得转成字符数组来比较.
把代码输入到vb点虐 里面,可以转。就像word2003文档用word2007文挡打开,再保存为2007格式一样。