必威注册电子书籍教程中心网文荟萃客户留言繁體中文
设为首页
加入收藏
联系必威注册
您当前的位置:92动力网 -> 教程中心 -> 编程经验 -> Visual Basic -> 教程内容 退出登录 用户管理
栏目导航
· Visual Basic· Delphi
· Visual C++· C++ Builder
· JAVA DotNet· 其他相关
热门教程
· 如何在Visual Basic...
· 使用Visual Basic操...
· 使用VB6.0设计Activ...
· VB动态调用外部函数...
· 建立一个程序员自己...
· 如何编写高质量的VB...
· [图文] 为更新到Visual Bas...
· 再谈在VB中调用VC++...
· 用VB语言编程实现JP...
· 用DTS实现SQL数据库...
相关教程
· vb调用winInet API接...
· 使用WinInet编写发送...
· [组图] 光盘镜像文件DIY--W...
· [组图] WinImage的 新功能
· [图文] 利用Win98自带的Win...

WININET.DLL中所有的函数
作者:佚名聽聽来源:cyh.blog.edu.cn聽聽发布时间:2005-12-25 18:56:47聽聽发布人:admin

减小字体 增大字体

forward
global type n_cst_wininet from nonvisualobject
end type
end forward

type FileTime from structure
ulong LowDateTime
ulong HighDateTime
end type

type WIN32_FIND_DATA from structure
unsignedlong fileattributes
filetime creationtime
filetime lastaccesstime
filetime lastwritetime
unsignedlong filesizehigh
unsignedlong filesizelow
unsignedlong reserved0
unsignedlong reserved1
character filename[260]
character alternatefilename[14]
end type

global type n_cst_wininet from nonvisualobject autoinstantiate
end type

