Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. hello how to make a injector that reinjects everytime the dll if specified process reloads and changes hes pid

hello how to make a injector that reinjects everytime the dll if specified process reloads and changes hes pid

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nah1337
    wrote on last edited by
    #1

    Hi, ive searched this forum and google and found many tutorials and dll injector sources but i want to modifie injector to reinject everytime when a specified process reloads itself and changes hes process id. I tryed for checking the process id like this if(Pid==Pid) { hModule = OpenProcess( PROCESS_ALL_ACCESS, true, Pid ); InjectDll(hModule, DLL_Name); return 0; } But it alwyas crashes the injector ....

    _ 1 Reply Last reply
    0
    • N nah1337

      Hi, ive searched this forum and google and found many tutorials and dll injector sources but i want to modifie injector to reinject everytime when a specified process reloads itself and changes hes process id. I tryed for checking the process id like this if(Pid==Pid) { hModule = OpenProcess( PROCESS_ALL_ACCESS, true, Pid ); InjectDll(hModule, DLL_Name); return 0; } But it alwyas crashes the injector ....

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      Put some error checking and see if OpenProcess is succeeding. If not, call GetLastError to get more information on the error.

      «_Superman_»
      I love work. It gives me something to do between weekends.

      Microsoft MVP (Visual C++)

      Polymorphism in C

      N 1 Reply Last reply
      0
      • _ _Superman_

        Put some error checking and see if OpenProcess is succeeding. If not, call GetLastError to get more information on the error.

        «_Superman_»
        I love work. It gives me something to do between weekends.

        Microsoft MVP (Visual C++)

        Polymorphism in C

        N Offline
        N Offline
        nah1337
        wrote on last edited by
        #3

        well everything works fine i mean the dll injector works fine if i inject the dll only once but if i use if statement to check if pid == pid it will crash injector ... mybe im checking wrongly if the process is running ...

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups