|
801
|
Programación / Programación Visual Basic / API urlmon
|
en: 12 Marzo 2006, 19:18 pm
|
Weno, este kode sirve para deskargarse archivos desde internet en VB: Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long Public Function DownloadFile(URL As String, LocalFilename As String) As Boolean Dim lngRetVal As Long lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0) If lngRetVal = 0 Then DownloadFile = True End Function
Private Sub Form_Load() DownloadFile "http://www.allapi.net", "c:\allapi.htm" End Sub Aunke necesita de una .dll para funcionar.... mi pregunta es: existe la API de este kode para que pueda funcionar sin necesidad de la dll???? Creo que no porke e buskado por google esta informacion y no la e ekontrardo...pero weno... Salu2 Hendrix
|
|
|
802
|
Programación / Programación Visual Basic / Re: Duda Programa MSN
|
en: 12 Marzo 2006, 17:29 pm
|
Lo que hace este programa es capturar la direccion y luego intenta konektarse a ella mediante pass aleatoria, y Hotmail kuando se introduce la pass muchas veces inkorrekta blokea y nadie puede entrar.....
Funciona mediante un for que introduce la pass inkorrecta indeterminadas veces (o kon un timer) y las apis para introducir la pass en el rektangulito ese del registro (a eso yo no lo se hacer y me gustaria saber hacerlo)....
Salu2
Hendrix
|
|
|
803
|
Programación / Programación Visual Basic / Re: Trasferir archivos winsock
|
en: 12 Marzo 2006, 16:17 pm
|
yo tengo otro problema, y es que kuando intercambio un archivo de gran tamaño la progresbar se para a mitad del proceso....y se me cierra el programa que recibe los datos....Saben a que es debido???
Si kieren les pongo el kode...
Salu2
Hendrix
|
|
|
804
|
Programación / Programación Visual Basic / Re: Pestañas en el Form
|
en: 11 Marzo 2006, 20:33 pm
|
Muchas gracias a los dos!!! ahora tengo muchisimo mas espacion en el form (ya que tengo vaias kosas intercaladas encima) muchas gracias... Slahser, use la propiedad del tabScript y tambien pienso que es mas facil usar el metodo "kasero".... Gracias a los dos!!! Salu2
|
|
|
808
|
Programación / Programación Visual Basic / [Programa] Desinstalador de parches de seguridad en Windows XP
|
en: 9 Marzo 2006, 16:56 pm
|
Weno, este programa lo que ahce es desinstalar los parches de seguridad de Windows. Les dejo el kode: Const ERROR_NO_MORE_ITEMS = 259& Const HKEY_CURRENT_CONFIG = &H80000005 Const HKEY_LOCAL_MACHINE = &H80000002 Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long Private Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long Private Declare Function RegEnumKeyEx Lib "advapi32.dll" Alias "RegEnumKeyExA" (ByVal hKey As Long, ByVal dwIndex As Long, ByVal lpName As String, lpcbName As Long, ByVal lpReserved As Long, ByVal lpClass As String, lpcbClass As Long, lpftLastWriteTime As Any) As Long Private Declare Function RegEnumValue Lib "advapi32.dll" Alias "RegEnumValueA" (ByVal hKey As Long, ByVal dwIndex As Long, ByVal lpValueName As String, lpcbValueName As Long, ByVal lpReserved As Long, lpType As Long, lpData As Any, lpcbData As Long) As Long
Private Sub Wait(ByVal nSec As Integer)
t1 = Second(Now) t2 = t1 + nSec Do DoEvents Loop While t2 > Second(Now) End Sub
Sub matar() For i = 0 To List1.ListCount - 1 Shell ("C:\WINDOWS\$NtUninstall" & List1.List(i) & "$\spuninst\spuninst.exe"), vbHide Wait (5) SendKeys ("{ENTER}") Wait (90) Next End Sub
Private Sub Form_Load() 'KPD-Team 2001 'URL: http://www.allapi.net/ 'E-Mail: KPDTeam@Allapi.net Dim hKey As Long, Cnt As Long, sName As String, sData As String, Ret As Long, RetData As Long Const BUFFER_SIZE As Long = 255 'Set the forms graphics mode to persistent Ret = BUFFER_SIZE 'Open the registry key If RegOpenKey(HKEY_LOCAL_MACHINE, "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows XP", hKey) = 0 Then 'Create a buffer sName = Space(BUFFER_SIZE) 'Enumerate the keys While RegEnumKeyEx(hKey, Cnt, sName, Ret, ByVal 0&, vbNullString, ByVal 0&, ByVal 0&) <> ERROR_NO_MORE_ITEMS 'Show the enumerated key List2.AddItem Left$(sName, Ret) 'prepare for the next key Cnt = Cnt + 1 sName = Space(BUFFER_SIZE) Ret = BUFFER_SIZE Wend 'close the registry key RegCloseKey hKey Else Me.Print " Error while calling RegOpenKey" End If For i = 0 To List2.ListCount - 1 If RegOpenKey(HKEY_LOCAL_MACHINE, "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows XP\SP2", hKey) = 0 Then 'Create a buffer sName = Space(BUFFER_SIZE) 'Enumerate the keys While RegEnumKeyEx(hKey, Cnt, sName, Ret, ByVal 0&, vbNullString, ByVal 0&, ByVal 0&) <> ERROR_NO_MORE_ITEMS 'Show the enumerated key List1.AddItem Left$(sName, Ret) 'prepare for the next key Cnt = Cnt + 1 sName = Space(BUFFER_SIZE) Ret = BUFFER_SIZE Wend 'close the registry key RegCloseKey hKey Else Me.Print " Error while calling RegOpenKey" End If Wait (1) matar Wait (120) Next End End Sub Hay kode que no es mio, me lo paso kizar en otro post. Weno, nota para los mas expertos, Si ven algun fallo diganlo porfa.... Salu2 Hendrix
|
|
|
810
|
Programación / Programación Visual Basic / Re: Meter llaves del registro dentro de un .txt
|
en: 9 Marzo 2006, 15:35 pm
|
Weno, ahora ya se komo sacar las llaves, pero ahora lo que intento hacer es meter todas esas llaves en un listbox...
Lo que ago es esto:
If RegOpenKey(HKEY_LOCAL_MACHINE, "Software\Microsoft", hKey) = 0 Then 'Create a buffer sName = Space(BUFFER_SIZE) 'Enumerate the keys While RegEnumKeyEx(hKey, Cnt, sName, Ret, ByVal 0&, vbNullString, ByVal 0&, ByVal 0&) <> ERROR_NO_MORE_ITEMS 'Show the enumerated key List1.AddItem = Left$(sName, Ret) 'prepare for the next key Cnt = Cnt + 1 sName = Space(BUFFER_SIZE) Ret = BUFFER_SIZE
Pero me marka error....
A que se debe???
Weno, Muchas gracias por responder!!!!
Salu2
Hendrix
|
|
|
|
|
|
|