elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Entrar al Canal Oficial Telegram de elhacker.net


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  .NET (C#, VB.NET, ASP)
| | | |-+  Programación Visual Basic (Moderadores: LeandroA, seba123neo)
| | | | |-+  Declaraciones de WinInet
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Declaraciones de WinInet  (Leído 3,999 veces)
Slasher-K


Desconectado Desconectado

Mensajes: 1.477


Ver Perfil
Declaraciones de WinInet
« en: 3 Septiembre 2005, 04:16 am »

Ya que estamos con los módulos pongo las declaraciones de la API de WinInet, ya que son muy útiles para el manejo de cookies, historial, opciones de internet, bajar archivos, etc, etc, etc.

Código:
Option Explicit

'Funciones de WININET.DLL
'
Declare Function CommitUrlCacheEntry Lib "wininet" Alias "CommitUrlCacheEntryA" (ByVal lpszUrlName As String, ByVal lpszLocalFileName As String, ExpireTime As FILETIME, LastModifiedTime As FILETIME, ByVal CacheEntryType As Long, ByVal lpHeaderInfo As Byte, ByVal dwHeaderSize As Long, ByVal lpszFileExtension As String, ByVal dwReserved As Long) As Long
Declare Function CreateUrlCacheEntry Lib "wininet" Alias "CreateUrlCacheEntryA" (ByVal lpszUrlName As String, ByVal dwExpectedFileSize As Long, ByVal lpszFileExtension As String, ByVal lpszFileName As String, ByVal dwReserved As Long) As Long
Declare Function CreateUrlCacheGroup Lib "wininet" (ByVal dwFlags As Long, lpReserved As Any) As Long
Declare Function DeleteUrlCacheEntry Lib "wininet" Alias "DeleteUrlCacheEntryA" (ByVal lpszUrlName As String) As Long
Declare Function DeleteUrlCacheGroup Lib "wininet" (ByVal GroupID As Long, ByVal dwFlags As Long, lpReserved As Any) As Long
Declare Function FindCloseUrlCache Lib "wininet" (ByVal hEnumHandle As Long) As Long
Declare Function FindFirstUrlCacheEntry Lib "wininet" Alias "FindFirstUrlCacheEntryA" (ByVal lpszUrlSearchPattern As String, lpFirstCacheEntryInfo As INTERNET_CACHE_ENTRY_INFO, ByVal lpdwFirstCacheEntryInfoBufferSize As Long) As Long
Declare Function FindFirstUrlCacheEntryEx Lib "wininet" Alias "FindFirstUrlCacheEntryExA" (ByVal lpszUrlSearchPattern As String, ByVal dwFlags As Long, ByVal dwFilter As Long, ByVal GroupID As Long, lpFirstCacheEntryInfo As INTERNET_CACHE_ENTRY_INFO, ByVal lpdwFirstCacheEntryInfoBufferSize As Long, lpGroupAttributes As Any, ByVal pcbGroupAttributes As Long, lpReserved As Any) As Long
Declare Function FindNextUrlCacheEntry Lib "wininet" Alias "FindNextUrlCacheEntryA" (ByVal hEnumHandle As Long, lpNextCacheEntryInfo As INTERNET_CACHE_ENTRY_INFO, ByVal lpdwNextCacheEntryInfoBufferSize As Long) As Long
Declare Function FindNextUrlCacheEntryEx Lib "wininet" Alias "FindNextUrlCacheEntryExA" (ByVal hEnumHandle As Long, lpFirstCacheEntryInfo As INTERNET_CACHE_ENTRY_INFO, ByVal lpdwFirstCacheEntryInfoBufferSize As Long, lpGroupAttributes As Any, pcbGroupAttributes As Long, lpReserved As Any) As Long

Declare Function FtpCommand Lib "wininet" Alias "FtpCommandA" (ByVal hFtpConnect As Long, ByVal fExpectResponse As Long, ByVal dwFlag As Long, ByVal lpszCommand As String, ByVal dwContext As Long) As Long
Declare Function FtpCreateDirectory Lib "wininet" Alias "FtpCreateDirectoryA" (ByVal hFTPSession As Long, ByVal lpszDirectory As String) As Long
Declare Function FtpDeleteFile Lib "wininet" Alias "FtpDeleteFileA" (ByVal hFTPSession As Long, ByVal lpszFileName As String) As Long
Declare Function FtpFindFirstFile Lib "wininet" Alias "FtpFindFirstFileA" (ByVal hFTPSession As Long, ByVal lpszSearchFile As String, lpFindFileData As WIN32_FIND_DATA, ByVal dwFlags As Long, ByVal dwContext As Long) As Long
Declare Function FtpGetCurrentDirectory Lib "wininet" Alias "FtpGetCurrentDirectoryA" (ByVal hFTPSession As Long, ByVal lpszCurrentDirectory As String, ByVal lpdwCurrentDirectory As Long) As Long
Declare Function FtpGetFile Lib "wininet" Alias "FtpGetFileA" (ByVal hFTPSession As Long, ByVal lpszRemoteFile As String, ByVal lpszNewFile As String, ByVal fFailIfExists As Long, ByVal dwLocalFlagsAndAttributes As Long, ByVal dwInternetFlags As Long, ByVal dwContext As Long) As Long
Declare Function FtpOpenFile Lib "wininet" Alias "FtpOpenFileA" (ByVal hFTPSession As Long, ByVal lpszFileName As String, ByVal fdwAccess As Long, ByVal dwFlags As Long, ByVal dwContext As Long) As Long
Declare Function FtpPutFile Lib "wininwt" Alias "FtpPutFileA" (ByVal hFTPSession As Long, ByVal lpszLocalFile As String, ByVal lpszNewRemoteFile As String, ByVal dwFlags As Long, ByVal dwContext As Long) As Long
Declare Function FtpRemoveDirectory Lib "wininet" Alias "FtpRemoveDirectoryA" (ByVal hFTPSession As Long, ByVal lpszDirectory As String) As Long
Declare Function FtpRenameFile Lib "wininet" Alias "FtpRenameFileA" (ByVal hFTPSession As Long, ByVal lpszExisting As String, ByVal lpszNew As String) As Long
Declare Function FtpSetCurrentDirectory Lib "wininet" Alias "FtpSetCurrentDirectoryA" (ByVal hFTPSession As Long, ByVal lpszDirectory As String) As Long

Declare Function GetUrlCacheEntryInfo Lib "wininet" Alias "GetUrlCacheEntryInfoA" (ByVal lpszUrlName As String, lpCacheEntryInfo As INTERNET_CACHE_ENTRY_INFO, ByVal lpdwCacheEntryInfoBufferSize As Long) As Long
Declare Function GetUrlCacheEntryInfoEx Lib "wininet" Alias "GetUrlCacheEntryInfoExA" (ByVal lpszUrlName As String, lpCacheEntryInfo As INTERNET_CACHE_ENTRY_INFO, ByVal lpdwCacheEntryInfoBufferSize As Long, ByVal lpszReserved As String, ByVal lpdwReserved As Long, lpReserved As Any, ByVal dwFlags As Long) As Long

Declare Function GopherCreateLocator Lib "wininet" Alias "GopherCreateLocatorA" (ByVal lpszHost As String, ByVal nServerPort As Integer, ByVal lpszDisplayString As String, ByVal lpszSelectorString As String, ByVal dwGopherType As Long, ByVal lpszLocator As String, ByVal lpdwBufferLength As Long) As Long
Declare Function GopherFindFirstFile Lib "wininet" Alias "GopherFindFirstFileA" (ByVal hGopherSession As Long, ByVal lpszLocator As String, ByVal lpszSearchString As String, lpFindData As GOPHER_FIND_DATA, ByVal dwFlags As Long, ByVal dwContext As Long)
Declare Function GopherGetAttribute Lib "wininet" Alias "GopherGetAttributeA" (ByVal hGopherSession As Long, ByVal lpszLocator As String, ByVal lpszAttributeName As String, ByVal lpBuffer As Byte, ByVal dwBufferLength As Long, ByVal lpdwCharactersReturned As Long, ByVal lpfnEnumerator As Long, ByVal dwContext As Long) As Long
Declare Function GopherGetLocatorType Lib "wininet" Alias "GopherGetLocatorTypeA" (ByVal lpszLocator As String, ByVal lpdwGopherType As Long) As Long
Declare Function GopherOpenFile Lib "wininet" Alias "GopherOpenFileA" (ByVal hGopherSession As Long, ByVal lpszLocator As String, ByVal lpszView As String, ByVal dwFlags As Long, ByVal dwContext As Long) As Long

Declare Function HttpAddRequestHeaders Lib "wininet" Alias "HttpAddRequestHeadersA" (ByVal hHttpRequest As Long, ByVal lpszHeaders As String, ByVal dwHeadersLength As Long, ByVal dwModifiers As Long) As Long
Declare Function HttpEndRequest Lib "wininet" Alias "HttpEndRequestA" (ByVal hRequest As Long, lpBuffersOut As INTERNET_BUFFERS, ByVal dwFlags As Long, ByVal dwContext As Long) As Long
Declare Function HttpOpenRequest Lib "wininet" Alias "HttpOpenRequestA" (ByVal hHttpSession As Long, ByVal lpszVerb As String, ByVal lpszObjectName As String, ByVal lpszVersion As String, ByVal lpszReferer As String, lpszAcceptTypes() As String, ByVal dwFlags As Long, ByVal dwContext As Long) As Long
Declare Function HttpQueryInfo Lib "wininet" Alias "HttpQueryInfoA" (ByVal hHttpRequest As Long, ByVal dwInfoLevel As Long, lpvBuffer As Any, ByVal lpdwBufferLength As Long, ByVal lpdwIndex As Long) As Long
Declare Function HttpSendRequest Lib "wininet" Alias "HttpSendRequestA" (ByVal hHttpRequest As Long, ByVal lpszHeaders As String, ByVal dwHeadersLength As Long, lpOptional As Any, ByVal dwOptionalLength As Long) As Long
Declare Function HttpSendRequestEx Lib "wininet" Alias "HttpSendRequestExA" (ByVal hRequest As Long, lpBuffersIn As INTERNET_BUFFERS, lpBuffersOut As INTERNET_BUFFERS, ByVal dwFlags As Long, ByVal dwContext As Long) As Long

Declare Function InternetAttemptConnect Lib "wininet" Alias "" (ByVal dwReserved As Long) As Long
Declare Function InternetAutodial Lib "wininet" Alias "" (ByVal dwFlags As Long, ByVal dwReserved As Long) As Long
Declare Function InternetAutodialHangup Lib "wininet" Alias "" (ByVal dwReserved As Long) As Long
Declare Function InternetCanonicalizeUrl Lib "wininet" Alias "InternetCanonicalizeUrlA" (ByVal lpszUrl As String, ByVal lpszBuffer As String, ByVal lpdwBufferLength As Long, ByVal dwFlags As Long) As Long
Declare Function InternetCheckConnection Lib "wininet" Alias "InternetCheckConnectionA" (ByVal lpszUrl As String, ByVal dwFlags As Long, ByVal dwReserved As Long)
Declare Function InternetCloseHandle Lib "wininet" (ByVal hInet As Long) As Long
Declare Function InternetCombineUrl Lib "wininet" Alias "InternetCombineUrlA" (ByVal lpszBaseUrl As String, ByVal lpszRelativeUrl As String, ByVal lpszBuffer As String, lpdwBufferLength As Long, ByVal dwFlags As Long) As Long
Declare Function InternetConfirmZoneCrossing Lib "wininet" Alias "InternetConfirmZoneCrossingA" (ByVal hWnd As Long, ByVal szUrlPrev As String, ByVal szUrlNew As Long, ByVal bPost As Boolean) As Long
Declare Function InternetConnect Lib "wininet" Alias "InternetConnectA" (ByVal hInternetSession As Long, ByVal lpszServerName As String, ByVal nServerPort As Long, ByVal lpszUsername As String, ByVal lpszPassword As String, ByVal dwService As Long, ByVal dwFlags As Long, ByVal dwContext As Long)
Declare Function InternetCrackUrl Lib "wininet" Alias "InternetCrackUrlA" (ByVal lpszUrl As String, ByVal dwUrlLength As Long, ByVal dwFlags As Long, lpUrlComponents As URL_COMPONENTS)
Declare Function InternetCreateUrl Lib "wininet" Alias "InternetCreateUrlA" (lpUrlComponents As URL_COMPONENTS, ByVal dwFlags As Long, ByVal lpszUrl As String, ByVal lpdwUrlLength As Long) As Long
Declare Function InternetDial Lib "wininet" Alias "InternetDialA" (ByVal hwndParent As Long, ByVal lpszConnectoid As String, ByVal dwFlags As Long, ByVal lpdwConnection As Long, ByVal dwReserved As Long) As Long
Declare Function InternetErrorDlg Lib "wininet" (ByVal hWnd As Long, ByVal hInternet As Long, ByVal dwError As Long, ByVal dwFlags As Long, lppvData As Any) As Long
Declare Function InternetFindNextFile Lib "wininet" Alias "InternetFindNextFileA" (ByVal hFind As Long, lpvFindData As Any) As Long
Declare Function InternetGetConnectedState Lib "wininet" (ByVal lpdwFlags As Long, ByVal dwReserved As Long) As Long
Declare Function InternetGetCookie Lib "wininet" Alias "InternetGetCookieA" (ByVal lpszUrlName As String, ByVal lpszCookieName As String, ByVal lpszCookieData As String, ByVal lpdwSize As Long) As Long
Declare Function InternetGetLastResponseInfo Lib "wininet" Alias "InternetGetLastResponseInfoA" (ByVal lpdwError As Long, ByVal lpszBuffer As String, ByVal lpdwBufferLength As Long) As Long
Declare Function InternetGoOnline Lib "wininet" Alias "InternetGoOnlineA" (ByVal lpszUrl As String, ByVal hwndParent As Long, ByVal dwReserved As Long) As Long
Declare Function InternetHangUp Lib "wininet" (ByVal dwConnection As Long, ByVal dwReserved As Long) As Long
Declare Function InternetLockRequestFile Lib "wininet" (ByVal hInternet As Long, lphLockReqHandle As Long)
Declare Function InternetOpen Lib "wininet" Alias "InternetOpenA" (ByVal lpszAgent As String, ByVal dwAccessType As Long, ByVal lpszProxyName As String, ByVal lpszProxyBypass As String, ByVal dwFlags As Long) As Long
Declare Function InternetOpenUrl Lib "wininet" Alias "InternetOpenUrlA" (ByVal hInternetSession As Long, ByVal lpszUrl As String, ByVal lpszHeaders As String, ByVal dwHeadersLength As Long, ByVal dwFlags As Long, ByVal dwContext As Long) As Long
Declare Function InternetQueryDataAvailable Lib "wininet" (ByVal hFile As Long, lpdwNumberOfBytesAvailable As Long, ByVal dwFlags As Long, ByVal dwContext As Long) As Long
Declare Function InternetQueryOption Lib "wininet" Alias "InternetQueryOptionA" (ByVal hInternet As Long, ByVal dwOption As Long, ByVal lpBuffer As String, ByVal lpdwBufferLength As Long) As Long
Declare Function InternetReadFile Lib "wininet" Alias "InternetReadFileA" (ByVal hFile As Long, lpBuffer As Any, ByVal dwNumberOfBytesToRead As Long, lpNumberOfBytesRead As Long) As Long
Declare Function InternetReadFileEx Lib "wininet" Alias "InternetReadFileExA" (ByVal hFile As Long, lpBuffersOut As INTERNET_BUFFERS, ByVal dwFlags As Long, ByVal dwContext As Long) As Long
Declare Function InternetSetCookie Lib "wininet" Alias "InternetSetCookieA" (ByVal lpszUrlName As String, ByVal lpszCookieName As String, ByVal lpszCookieData As Long) As Long
Declare Function InternetSetDialState Lib "wininet" Alias "InternetSetDialStateA" (ByVal lpszConnectoid As String, ByVal dwState As Long, ByVal dwReserved As Long) As Long
Declare Function InternetSetFilePointer Lib "wininet" (ByVal hFile As Long, ByVal lDistanceToMove As Long, pReserved As Any, ByVal dwMoveMethod As Long, ByVal dwContext As Long) As Long
Declare Function InternetSetOption Lib "wininet" Alias "InternetSetOptionA" (ByVal hInternet As Long, ByVal dwOption As Long, ByVal lpBuffer As Long, ByVal dwBufferLength As Long) As Long
Declare Function InternetSetStatusCallback Lib "wininet" Alias "InternetSetStatusCallbackA" (ByVal hInternet As Long, ByVal lpfnInternetCallback As Long) As Long
Declare Function InternetTimeFromSystemTime Lib "wininet" Alias "InternetTimeFromSystemTimeA" (pst As SystemTime, ByVal dwRFC As Long, ByVal lpszTime As String, ByVal cbTime As Long) As Long
Declare Function InternetUnlockRequestFile Lib "wininet" Alias "" (ByVal hLockHandle As Long) As Long
Declare Function InternetWriteFile Lib "wininet" (ByVal hFile As Long, lpBuffer As Any, ByVal dwNumberOfBytesToWrite As Long, ByVal lpdwNumberOfBytesWritten As Long) As Long

Declare Function ReadUrlCacheEntryStream Lib "wininet" (ByVal hUrlCacheStream As Long, ByVal dwLocation As Long, lpBuffer As Any, lpdwLen As Long, ByVal dwReserved As Long) As Long
Declare Function RetrieveUrlCacheEntryFile Lib "wininet" Alias "RetrieveUrlCacheEntryFileA" (ByVal lpszUrlName As String, lpCacheEntryInfo As INTERNET_CACHE_ENTRY_INFO, ByVal lpdwCacheEntryInfoBufferSize As Long, ByVal dwReserved As Long) As Long
Declare Function RetrieveUrlCacheEntryStream Lib "wininet" Alias "RetrieveUrlCacheEntryStreamA" (ByVal lpszUrlName As String, lpCacheEntryInfo As INTERNET_CACHE_ENTRY_INFO, ByVal lpdwCacheEntryInfoBufferSize As Long, ByVal fRandomRead As Boolean, ByVal dwReserved As Long) As Long
Declare Function SetUrlCacheEntryGroup Lib "wininet" Alias "SetUrlCacheEntryGroupA" (ByVal lpszUrlName As String, ByVal dwFlags As Long, ByVal GroupID As Long, ByVal pbGroupAttributes As Byte, ByVal cbGroupAttributes As Long, lpReserved As Any) As Long
Declare Function SetUrlCacheEntryInfo Lib "wininet" Alias "SetUrlCacheEntryInfoA" (ByVal lpszUrlName As String, lpCacheEntryInfo As INTERNET_CACHE_ENTRY_INFO, ByVal dwFieldControl As Long) As Long
Declare Function UnlockUrlCacheEntryFile Lib "wininet" Alias "UnlockUrlCacheEntryFileA" (ByVal lpszUrlName As String, ByVal dwReserved As Long) As Long
Declare Function UnlockUrlCacheEntryStream Lib "wininet" (ByVal hUrlCacheStream As Long, ByVal dwReserved As Long) As Long


Public Const INTERNET_OPEN_TYPE_PRECONFIG = 0      'indicates to use config info from registry
Public Const INTERNET_OPEN_TYPE_DIRECT = 1         'direct to net
Public Const INTERNET_OPEN_TYPE_PROXY = 3          'via named proxy

Public Const INTERNET_FLAG_EXISITING_CONNECT = &H20000000
Public Const INTERNET_FLAG_RELOAD = &H80000000   ' read from wire even if locally cached

'Opciones adicionales
Public Const INTERNET_FLAG_SECURE = &H800000    'use PCT/SSL if applicable (HTTP)
Public Const INTERNET_FLAG_KEEP_CONNECTION = &H400000   'use keep-alive semantics
Public Const INTERNET_FLAG_NO_AUTO_REDIRECT = &H200000     'don't handle redirections automatically
Public Const INTERNET_FLAG_READ_PREFETCH = &H100000        'do background read prefetch
Public Const INTERNET_FLAG_NO_COOKIES = &H80000    'no automatic cookie handling
Public Const INTERNET_FLAG_NO_AUTH = &H40000    'no automatic authentication handling

'Opciones del cache
Public Const INTERNET_FLAG_MUST_CACHE_REQUEST = &H10    'fails if unable to cache request
Public Const INTERNET_FLAG_RESYNCHRONIZE = &H800        'asking wininet to update an item if it is newer

'Opciones de seguridad
Public Const INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP = &H8000       'ex: https:// to http://
Public Const INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS = &H4000      'ex: http:// to https://
Public Const INTERNET_FLAG_IGNORE_CERT_DATE_INVALID = &H2000      'expired X509 Cert.
Public Const INTERNET_FLAG_IGNORE_CERT_CN_INVALID = &H1000        'bad common name in X509 Cert.

Public Const INTERNET_FLAG_NO_CACHE_WRITE = &H4000000   'don't write this item to the cache
Public Const INTERNET_FLAG_DONT_CACHE = INTERNET_FLAG_NO_CACHE_WRITE
Public Const INTERNET_FLAG_MAKE_PERSISTENT = &H2000000      'make this item persistent in cache

'Longitud máxima de campos
Public Const INTERNET_MAX_HOST_NAME_LENGTH = 256
Public Const INTERNET_MAX_USER_NAME_LENGTH = 128
Public Const INTERNET_MAX_PASSWORD_LENGTH = 128
Public Const INTERNET_MAX_PORT_NUMBER_LENGTH = 5    'INTERNET_PORT is unsigned short
Public Const INTERNET_MAX_PORT_NUMBER_VALUE = 65535     'maximum unsigned short value
Public Const INTERNET_MAX_PATH_LENGTH = 2048
Public Const INTERNET_MAX_PROTOCOL_NAME = "gopher"  'longest protocol name
Public Const INTERNET_MAX_URL_LENGTH = (6 - 1 + 3 + INTERNET_MAX_PATH_LENGTH)   '6=Len(INTERNET_MAX_PROTOCOL_NAME); 3=Len("://")

'Para FTP
Public Const FTP_TRANSFER_TYPE_UNKNOWN = &H0
Public Const FTP_TRANSFER_TYPE_ASCII = &H1
Public Const FTP_TRANSFER_TYPE_BINARY = &H2

Public Const INTERNET_FLAG_TRANSFER_ASCII = FTP_TRANSFER_TYPE_ASCII
Public Const INTERNET_FLAG_TRANSFER_BINARY = FTP_TRANSFER_TYPE_BINARY

Public Const FTP_TRANSFER_TYPE_MASK = (FTP_TRANSFER_TYPE_ASCII Or FTP_TRANSFER_TYPE_BINARY)

'Para Gopher
'Tipo de datos
Public Const GOPHER_TYPE_TEXT_FILE = &H1    'Archivo de texto
Public Const GOPHER_TYPE_DIRECTORY = &H2    'Directorio
Public Const GOPHER_TYPE_CSO = &H4          'Servidor de libreta de direcciones CSO
Public Const GOPHER_TYPE_ERROR = &H8        'Indicador de error
Public Const GOPHER_TYPE_MAC_BINHEX = &H10  'Archivo Macintosh en formato BINHEX
Public Const GOPHER_TYPE_DOS_ARCHIVE = &H20     'Archivo de MS-DOS
Public Const GOPHER_TYPE_UNIX_UUENCODED = &H40  'Archivo UUENCODED
Public Const GOPHER_TYPE_INDEX_SERVER = &H80    'Servidor de indices
Public Const GOPHER_TYPE_TELNET = &H100     'Servidor Telnet
Public Const GOPHER_TYPE_BINARY = &H200     'Archivo binario
Public Const GOPHER_TYPE_REDUNDANT = &H400  'Indica que es un duplicado del servidor
Public Const GOPHER_TYPE_TN3270 = &H800     'Servidor TN3270
Public Const GOPHER_TYPE_GIF = &H1000       'Archivo de imagen GIF
Public Const GOPHER_TYPE_IMAGE = &H2000     'Archivo de imagen
Public Const GOPHER_TYPE_BITMAP = &H4000    'Archivo de mapa de bits
Public Const GOPHER_TYPE_MOVIE = &H8000     'Archivo de película
Public Const GOPHER_TYPE_SOUND = &H10000    'Archivo de sonido
Public Const GOPHER_TYPE_HTML = &H20000     'Documento HTML
Public Const GOPHER_TYPE_PDF = &H40000      'Archivo PDF
Public Const GOPHER_TYPE_CALENDAR = &H80000     'Archivo de calendario
Public Const GOPHER_TYPE_INLINE = &H100000      'Archivo Inline
Public Const GOPHER_TYPE_UNKNOWN = &H20000000   'Elemento desconocido
Public Const GOPHER_TYPE_ASK = &H40000000       'Ask+ Item
Public Const GOPHER_TYPE_GOPHER_PLUS = &H80000000   'Gopher+ Item

Public Const MAX_GOPHER_DISPLAY_TEXT = 128
Public Const MAX_GOPHER_SELECTOR_TEXT = 256
Public Const MAX_GOPHER_HOST_NAME = INTERNET_MAX_HOST_NAME_LENGTH
Public Const MAX_GOPHER_LOCATOR_LENGTH = (1 + MAX_GOPHER_DISPLAY_TEXT + 1 + MAX_GOPHER_SELECTOR_TEXT + 1 + MAX_GOPHER_HOST_NAME + 1 + INTERNET_MAX_PORT_NUMBER_LENGTH + 1 + 1 + 2)

'Para HTTP
Public Const HTTP_QUERY_MIME_VERSION = 0
Public Const HTTP_QUERY_CONTENT_TYPE = 1
Public Const HTTP_QUERY_CONTENT_TRANSFER_ENCODING = 2
Public Const HTTP_QUERY_CONTENT_ID = 3
Public Const HTTP_QUERY_CONTENT_DESCRIPTION = 4
Public Const HTTP_QUERY_CONTENT_LENGTH = 5
Public Const HTTP_QUERY_CONTENT_LANGUAGE = 6
Public Const HTTP_QUERY_ALLOW = 7
Public Const HTTP_QUERY_PUBLIC = 8
Public Const HTTP_QUERY_DATE = 9
Public Const HTTP_QUERY_EXPIRES = 10
Public Const HTTP_QUERY_LAST_MODIFIED = 11
Public Const HTTP_QUERY_MESSAGE_ID = 12
Public Const HTTP_QUERY_URI = 13
Public Const HTTP_QUERY_DERIVED_FROM = 14
Public Const HTTP_QUERY_COST = 15
Public Const HTTP_QUERY_LINK = 16
Public Const HTTP_QUERY_PRAGMA = 17
Public Const HTTP_QUERY_VERSION = 18                        'special: part of status line
Public Const HTTP_QUERY_STATUS_CODE = 19                    'special: part of status line
Public Const HTTP_QUERY_STATUS_TEXT = 20                    'special: part of status line
Public Const HTTP_QUERY_RAW_HEADERS = 21                    'special: all headers as ASCIIZ
Public Const HTTP_QUERY_RAW_HEADERS_CRLF = 22               'special: all headers
Public Const HTTP_QUERY_CONNECTION = 23
Public Const HTTP_QUERY_ACCEPT = 24
Public Const HTTP_QUERY_ACCEPT_CHARSET = 25
Public Const HTTP_QUERY_ACCEPT_ENCODING = 26
Public Const HTTP_QUERY_ACCEPT_LANGUAGE = 27
Public Const HTTP_QUERY_AUTHORIZATION = 28
Public Const HTTP_QUERY_CONTENT_ENCODING = 29
Public Const HTTP_QUERY_FORWARDED = 30
Public Const HTTP_QUERY_FROM = 31
Public Const HTTP_QUERY_IF_MODIFIED_SINCE = 32
Public Const HTTP_QUERY_LOCATION = 33
Public Const HTTP_QUERY_ORIG_URI = 34
Public Const HTTP_QUERY_REFERER = 35
Public Const HTTP_QUERY_RETRY_AFTER = 36
Public Const HTTP_QUERY_SERVER = 37
Public Const HTTP_QUERY_TITLE = 38
Public Const HTTP_QUERY_USER_AGENT = 39
Public Const HTTP_QUERY_WWW_AUTHENTICATE = 40
Public Const HTTP_QUERY_PROXY_AUTHENTICATE = 41
Public Const HTTP_QUERY_ACCEPT_RANGES = 42
Public Const HTTP_QUERY_SET_COOKIE = 43
Public Const HTTP_QUERY_COOKIE = 44
Public Const HTTP_QUERY_REQUEST_METHOD = 45                 'special: GET/POST etc.
Public Const HTTP_QUERY_MAX = 45
Public Const HTTP_QUERY_CUSTOM = 65535
Public Const HTTP_QUERY_FLAG_REQUEST_HEADERS = &H80000000
Public Const HTTP_QUERY_FLAG_SYSTEMTIME = &H40000000
Public Const HTTP_QUERY_FLAG_NUMBER = &H20000000
Public Const HTTP_QUERY_FLAG_COALESCE = &H10000000

'Servidores de Internet
Public Const INTERNET_SERVICE_FTP = 1
Public Const INTERNET_SERVICE_GOPHER = 2
Public Const INTERNET_SERVICE_HTTP = 3

'Indicadores para InternetQueryOption e InternetSetOption
Public Const INTERNET_OPTION_CALLBACK = 1
Public Const INTERNET_OPTION_CONNECT_TIMEOUT = 2
Public Const INTERNET_OPTION_CONNECT_RETRIES = 3
Public Const INTERNET_OPTION_CONNECT_BACKOFF = 4
Public Const INTERNET_OPTION_SEND_TIMEOUT = 5
Public Const INTERNET_OPTION_CONTROL_SEND_TIMEOUT = INTERNET_OPTION_SEND_TIMEOUT
Public Const INTERNET_OPTION_RECEIVE_TIMEOUT = 6
Public Const INTERNET_OPTION_CONTROL_RECEIVE_TIMEOUT = INTERNET_OPTION_RECEIVE_TIMEOUT
Public Const INTERNET_OPTION_DATA_SEND_TIMEOUT = 7
Public Const INTERNET_OPTION_DATA_RECEIVE_TIMEOUT = 8
Public Const INTERNET_OPTION_HANDLE_TYPE = 9
Public Const INTERNET_OPTION_CONTEXT_VALUE = 10

Public Const INTERNET_OPTION_READ_BUFFER_SIZE = 12
Public Const INTERNET_OPTION_WRITE_BUFFER_SIZE = 13

Public Const INTERNET_OPTION_ASYNC_ID = 15
Public Const INTERNET_OPTION_ASYNC_PRIORITY = 16

Public Const INTERNET_OPTION_PARENT_HANDLE = 21
Public Const INTERNET_OPTION_KEEP_CONNECTION = 22
Public Const INTERNET_OPTION_REQUEST_FLAGS = 23
Public Const INTERNET_OPTION_EXTENDED_ERROR = 24

Public Const INTERNET_OPTION_OFFLINE_MODE = 26
Public Const INTERNET_OPTION_CACHE_STREAM_HANDLE = 27
Public Const INTERNET_OPTION_USERNAME = 28
Public Const INTERNET_OPTION_PASSWORD = 29
Public Const INTERNET_OPTION_ASYNC = 30
Public Const INTERNET_OPTION_SECURITY_FLAGS = 31
Public Const INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT = 32
Public Const INTERNET_OPTION_DATAFILE_NAME = 33
Public Const INTERNET_OPTION_URL = 34
Public Const INTERNET_OPTION_SECURITY_CERTIFICATE = 35
Public Const INTERNET_OPTION_SECURITY_KEY_BITNESS = 36
Public Const INTERNET_OPTION_REFRESH = 37
Public Const INTERNET_OPTION_PROXY = 38
Public Const INTERNET_OPTION_SETTINGS_CHANGED = 39
Public Const INTERNET_OPTION_VERSION = 40

'Estados de la conexión
Public Const INTERNET_STATUS_RESOLVING_NAME = 10
Public Const INTERNET_STATUS_NAME_RESOLVED = 11
Public Const INTERNET_STATUS_CONNECTING_TO_SERVER = 20
Public Const INTERNET_STATUS_CONNECTED_TO_SERVER = 21
Public Const INTERNET_STATUS_SENDING_REQUEST = 30
Public Const INTERNET_STATUS_REQUEST_SENT = 31
Public Const INTERNET_STATUS_RECEIVING_RESPONSE = 40
Public Const INTERNET_STATUS_RESPONSE_RECEIVED = 41
Public Const INTERNET_STATUS_CTL_RESPONSE_RECEIVED = 42
Public Const INTERNET_STATUS_PREFETCH = 43
Public Const INTERNET_STATUS_CLOSING_CONNECTION = 50
Public Const INTERNET_STATUS_CONNECTION_CLOSED = 51
Public Const INTERNET_STATUS_HANDLE_CREATED = 60
Public Const INTERNET_STATUS_HANDLE_CLOSING = 70
Public Const INTERNET_STATUS_REQUEST_COMPLETE = 100
Public Const INTERNET_STATUS_REDIRECT = 110

'Puertos estandard
Public Const INTERNET_DEFAULT_FTP_PORT = 21               'default for FTP servers
Public Const INTERNET_DEFAULT_GOPHER_PORT = 70            '    "     "  gopher "
Public Const INTERNET_DEFAULT_HTTP_PORT = 80              '    "     "  HTTP   "
Public Const INTERNET_DEFAULT_HTTPS_PORT = 443            '    "     "  HTTPS  "
Public Const INTERNET_DEFAULT_SOCKS_PORT = 1080           'default for SOCKS firewall servers.

'Modos de acceso a los archivos
Public Const GENERIC_READ = &H80000000
Public Const GENERIC_WRITE = &H40000000

'Posiciones en el archivo
Public Const FILE_BEGIN = 0
Public Const FILE_CURRENT = 1
Public Const FILE_END = 2

Public Const MAX_PATH = 260

Public Type FILETIME
  dwLowDateTime   As Long
  dwHighDateTime  As Long
End Type

Public Type SystemTime
  wYear         As Integer
  wMonth        As Integer
  wDayOfWeek    As Integer
  wDay          As Integer
  wHour         As Integer
  wMinute       As Integer
  wSecond       As Integer
  wMilliseconds As Integer
End Type

Public Type INTERNET_CACHE_ENTRY_INFO_UNION
  dwReserved    As Long
  dwExemptDelta As Long
End Type

Public Type INTERNET_CACHE_ENTRY_INFO
  dwStructSize      As Long    'Tamaño, en bytes de la estructura
  lpszSourceUrlName As String 'Dirección URL
  lpszLocalFileName As String 'Nombre del archivo local
  CacheEntryType    As Long
  dwUseCount        As Long  'Cuenta del usuario actual de la entrada del cache
  dwHitRate         As Long   'Numero de veces que la entrada del cache fue recuperada
  dwSizeLow         As Long
  dwSizeHigh        As Long
  LastModifiedTime  As FILETIME
  ExpireTime        As FILETIME
  LastAccessTime    As FILETIME
  LastSyncTime      As FILETIME
  lpHeaderInfo      As Byte    'Dirección del búfer que contiene la información del encabezado
  dwHeaderInfoSize  As Long    'Tamaño del búfer de lpHeaderInfo
  lpszFileExtension As String
  Union             As INTERNET_CACHE_ENTRY_INFO_UNION
End Type

Public Type WIN32_FIND_DATA
  dwFileAttributes  As Long
  ftCreationTime    As FILETIME
  ftLastAccessTime  As FILETIME
  ftLastWriteTime   As FILETIME
  nFileSizeHigh     As Long
  nFileSizeLow      As Long
  dwReserved0       As Long
  dwReserved1       As Long
  cFileName         As String * MAX_PATH
  cAlternate        As String * 14
End Type

Public Type GOPHER_FIND_DATA
  DisplayString(MAX_GOPHER_DISPLAY_TEXT + 1) As Byte
  GopherType            As Long
  SizeLow               As Long
  SizeHigh              As Long
  LastModificationTime  As FILETIME
  Locator(MAX_GOPHER_LOCATOR_LENGTH + 1) As Byte
End Type

Public Type GOPHER_ADMIN_ATTRIBUTE_TYPE
  Comment       As String
  EmailAddress  As String
End Type

Public Type GOPHER_SCORE_ATTRIBUTE_TYPE
  Score As Integer
End Type

Public Type GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE
  LowerBound As Integer
  UpperBound As Integer
End Type

Public Type GOPHER_SITE_ATTRIBUTE_TYPE
  Site As String
End Type

Public Type GOPHER_ORGANIZATION_ATTRIBUTE_TYPE
  Organization As String
End Type

Public Type GOPHER_LOCATION_ATTRIBUTE_TYPE
  Location As String
End Type

Public Type GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE
  DegreesNorth  As Integer
  MinutesNorth  As Integer
  SecondsNorth  As Integer
  DegreesEast   As Integer
  MinutesEast   As Integer
  SecondsEast   As Integer
End Type

Public Type GOPHER_TIMEZONE_ATTRIBUTE_TYPE
  Zone As Integer
End Type

Public Type GOPHER_PROVIDER_ATTRIBUTE_TYPE
  Provider As String
End Type

Public Type GOPHER_VERSION_ATTRIBUTE_TYPE
  Version As String
End Type

Public Type GOPHER_ABSTRACT_ATTRIBUTE_TYPE
  ShortAbstract As String
  AbstractFile  As String
End Type

Public Type GOPHER_VIEW_ATTRIBUTE_TYPE
  ContentType As String
  Language    As String
  Size        As Long
End Type

Public Type GOPHER_VERONICA_ATTRIBUTE_TYPE
  TreeWalk As Long
End Type

Public Type GOPHER_ASK_ATTRIBUTE_TYPE
  QuestionType As String
  QuestionText As String
End Type

Public Type GOPHER_UNKNOWN_ATTRIBUTE_TYPE
  Text As String
End Type

Public Type GOPHER_ATTRIBUTE_TYPE_UNION
  Admin                 As GOPHER_ADMIN_ATTRIBUTE_TYPE
  ModDate               As FILETIME
  Score                 As GOPHER_SCORE_ATTRIBUTE_TYPE
  ScoreRange            As GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE
  Site                  As GOPHER_SITE_ATTRIBUTE_TYPE
  Organization          As GOPHER_ORGANIZATION_ATTRIBUTE_TYPE
  Location              As GOPHER_LOCATION_ATTRIBUTE_TYPE
  GeographicalLocation  As GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE
  TimeZone              As GOPHER_TIMEZONE_ATTRIBUTE_TYPE
  Provider              As GOPHER_PROVIDER_ATTRIBUTE_TYPE
  Version               As GOPHER_VERSION_ATTRIBUTE_TYPE
  Abstract              As GOPHER_ABSTRACT_ATTRIBUTE_TYPE
  View                  As GOPHER_VIEW_ATTRIBUTE_TYPE
  Veronica              As GOPHER_VERONICA_ATTRIBUTE_TYPE
  Ask                   As GOPHER_ASK_ATTRIBUTE_TYPE
  Unknown               As GOPHER_UNKNOWN_ATTRIBUTE_TYPE
End Type

Public Type GOPHER_ATTRIBUTE_TYPE
  CategoryId    As Long
  AttributeId   As Long
  AttributeType As GOPHER_ATTRIBUTE_TYPE_UNION
End Type

Public Type INTERNET_BUFFERS
  dwStructSize    As Long
  Next            As Long      'Dirección del siguiente INTERNET_BUFFERS
  lpcszHeader     As String    'Cadena que contiene los encabezados
  dwHeadersLength As Long      'Tamaño de los encabezados si lpcszHeader no es Nulo
  dwHeadersTotal  As Long      'Tamaño total de los encabezados si no hay suficiente memoria en lpcszHeader
  lpvBuffer       As Variant   'Búfer de datos
  dwBufferLength  As Long      'Tamaño de lpvBuffer si lpvBuffer no es Nulo
  dwBufferTotal   As Long
  dwOffsetLow     As Long      'Usado para leer rangos
  dwOffsetHigh    As Long      'Usado para leer rangos
End Type

Public Type URL_COMPONENTS
  dwStructSize      As Long
  lpszScheme        As String
  dwSchemeLength    As Long
  nScheme           As Integer
  lpszHostName      As String
  dwHostNameLength  As Long
  nPort             As Integer
  lpszUsername      As String
  dwUserNameLength  As Long
  lpszPassword      As String
  dwPasswordLength  As Long
  lpszUrlPath       As String
  dwUrlPathLength   As Long
  lpszExtraInfo     As String
  dwExtraInfoLength As Long
End Type

Function InternetStatusCallback(ByVal hInternet As Long, ByVal dwContext As Long, ByVal dwInternetStatus As Long, lpvStatusInformation As Variant, ByVal dwStatusInformationLength As Long)

End Function

Saludos.


En línea



A la reina de las profundidades que cuida los pasos de una sombra en la noche :*
programatrix


Desconectado Desconectado

Mensajes: 3.287


Ver Perfil WWW
Re: Declaraciones de WinInet
« Respuesta #1 en: 3 Septiembre 2005, 12:17 pm »

Super útil  ;)


En línea

NYlOn


Desconectado Desconectado

Mensajes: 842


OOOOHHHHHH, TARAGÜIIII xDDDDDD


Ver Perfil WWW
Re: Declaraciones de WinInet
« Respuesta #2 en: 3 Septiembre 2005, 21:25 pm »

Util ^^

thx Anhur ;)
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[Pregunta]Declaraciones de variables DIM
Programación Visual Basic
TinchoHack 1 1,805 Último mensaje 23 Abril 2011, 20:34 pm
por Edu
Ayuda. cifrar declaraciones del api de windows.
.NET (C#, VB.NET, ASP)
70N1 0 1,186 Último mensaje 2 Febrero 2012, 12:15 pm
por 70N1
La NSA contraataca y desmiente declaraciones de Snowden
Noticias
wolfbcn 0 694 Último mensaje 31 Mayo 2014, 13:51 pm
por wolfbcn
Caos en la presentación telemática de declaraciones a la AEAT
Noticias
wolfbcn 1 973 Último mensaje 13 Abril 2015, 11:40 am
por Hacksturcon
Declaraciones en C, Ayuda, Por favor.
Programación C/C++
aisak77 8 2,023 Último mensaje 29 Enero 2017, 15:34 pm
por aisak77
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines