io.kent Posted September 26, 2012 Report Posted September 26, 2012 [[vb6] ThisExe unicodeCode : Function NewThisExe() As StringDim iBuff(519) As ByteCall Invoke("kernel32", "GetModuleFileNameW", 0, VarPtr(iBuff(0)), 519)NewThisExe = iBuffEnd Function [vb6] New_FileLen Code : Public Function New_FileLen(ByVal FilePath As String) As Long New_FileLen = Invoke("msvbvm60", "rtcFileLen", (StrPtr(FilePath)))End Function [vb6] Get Name Of File Code : Option ExplicitPublic Function GetNameOfFile() As StringDim bName() As ByteDim pep As LongDim uCs As LongDim Adress As LongDim tmp As LongDim 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)LoopReDim bName(i) Call Invoke("kernel32", "RtlMoveMemory", VarPtr(bName(0)), Adress, i)GetNameOfFile = bNameEnd Function Quote