type prototypes
Function boolean InternetAutodial (ulong dwFlags, ulong hWndParent) Library "WININET.DLL"
Function boolean InternetAutodialHangup (ulong dwReserved) Library "WININET.DLL"
Function boolean InternetCloseHandle (ulong hInternet) Library "WININET.DLL"
Function ulong InternetConnect (ulong hInternet, ref string lpszServerName, long nServerPort, ref string lpszUserName, ref string lpszPassword, ulong dwService, ulong dwFlags, ref ulong dwContext) Library "WININET.DLL" Alias for "InternetConnectA"
Function ulong InternetDial (ulong hWndParent, ref string lpszConnectoid, ulong dwFlags, ref ulong lpdwConnection, ulong dwReserved) Library "WININET.DLL"
Function ulong InternetGetConnectedState (ref ulong lpdwFlags, ulong dwReserved) Library "WININET.DLL"
Function ulong InternetGetLastResponseInfo (ref ulong lpdwError, ref string lpszBuffer, ref ulong lpdwBufferLength) Library "WININET.DLL" Alias for "InternetGetLastResponseInfoA"
Function ulong InternetHangUp (ulong dwConnection, ulong dwReserved) Library "WININET.DLL"
Function ulong InternetOpen (ref string lpszAgent, ulong dwAccessType, ref string lpszProxy, ref string lpszProxyBypass, ulong dwFlags) Library "WININET.DLL" Alias for "InternetOpenA"
Function ulong InternetQueryDataAvailable (ulong hFile, ref ulong lpdwNumberOfBytesAvailable, ulong dwFlags, ulong dwContext) Library "WININET.DLL"
Function boolean InternetSetOption (ulong hInternet, ulong dwOption,ref string lpBuffer, ulong dwBufferLength) Library "WININET.DLL" Alias for "InternetSetOptionA"
Function ulong InternetOpenUrl (ulong hInternet, ref string lpszUrl, ref string lpszHeaders, ulong dwHeadersLength, ulong dwFlags, ref ulong dwContext) Library "WININET.DLL" Alias for "InternetOpenUrlA"
Function ulong InternetReadFile (ulong hFile, ref string lpBuffer, ulong dwNumberOfBytesToRead, ref ulong lpdwNumberOfBytesRead) Library "WININET.DLL"
Function ulong FtpFindFirstFile (ulong hConnect, ref string lpszSearchFile, ref WIN32_FIND_DATA lpFindFileData, ulong dwFlags, ref ulong dwContext) Library "WININET.DLL" Alias for "FtpFindFirstFileA"
Function boolean FtpGetFile (ulong hConnect, ref string lpszRemoteFile, ref string lpszNewFile, boolean fFailIfExists, ulong dwFlagsAndAttributes, ulong dwFlags, ref ulong dwContext) Library "WININET.DLL" Alias for "FtpGetFileA"
Function boolean FtpPutFile (ulong hConnect, ref string lpszLocalFile, ref string lpszNewRemoteFile, ulong dwFlags, ref ulong dwContext) Library "WININET.DLL" Alias for "FtpPutFileA"
Function boolean FtpDeleteFile (ulong hConnect, ref string lpszFileName) Library "WININET.DLL" Alias for "FtpDeleteFileA"
Function boolean FtpRenameFile (ulong hConnect, ref string lpszExisting, ref string lpszNew) Library "WININET.DLL" Alias for "FtpRenameFileA"
Function ulong FtpOpenFile (ulong hConnect, ref string lpszFileName, ulong dwAccess, ulong dwFlags, ref ulong dwContext) Library "WININET.DLL" Alias for "FtpOpenFileA"
Function boolean FtpCreateDirectory (ulong hConnect, ref string lpszDirectory) Library "WININET.DLL" Alias for "FtpCreateDirectoryA"
Function boolean FtpRemoveDirectory (ulong hConnect, ref string lpszDirectory) Library "WININET.DLL" Alias for "FtpRemoveDirectoryA"
Function boolean FtpSetCurrentDirectory (ulong hConnect, ref string lpszDirectory) Library "WININET.DLL" Alias for "FtpSetCurrentDirectoryA"
Function boolean FtpGetCurrentDirectory (ulong hConnect, ref string lpszCurrentDirectory, ref ulong lpdwCurrentDirectory) Library "WININET.DLL" Alias for "FtpGetCurrentDirectoryA"
Function boolean FtpCommand (ulong hConnect, boolean fExpectResponse, ulong dwFlags, ref string lpszCommand, ref ulong dwContex, ref ulong phFtpCommand) Library "WININET.DLL" Alias for "FtpCommandA"
Function boolean InternetFindNextFile (ulong hFind, ref WIN32_FIND_DATA lpvFindData) Library "WININET.DLL" Alias for "InternetFindNextFileA"
Function ulong HttpOpenRequest (ulong hConnect, ref string lpszVerb, ref string lpszObjectName, ref string lpszVersion, ref string lpszReferrer, ref string lplpszAcceptTypes[], ulong dwFlags, ref ulong dwContext) Library "WININET.DLL" Alias for "HttpOpenRequestA"
Function ulong HttpSendRequest (ulong hRequest, ref string lpszHeaders, ulong dwHeadersLength, ref string lpOptional, ulong dwOptionalLength) Library "WININET.DLL" Alias for "HttpSendRequestA"

end prototypes


type variables
Public:

// Internet connection flags
CONSTANT uint CONNECTION_MODEM = 1
CONSTANT uint CONNECTION_LAN = 2
CONSTANT uint CONNECTION_PROXY = 4
CONSTANT uint CONNECTION_MODEM_BUSY = 8
CONSTANT ulong INTERNET_FLAG_ASYNC = 268435456
CONSTANT ulong INTERNET_FLAG_SECURE = 8388608

// Internet auto-dial flags
CONSTANT uint AUTODIAL_FORCE_ONLINE = 1
CONSTANT uint AUTODIAL_FORCE_UNATTENDED = 2
CONSTANT uint AUTODIAL_FAILIFSECURITYCHECK = 4

// Internet dial flags
CONSTANT uint INTERNET_DIAL_UNATTENDED = 32768

// Internet open flags
CONSTANT uint INTERNET_OPEN_TYPE_PRECONFIG = 0
CONSTANT uint INTERNET_OPEN_TYPE_DIRECT = 1
CONSTANT uint INTERNET_OPEN_TYPE_GATEWAY = 2
CONSTANT uint INTERNET_OPEN_TYPE_PROXY = 3

// Ports
CONSTANT uint INTERNET_INVALID_PORT_NUMBER = 0
CONSTANT uint INTERNET_DEFAULT_FTP_PORT = 21
CONSTANT uint INTERNET_DEFAULT_GOPHER_PORT = 70
CONSTANT uint INTERNET_DEFAULT_HTTP_PORT = 80
CONSTANT uint INTERNET_DEFAULT_HTTPS_PORT = 443
CONSTANT uint INTERNET_DEFAULT_SOCKS_PORT = 1080

// Service/Command types
CONSTANT uint INTERNET_SERVICE_FTP = 1
CONSTANT uint INTERNET_SERVICE_GOPHER = 2
CONSTANT uint INTERNET_SERVICE_HTTP = 3

// Internet flags
CONSTANT ulong INTERNET_FLAG_RELOAD = 2147483648
CONSTANT ulong INTERNET_FLAG_NO_CACJE_WRITE = 67108864
CONSTANT ulong INTERNET_FLAG_RAW_DATA = 1073741824

// protocol-specific flags:
constant ulong INTERNET_FLAG_PASSIVE = 134217728 // used for FTP connections

CONSTANT ulong FTP_TRANSFER_TYPE_UNKNOWN = 0
CONSTANT ulong FTP_TRANSFER_TYPE_ASCII = 1
CONSTANT ulong FTP_TRANSFER_TYPE_BINARY = 2
CONSTANT ulong FTP_TRANSFER_TYPE_MASK = 3

// Error messages
CONSTANT uint ERROR_NO_MORE_FILES = 18
CONSTANT uint INTERNET_ERROR_BASE = 12000
CONSTANT uint ERROR_INTERNET_OUT_OF_HANDLES = (INTERNET_ERROR_BASE + 1)
CONSTANT uint ERROR_INTERNET_TIMEOUT = (INTERNET_ERROR_BASE + 2)
CONSTANT uint ERROR_INTERNET_EXTENDED_ERROR = (INTERNET_ERROR_BASE + 3)
CONSTANT uint ERROR_INTERNET_INTERNAL_ERROR = (INTERNET_ERROR_BASE + 4)
CONSTANT uint ERROR_INTERNET_INVALID_URL = (INTERNET_ERROR_BASE + 5)
CONSTANT uint ERROR_INTERNET_UNRECOGNIZED_SCHEME = (INTERNET_ERROR_BASE + 6)
CONSTANT uint ERROR_INTERNET_NAME_NOT_RESOLVED = (INTERNET_ERROR_BASE + 7)
CONSTANT uint ERROR_INTERNET_PROTOCOL_NOT_FOUND = (INTERNET_ERROR_BASE + 8)
CONSTANT uint ERROR_INTERNET_INVALID_OPTION = (INTERNET_ERROR_BASE + 9)
CONSTANT uint ERROR_INTERNET_BAD_OPTION_LENGTH = (INTERNET_ERROR_BASE + 10)
CONSTANT uint ERROR_INTERNET_OPTION_NOT_SETTABLE = (INTERNET_ERROR_BASE + 11)
CONSTANT uint ERROR_INTERNET_SHUTDOWN = (INTERNET_ERROR_BASE + 12)
CONSTANT uint ERROR_INTERNET_INCORRECT_USER_NAME = (INTERNET_ERROR_BASE + 13)
CONSTANT uint ERROR_INTERNET_INCORRECT_PASSWORD = (INTERNET_ERROR_BASE + 14)
CONSTANT uint ERROR_INTERNET_LOGIN_FAILURE = (INTERNET_ERROR_BASE + 15)
CONSTANT uint ERROR_INTERNET_INVALID_OPERATION = (INTERNET_ERROR_BASE + 16)
CONSTANT uint ERROR_INTERNET_OPERATION_CANCELLED = (INTERNET_ERROR_BASE + 17)
CONSTANT uint ERROR_INTERNET_INCORRECT_HANDLE_TYPE = (INTERNET_ERROR_BASE + 18)
CONSTANT uint ERROR_INTERNET_INCORRECT_HANDLE_STATE = (INTERNET_ERROR_BASE + 19)
CONSTANT uint ERROR_INTERNET_NOT_PROXY_REQUEST = (INTERNET_ERROR_BASE + 20)
CONSTANT uint ERROR_INTERNET_REGISTRY_VALUE_NOT_FOUND = (INTERNET_ERROR_BASE + 21)
CONSTANT uint ERROR_INTERNET_BAD_REGISTRY_PARAMETER = (INTERNET_ERROR_BASE + 22)
CONSTANT uint ERROR_INTERNET_NO_DIRECT_ACCESS = (INTERNET_ERROR_BASE + 23)
CONSTANT uint ERROR_INTERNET_NO_CONTEXT = (INTERNET_ERROR_BASE + 24)
CONSTANT uint ERROR_INTERNET_NO_CALLBACK = (INTERNET_ERROR_BASE + 25)
CONSTANT uint ERROR_INTERNET_REQUEST_PENDING = (INTERNET_ERROR_BASE + 26)
CONSTANT uint ERROR_INTERNET_INCORRECT_FORMAT = (INTERNET_ERROR_BASE + 27)
CONSTANT uint ERROR_INTERNET_ITEM_NOT_FOUND = (INTERNET_ERROR_BASE + 28)
CONSTANT uint ERROR_INTERNET_CANNOT_CONNECT = (INTERNET_ERROR_BASE + 29)
CONSTANT uint ERROR_INTERNET_CONNECTION_ABORTED = (INTERNET_ERROR_BASE + 30)
CONSTANT uint ERROR_INTERNET_CONNECTION_RESET = (INTERNET_ERROR_BASE + 31)
CONSTANT uint ERROR_INTERNET_FORCE_RETRY = (INTERNET_ERROR_BASE + 32)
CONSTANT uint ERROR_INTERNET_INVALID_PROXY_REQUEST = (INTERNET_ERROR_BASE + 33)
CONSTANT uint ERROR_INTERNET_NEED_UI = (INTERNET_ERROR_BASE + 34)
CONSTANT uint ERROR_INTERNET_HANDLE_EXISTS = (INTERNET_ERROR_BASE + 36)
CONSTANT uint ERROR_INTERNET_SEC_CERT_DATE_INVALID = (INTERNET_ERROR_BASE + 37)
CONSTANT uint ERROR_INTERNET_SEC_CERT_CN_INVALID = (INTERNET_ERROR_BASE + 38)
CONSTANT uint ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR = (INTERNET_ERROR_BASE + 39)
CONSTANT uint ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR = (INTERNET_ERROR_BASE + 40)
CONSTANT uint ERROR_INTERNET_MIXED_SECURITY = (INTERNET_ERROR_BASE + 41)
CONSTANT uint ERROR_INTERNET_CHG_POST_IS_NON_SECURE = (INTERNET_ERROR_BASE + 42)
CONSTANT uint ERROR_INTERNET_POST_IS_NON_SECURE = (INTERNET_ERROR_BASE + 43)
CONSTANT uint ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED = (INTERNET_ERROR_BASE + 44)
CONSTANT uint ERROR_INTERNET_INVALID_CA = (INTERNET_ERROR_BASE + 45)
CONSTANT uint ERROR_INTERNET_CLIENT_AUTH_NOT_SETUP = (INTERNET_ERROR_BASE + 46)
CONSTANT uint ERROR_INTERNET_ASYNC_THREAD_FAILED = (INTERNET_ERROR_BASE + 47)
CONSTANT uint ERROR_INTERNET_REDIRECT_SCHEME_CHANGE = (INTERNET_ERROR_BASE + 48)
CONSTANT uint ERROR_INTERNET_DIALOG_PENDING = (INTERNET_ERROR_BASE + 49)
CONSTANT uint ERROR_INTERNET_RETRY_DIALOG = (INTERNET_ERROR_BASE + 50)
CONSTANT uint ERROR_INTERNET_HTTPS_HTTP_SUBMIT_REDIR = (INTERNET_ERROR_BASE + 52)
CONSTANT uint ERROR_INTERNET_INSERT_CDROM = (INTERNET_ERROR_BASE + 53)
CONSTANT uint ERROR_FTP_TRANSFER_IN_PROGRESS = (INTERNET_ERROR_BASE + 110)
CONSTANT uint ERROR_FTP_DROPPED = (INTERNET_ERROR_BASE + 111)
CONSTANT uint ERROR_FTP_NO_PASSIVE_MODE = (INTERNET_ERROR_BASE + 112)
CONSTANT uint ERROR_GOPHER_PROTOCOL_ERROR = (INTERNET_ERROR_BASE + 130)
CONSTANT uint ERROR_GOPHER_NOT_FILE = (INTERNET_ERROR_BASE + 131)
CONSTANT uint ERROR_GOPHER_DATA_ERROR = (INTERNET_ERROR_BASE + 132)
CONSTANT uint ERROR_GOPHER_END_OF_DATA = (INTERNET_ERROR_BASE + 133)
CONSTANT uint ERROR_GOPHER_INVALID_LOCATOR = (INTERNET_ERROR_BASE + 134)
CONSTANT uint ERROR_GOPHER_INCORRECT_LOCATOR_TYPE = (INTERNET_ERROR_BASE + 135)
CONSTANT uint ERROR_GOPHER_NOT_GOPHER_PLUS = (INTERNET_ERROR_BASE + 136)
CONSTANT uint ERROR_GOPHER_ATTRIBUTE_NOT_FOUND = (INTERNET_ERROR_BASE + 137)
CONSTANT uint ERROR_GOPHER_UNKNOWN_LOCATOR = (INTERNET_ERROR_BASE + 138)
CONSTANT uint ERROR_HTTP_HEADER_NOT_FOUND = (INTERNET_ERROR_BASE + 150)
CONSTANT uint ERROR_HTTP_DOWNLEVEL_SERVER = (INTERNET_ERROR_BASE + 151)
CONSTANT uint ERROR_HTTP_INVALID_SERVER_RESPONSE = (INTERNET_ERROR_BASE + 152)
CONSTANT uint ERROR_HTTP_INVALID_HEADER = (INTERNET_ERROR_BASE + 153)
CONSTANT uint ERROR_HTTP_INVALID_QUERY_REQUEST = (INTERNET_ERROR_BASE + 154)
CONSTANT uint ERROR_HTTP_HEADER_ALREADY_EXISTS = (INTERNET_ERROR_BASE + 155)
CONSTANT uint ERROR_HTTP_REDIRECT_FAILED = (INTERNET_ERROR_BASE + 156)
CONSTANT uint ERROR_HTTP_NOT_REDIRECTED = (INTERNET_ERROR_BASE + 160)
CONSTANT uint ERROR_HTTP_COOKIE_NEEDS_CONFIRMATION = (INTERNET_ERROR_BASE + 161)
CONSTANT uint ERROR_HTTP_COOKIE_DECLINED = (INTERNET_ERROR_BASE + 162)
CONSTANT uint ERROR_HTTP_REDIRECT_NEEDS_CONFIRMATION = (INTERNET_ERROR_BASE + 168)
CONSTANT uint ERROR_INTERNET_SECURITY_CHANNEL_ERROR = (INTERNET_ERROR_BASE + 157)
CONSTANT uint ERROR_INTERNET_UNABLE_TO_CACHE_FILE = (INTERNET_ERROR_BASE + 158)
CONSTANT uint ERROR_INTERNET_TCPIP_NOT_INSTALLED = (INTERNET_ERROR_BASE + 159)
CONSTANT uint ERROR_INTERNET_DISCONNECTED = (INTERNET_ERROR_BASE + 163)
CONSTANT uint ERROR_INTERNET_SERVER_UNREACHABLE = (INTERNET_ERROR_BASE + 164)
CONSTANT uint ERROR_INTERNET_PROXY_SERVER_UNREACHABLE = (INTERNET_ERROR_BASE + 165)
CONSTANT uint ERROR_INTERNET_BAD_AUTO_PROXY_SCRIPT = (INTERNET_ERROR_BASE + 166)
CONSTANT uint ERROR_INTERNET_UNABLE_TO_DOWNLOAD_SCRIPT = (INTERNET_ERROR_BASE + 167)
CONSTANT uint ERROR_INTERNET_SEC_INVALID_CERT = (INTERNET_ERROR_BASE + 169)
CONSTANT uint ERROR_INTERNET_SEC_CERT_REVOKED = (INTERNET_ERROR_BASE + 170)
CONSTANT uint ERROR_INTERNET_FAILED_DUETOSECURITYCHECK = (INTERNET_ERROR_BASE + 171)
CONSTANT uint INTERNET_ERROR_LAST = ERROR_INTERNET_FAILED_DUETOSECURITYCHECK

end variables

on n_cst_wininet.create
TriggerEvent( this, "constructor" )
end on

on n_cst_wininet.destroy
TriggerEvent( this, "destructor" )
end on
[] [返回上一页] [打 印] [收 藏]
下一篇教程:VB6使用API下载文件
∷相关教程评论∷    (评论内容只代表网友观点,与本站立场无关!) [更多评论...]
关于本站 - 网站帮助 - 广告合作 - 下载声明 - 网站地图 - 管理登录
Copyright 2019 必威注册. All Rights Reserved .
浙ICP备05047688号