Dim OP As New OpenFileDialog
OP.Filter = "Dynamic Link Library (*.dll)|*.dll"
OP.Multiselect = True
If OP.ShowDialog = DialogResult.OK Then
For Each S As String In OP.FileNames
'Add S to list
Next
End If
Originally Posted by Pingo
Multi select
Code:
Dim OP As New OpenFileDialog
OP.Filter = "Dynamic Link Library (*.dll)|*.dll"
OP.Multiselect = True
If OP.ShowDialog = DialogResult.OK Then
For Each S As String In OP.FileNames
'Add S to list
Next
End If
You my Friend are a god!
Thanked
And this, not sure if this is a good way of doing it or not.
It should work fine if you have WaitForSingleObject setup correctly.
Kill process
Code:
Public Sub DllLoaded(ByVal DllPath As String, ByVal ProcessName As String)
Dim P As Process() = Process.GetProcessesByName(ProcessName)
If P.Length <> 0 Then
For Each M As ProcessModule In P(0).Modules
If M.FileName = DllPath Then
Return
End If
Next
P(0).Kill()
End If
End Sub
Use it after you inject. It loops the process module collection and if the dll you injected isnt in the collection, it'l kill the process.
usage:
DllPath - full path
ProcessName - without .exe
Originally Posted by Pingo
Multi select
Code:
Dim OP As New OpenFileDialog
OP.Filter = "Dynamic Link Library (*.dll)|*.dll"
OP.Multiselect = True
If OP.ShowDialog = DialogResult.OK Then
For Each S As String In OP.FileNames
'Add S to list
Next
End If
Only problem is I cant seem to get the File Selected to show up in the ListBox
No i left that blank cause i didnt know what you called the listbox.
Say you left it as default
Code:
Dim OP As New OpenFileDialog
OP.Filter = "Dynamic Link Library (*.dll)|*.dll"
OP.Multiselect = True
If OP.ShowDialog = DialogResult.OK Then
For Each S As String In OP.FileNames
ListBox1.Items.Add(S)
Next
End If
Just do it the way you had it from the start but enable multiselect
and loop the filenames.