Drag and Drop for injector code

Posts 1–4 of 4 · Page 1 of 1
Drag and Drop for injector code
I was going through the list of crap for list box, and i found drag drop and drag enter. well i figured out a way to use it, but don't know if its a good way.

Here is what i tried.
Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ListBox1.AllowDrop = True
    End Sub

    Private Sub ListBox1_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles ListBox1.DragDrop
        Dim files() As String = e.Data.GetData(DataFormats.FileDrop)
        For Each path In files
            Dim DllFileName As String = path
            Try
                dlls.Add(DllFileName, path)
                ListBox1.Items.Add(DllFileName)
            Catch ex As Exception
                MsgBox("Please take file out of windows folder.")
            End Try
        Next
    End Sub

    Private Sub ListBox1_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles ListBox1.DragEnter
        If e.Data.GetDataPresent(DataFormats.FileDrop) Then
            e.Effect = DragDropEffects.Copy
        End If
    End Sub
This is wrong
Code:
Dim DllFileName As String = path
            Try
                dlls.Add(DllFileName, path)
                ListBox1.Items.Add(DllFileName)
            Catch ex As Exception
                MsgBox("Please take file out of windows folder.")
            End Try
You might want to also check the file extension so you only add dll's.
Drag drop would only work if you're using xp with CF.
You won't beable to drag a dll into the injector if it has admin rights, which it needs for vista and up.
i fixed admin rights by editing the manifest lol

oops, i used one of my extra accounts lol
Quote Originally Posted by RobertDownyJr View Post
i fixed admin rights by editing the manifest lol

oops, i used one of my extra accounts lol
And? Editing the manifest is irrelevant.
The dll won't drag into the injector when running as admin.
Posts 1–4 of 4 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Talk with us