Advertisement
Guest User

Untitled

a guest
Mar 24th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. Imports InjectionLibrary
  2. Imports JLibrary.PortableExecutable
  3.  
  4. in button or publicform
  5. Dim injector As InjectionMethod = InjectionMethod.Create(InjectionMethodType.ManualMap)
  6. Dim processId As Integer = Process.GetProcessesByName("ros")(0).Id
  7. Dim hModule As IntPtr = IntPtr.Zero
  8.  
  9. Using img As New PortableExecutable(My.Resources.d3dros)
  10. hModule = injector.Inject(img, processId)
  11. End Using
  12.  
  13. If hModule <> IntPtr.Zero
  14. MessageBox.Show("Injected")
  15. Else
  16. ' injection failed
  17. If injector.GetLastError() IsNot Nothing
  18. MessageBox.Show(injector.GetLastError().Message)
  19. End If
  20. End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement