BHO中存取网页IPersist
Function GetHTML() As String
Dim oPI As IPersistStreamInit
Dim oPM As IPersistMemory
Dim mem() As String
Dim cbSize As Long
Set oPI = IE.Document
oPI.Save oPM, False
cbSize = oPM.GetSizeMax
ReDim mem(cbSize)
MsgBox cbSize
oPM.Save mem(0), False, cbSize
Set oPM = Nothing
ReDim mem(0)
End Function
上面这个代码出错,DELPHI版的我有
Function GetHTML2() As String ''''这个可以正常使用
Dim oPF As IPersistFile
Set oPF = IE.Document
oPF.Save "c:\1.htm", False
Set oPF = Nothing
End Function
上面这个可以,但是保存到文件了,我只想在内存中.....
[解决办法]
Function GetHTML2() As String
GetHTML2 = IE.Document.body.innerHTML
End Function
[解决办法]
各位,麻烦打断一下,问个问题
Dim oPF As IPersistFile
这个要引用什么东西才可以运行?