如何在vb6中调用dll导出功能? CallWindowProc在参数中有所限制。 在示例中如何调用此功能?
app_id date
1 d1
2 d4
3 d7
4 d9
答案 0 :(得分:1)
这些定义是从pinvoke.net复制的,并修改了vb6的变量类型。
我还没有测试过这段代码。
Const INTERNET_OPEN_TYPE_PRECONFIG = 0 ' use registry configuration
Const INTERNET_OPEN_TYPE_DIRECT = 1 ' direct to net
Const INTERNET_OPEN_TYPE_PROXY = 3 ' via named proxy
Const INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY = 4 ' prevent using java/script/INS
Declare Function InternetOpen Lib "wininet.dll" Alias "InternetOpenA" ( _
ByVal sAgent As String, _
ByVal lAccessType As Long, _
ByVal sProxyName As String, _
ByVal sProxyBypass As String, _
ByVal lFlags As Long) As Long
用法:
Dim hInet As Long
hInet = InternetOpen("HttpAgent", INTERNET_OPEN_TYPE_PRECONFIG, _
"", "", 0)
If hInet = 0 Then
'Return or handle a False return status
End If