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. Application failed to initialize using Detours [modified]

Application failed to initialize using Detours [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpcomtoolsannouncement
1 Posts 1 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.
  • S Offline
    S Offline
    Sam Hobbs
    wrote on last edited by
    #1

    I think this is solved. The problem probably was that functions need to be exported when using Detours version 2.1 that did not need to be exported using version 1.5. I was getting the following error message: "The application failed to initialize properly (0xc000007b). Click on OK to terminate the application." Error 0x7B is "The filename, directory name, or volume label syntax is incorrect.". I don't know if this is a problem with Detours[^] or if it is a problem with VC 2005 or something else new that I am not familiar with. I will first clarify assuming you are familiar with Detours. If I use a command line such as:

    withdll.exe -d:slept.dll sleepold.exe

    then Detours works. If I use my own DLL instead, then I get the error, even if the DLL is very, very simple. Note that the command line I show here is simplified with the paths eliminated, but I am using a script that validates that the files exist. For those not familiar with Detours, the withdll.exe sample program uses Detours which uses CreateProcess to create a suspended process (executes sleepold.exe), then injects the DLL into the process. When Detours is installed, the sample programs and Detours itself need to be compiled, so I have the makefile and such for the builds. It is the Detours function that does the CreateProcess that is getting the error. I have tried to compare my VC 2005 project settings to the options used to make slept.dll and I can't find anything significantly different. My VC is: Microsoft Visual C++ 2005 77626-009-0000007-41476 -- modified at 19:47 Monday 26th June, 2006

    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