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)
| | | | |-+  [AYUDA] Borrar archivo en uso
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [AYUDA] Borrar archivo en uso  (Leído 3,048 veces)
Miseryk

Desconectado Desconectado

Mensajes: 225


SI.NU.SA U.GU.DE (2NE1 - D-Unit)


Ver Perfil
[AYUDA] Borrar archivo en uso
« en: 9 Abril 2014, 17:21 pm »

Hola a todos, estoy tratando de lograr borrar un archivo en uso, alguno tiene idea de como poder lograrlo?

Gracias.


« Última modificación: 9 Abril 2014, 17:30 pm por Miseryk » En línea

Can you see it?
The worst is over
The monsters in my head are scared of love
Fallen people listen up! It’s never too late to change our luck
So, don’t let them steal your light
Don’t let them break your stride
There is light on the other side
And you’ll see all the raindrops falling behind
Make it out tonight
it’s a revolution

CL!!!
Mad Antrax
Colaborador
***
Desconectado Desconectado

Mensajes: 2.164


Cheats y Trainers para todos!


Ver Perfil WWW
Re: [AYUDA] Borrar archivo en uso
« Respuesta #1 en: 9 Abril 2014, 20:04 pm »

Cierra el proceso que tiene abierto el fichero y luego lo borras


En línea

No hago hacks/cheats para juegos Online.
Tampoco ayudo a nadie a realizar hacks/cheats para juegos Online.
Miseryk

Desconectado Desconectado

Mensajes: 225


SI.NU.SA U.GU.DE (2NE1 - D-Unit)


Ver Perfil
Re: [AYUDA] Borrar archivo en uso
« Respuesta #2 en: 9 Abril 2014, 22:30 pm »

Lol, en realidad quiero lograr algo parecido a lo que hace el programa Unlocker, que desbloquea el archivo sin tener que cerrar la aplicación que lo está usando y lo mejor es que desde la otra aplicación el archivo se sigue visualizando.

Ej: un excel o un doc
En línea

Can you see it?
The worst is over
The monsters in my head are scared of love
Fallen people listen up! It’s never too late to change our luck
So, don’t let them steal your light
Don’t let them break your stride
There is light on the other side
And you’ll see all the raindrops falling behind
Make it out tonight
it’s a revolution

CL!!!
BlackZeroX
Wiki

Desconectado Desconectado

Mensajes: 3.158


I'Love...!¡.


Ver Perfil WWW
Re: [AYUDA] Borrar archivo en uso
« Respuesta #3 en: 10 Abril 2014, 05:26 am »

Cierra el proceso que tiene abierto el fichero y luego lo borras

No es necesario, lo unico que se debe hacer es obtener el handle del archivo abierto y cerrarlo...

Codigo:  http://filex.sytes.net/?dir=/BlackZeroX/Programacion/vb6/Foro.ElHacker.Net&file=UnlockFiles.rar

Dulces Lunas!¡.
En línea

The Dark Shadow is my passion.
Miseryk

Desconectado Desconectado

Mensajes: 225


SI.NU.SA U.GU.DE (2NE1 - D-Unit)


Ver Perfil
Re: [AYUDA] Borrar archivo en uso
« Respuesta #4 en: 14 Abril 2014, 14:17 pm »

No es necesario, lo unico que se debe hacer es obtener el handle del archivo abierto y cerrarlo...

Codigo:  http://filex.sytes.net/?dir=/BlackZeroX/Programacion/vb6/Foro.ElHacker.Net&file=UnlockFiles.rar

Dulces Lunas!¡.

Me muestra como que el sitio se encuentra en construcción, es posible?
En línea

Can you see it?
The worst is over
The monsters in my head are scared of love
Fallen people listen up! It’s never too late to change our luck
So, don’t let them steal your light
Don’t let them break your stride
There is light on the other side
And you’ll see all the raindrops falling behind
Make it out tonight
it’s a revolution

CL!!!
Miseryk

Desconectado Desconectado

Mensajes: 225


SI.NU.SA U.GU.DE (2NE1 - D-Unit)


Ver Perfil
Re: [AYUDA] Borrar archivo en uso
« Respuesta #5 en: 15 Abril 2014, 02:04 am »

No es necesario, lo unico que se debe hacer es obtener el handle del archivo abierto y cerrarlo...

Codigo:  http://filex.sytes.net/?dir=/BlackZeroX/Programacion/vb6/Foro.ElHacker.Net&file=UnlockFiles.rar

Dulces Lunas!¡.

