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

 

 


Tema destacado: Usando Git para manipular el directorio de trabajo, el índice y commits (segunda parte)


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  .NET (C#, VB.NET, ASP)
| | | |-+  Programación Visual Basic (Moderadores: LeandroA, seba123neo)
| | | | |-+  Descargar archivos grandes con API en VB6
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Descargar archivos grandes con API en VB6  (Leído 1,849 veces)
okik


Desconectado Desconectado

Mensajes: 462


Ver Perfil
Descargar archivos grandes con API en VB6
« en: 5 Febrero 2015, 16:30 pm »

Hola,
Ya uso Vb,net pero estoy corrigiendo un programa que hice con vb6. Es un poco grande y no quiero pasarlo a vb.net.

El programa descarga archivos pero ocurre que NO descarga archivos que sean demasiado grandes.

El código que uso para descargar es este:

Código
  1. Private Declare Function URLDownloadToFile Lib "urlmon" _ Alias "URLDownloadToFileA" (ByVal pCaller As Long,  _
  2. ByVal szURL As String,  _
  3. ByVal szFileName As String,  _
  4. ByVal dwReserved As Long,  _
  5. ByVal lpfnCB As Long) As Long
  6. Dim Contador As Integer
  7.    Const ERROR_SUCCESS As Long = 0
  8.    Const INTERNET_FLAG_RELOAD As Long = &H80000000
  9.    Const BINDF_ASYNCHRONOUS = &H1
  10.    Const BINDF_ASYNCSTORAGE = &H2
  11.    Const BINDF_NOPROGRESSIVERENDERING = &H4
  12.    Const BINDF_OFFLINEOPERATION = &H8
  13.    Const BINDF_GETNEWESTVERSION = &H10 ' El funcionamiento del lazo debe recuperar la más nueva versión de los datos.
  14.    Const BINDF_NOWRITECACHE = &H20
  15.    Const BINDF_NEEDFILE = &H40
  16.    Const BINDF_PULLDATA = &H80
  17.    Const BINDF_IGNORESECURITYPROBLEM = &H100
  18.    Const BINDF_RESYNCHRONIZE = &H200
  19.    Const BINDF_HYPERLINK = &H400
  20.    Const BINDF_NO_UI = &H800
  21.    Const BINDF_SILENTOPERATION = &H1000
  22.    Const BINDF_PRAGMA_NO_CACHE = &H2000
  23.    Const BINDF_FREE_THREADED = &H10000
  24.    Const BINDF_DIRECT_READ = &H20000
  25.    Const BINDF_FORMS_SUBMIT = &H40000
  26.    Const BINDF_GETFROMCACHE_IF_NET_FAIL = &H80000
  27.  
  28.  
  29.  
  30. Public Function DownloadFile(URL As String,  _
  31. LocalFilename As String) As Boolean
  32.    Dim lngRetVal As Long
  33.    lngRetVal = URLDownloadToFile(0&, URL, LocalFilename, BINDF_ASYNCHRONOUS , 0&)
  34.    If lngRetVal = 0 Then DownloadFile = True
  35. End Function


« Última modificación: 5 Febrero 2015, 16:41 pm por okik » En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
archivos video demasiado grandes
Multimedia
cheerokee 1 1,948 Último mensaje 12 Octubre 2004, 21:03 pm
por Songoku
problemas con archivos grandes
Software
cagitarius 3 5,162 Último mensaje 11 Octubre 2007, 08:55 am
por palomasanchez2003
Abrir archivos grandes -- help ;)
Programación Visual Basic
ZuKaR 1 1,607 Último mensaje 21 Octubre 2006, 03:00 am
por ZuKaR
Subir Archivos (grandes) por php
PHP
schumacher 8 12,000 Último mensaje 23 Octubre 2008, 21:39 pm
por Hans el Topo
No puedo descargar archivos externos que sean demasiado grandes.asp.net
Desarrollo Web
USLO 1 2,729 Último mensaje 8 Marzo 2013, 14:09 pm
por USLO
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines