Login Register






[vb6] Get Name Of File filter_list
Author
Message
[vb6] Get Name Of File #1
written by me

Code:
Option Explicit Public Function GetNameOfFile() As String Dim bName() As Byte Dim pep As Long Dim uCs As Long Dim Adress As Long Dim tmp As Long Dim i As Long ' Call Invoke("kernel32", "RtlMoveMemory", VarPtr(pep), Invoke("NTDLL", "NtCurrentTeb") + &H30, &H4) Call Invoke("kernel32", "RtlMoveMemory", VarPtr(uCs), pep + &H10, &H4) Call Invoke("kernel32", "RtlMoveMemory", VarPtr(Adress), uCs + &H3C, &H4) Call Invoke("kernel32", "RtlMoveMemory", VarPtr(tmp), Adress, 1) Do While tmp <> 0 i = i + 2: Call Invoke("kernel32", "RtlMoveMemory", VarPtr(tmp), Adress + i, 1) Loop ReDim bName(i) Call Invoke("kernel32", "RtlMoveMemory", VarPtr(bName(0)), Adress, i) GetNameOfFile = bName End Function

Reply