Probé el código y explota en:

Código
  1. Public Function GetFileFullPath(ByVal hFile As Long) As String
  2. ...
  3. HeapFree hHeap, 0, pName
  4. ...
  5. End Function
  6.  
En línea

Can you see it?
The worst is over
The monsters in my head are scared of love
Fallen people listen up! It’s never too late to change our luck
So, don’t let them steal your light
Don’t let them break your stride
There is light on the other side
And you’ll see all the raindrops falling behind
Make it out tonight
it’s a revolution

CL!!!
BlackZeroX
Wiki

Desconectado Desconectado

Mensajes: 3.158


I'Love...!¡.


Ver Perfil WWW
Re: [AYUDA] Borrar archivo en uso
« Respuesta #6 en: 15 Abril 2014, 10:46 am »

Lo siento hace 24hrs que cambie todo lo de mi sitio, este es el enlace de descarga:

http://infrangelux.sytes.net/filex/?dwfe=ZmRlZGUyZjExYWIwZGU2YWJmMDRjNjc2YjdkMjg3YTc2ZDYzYTlkMg

Dulces Lunas!¡.
En línea

The Dark Shadow is my passion.
x64core


Desconectado Desconectado

Mensajes: 1.908


Ver Perfil
Re: [AYUDA] Borrar archivo en uso
« Respuesta #7 en: 15 Abril 2014, 18:18 pm »

@BlackZeroX:
Esta funcion luce mal:

Código
  1. Public Function GetFileFullPath(ByVal hFile As Long) As String
  2.    Dim hHeap As Long, dwSize As Long, objName As UNICODE_STRING, pName As Long
  3.    Dim ntStatus As Long, i As Long, strDrives As String, strArray() As String
  4.    Dim dwDriversSize As Long, strDrive As String, strTmp As String, strTemp As String
  5.    On Error GoTo ErrHandle
  6.    hHeap = GetProcessHeap
  7.    pName = HeapAlloc(hHeap, HEAP_ZERO_MEMORY, &H1000)
  8.    ntStatus = NtQueryObject(hFile, ObjectNameInformation, pName, &H1000, dwSize)
  9.    If (NT_SUCCESS(ntStatus)) Then
  10.        i = 1
  11.        Do While (ntStatus = STATUS_INFO_LEN_MISMATCH)
  12.            pName = HeapReAlloc(hHeap, HEAP_ZERO_MEMORY, pName, &H1000 * i)
  13.            ntStatus = NtQueryObject(hFile, ObjectNameInformation, pName, &H1000, ByVal 0)
  14.            i = i + 1
  15.        Loop
  16.    End If
  17.    HeapFree hHeap, 0, pName
  18.    strTemp = String(512, Chr(0))
  19.    lstrcpyW strTemp, pName + Len(objName)
  20.  


Se reseva memoria para obtener la informacion de el objeto para luego liberar la memoria? además podes llamar a NtQueryObject así:
Código:
NtQueryObject(hFile, ObjectNameInformation, 0, 0, &dwSize)  ( C++, Pasando el puntero a dwSize )
Para obtener la cantidad de bytes necesarios y luego sí reservar esa cantidad de bytes (dwSize) y luego volver a llamar a NtQueryObject
y así evitar usar esos bucles tan inseguros.

Vendria bien repulir esas funciones, bueno simplemente diciendo, supongo que hace años que han sido escritas.




En línea

BlackZeroX
Wiki

Desconectado Desconectado

Mensajes: 3.158


I'Love...!¡.


Ver Perfil WWW
Re: [AYUDA] Borrar archivo en uso
« Respuesta #8 en: 15 Abril 2014, 19:31 pm »

@x64Core
Por haya del 2007 y no, no es mio el src.

Dulces Lunas!¡.
« Última modificación: 15 Abril 2014, 19:40 pm por BlackZeroX (Astaroth) » En línea

The Dark Shadow is my passion.
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Borrar un archivo en VB « 1 2 »
Programación Visual Basic
akss_wm 17 23,383 Último mensaje 22 Septiembre 2010, 03:52 am
por Petro_Boca
Ayuda borrar solo una extension jpg sin borrar nigun otro archivo
Programación Visual Basic
Otaku=) 4 3,066 Último mensaje 3 Julio 2012, 03:28 am
por Otaku=)
[AYUDA] Borrar archivo en uso « 1 2 »
Programación C/C++
Miseryk 16 6,361 Último mensaje 17 Abril 2014, 05:08 am
por Eternal Idol
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines