Unable to bind NET Runtime to target process

Aug 26, 2009 at 5:44 AM

Hello,

I want to hook StartDoc api by using EasyHook. It works well on most of the applications.

Still, I tested it on MS Office Pro 2003 SP3 applications and i get the following error:

STATUS_INTERNAL_ERROR: Unable to bind NET Runtime to target process

Any ideas on how I can fix this?

Thank you.

Aug 26, 2009 at 7:45 AM
Hi, BTW: Did you tryed to Hook IE version > 6? What process did you hook - iexplore or ieuser? Regarding the Office Pro SP3 - I tryed to hook Office 2003 Pro SP3 Russian Word/Excel for StartDocA/W without any problems with usual code. Good luck, Igor
Aug 26, 2009 at 10:54 AM
Edited Aug 26, 2009 at 7:44 PM

Hooking iexplorer.exe version 7 or 8 works fine. Hooking Office 2007 Pro works as well.

But Office 2003 Pro SP3 doesn't let me hook the process.

Any suggestion is welcomed.

 

LE: I tried hooking with the standard applications from EasyHook binaries files. Both FileMon and ProcessMonitor give the same error on WINWORD 2003 SP3:

C:\Documents and Settings\test\Desktop\work\examples\EasyHook 2.6 Binaries>FileMon.exe 1336
There was an error while connecting to target:
System.ApplicationException: STATUS_INTERNAL_ERROR: Unable to bind NET Runtime to target process. (Code: 11)
   at EasyHook.NativeAPI.Force(Int32 InErrorCode)
   at EasyHook.RemoteHooking.InjectEx(Int32 InHostPID, Int32 InTargetPID, Int32InWakeUpTID, Int32 InNativeOptions, String InLibraryPath_x86, String InLibraryPath_x64, Boolean InCanBypassWOW64, Boolean InCanCreateService, Object[] InPassThruArgs)
   at EasyHook.RemoteHooking.Inject(Int32 InTargetPID, String InLibraryPath_x86, String InLibraryPath_x64, Object[] InPassThruArgs)
   at FileMon.Program.Main(String[] args)

Aug 27, 2009 at 10:20 AM
The exception mentioned seems to be generated from EasyHook DLL project \ thread.c: line 980: case 11: THROW(STATUS_INTERNAL_ERROR, L"Unable to bind NET Runtime to target process."); I can't comment the internal mechanics of NET binding to the processes. I think it might be addressed to Christoph. -------------------------- Could you provide the OS version, 64 or 32 bit and also the sources used for the hook? Also, could you try to upload and install all updates for Office 2003 / OS? I just could say what I have no problems with Word Pro 2003 SP3 hooking StartDocA/W on XP Prof SP 2 32 bit. All updates are installed.
Aug 28, 2009 at 8:38 AM
Edited Aug 28, 2009 at 8:39 AM
Igor145 wrote:
The exception mentioned seems to be generated from EasyHook DLL project \ thread.c: line 980: case 11: THROW(STATUS_INTERNAL_ERROR, L"Unable to bind NET Runtime to target process."); I can't comment the internal mechanics of NET binding to the processes. I think it might be addressed to Christoph. -------------------------- Could you provide the OS version, 64 or 32 bit and also the sources used for the hook? Also, could you try to upload and install all updates for Office 2003 / OS? I just could say what I have no problems with Word Pro 2003 SP3 hooking StartDocA/W on XP Prof SP 2 32 bit. All updates are installed.

 To reply to your question and also hopefully to provide more details about this issue:

1.  First time I discovered this issue was at work where I have:

  • OS: MS Windows XP Professional Version 2002 SP3 (32bit)
  • MS Office Professional 2003 SP3
  • All updates from MS were done up to month of August
  • User used had administrator privileges.

2. Than I tried to recreate the environment at home. Since I have Office 2007 installed at home (easyhook works well with that) than I created a virtual machine using VirtualBox. The setup was the following:

  • OS: MS Windows XP Professional SP2 Academic Edition (32bit)
  • MS Office Professional 2003 SP3
  • Visual Studio 2005 Professional (with .Net Framework 2.0 included)
  • I used the applications FileMon and ProcessMonitor from [Binaries with Examples] downloaded from the link provided in the download section of EasyHook website.
  • User used had administrator privileges on local machine.

The result was the same: "STATUS_INTERNAL_ERROR: Unable to bind NET Runtime to target process (Code : 11)"

Then I did update to Win XP to SP3, but with no positive difference.

When running the Demo applications FileMon or ProcessMonitor from within Visual Studio on event window I get: "A first chance exception of type 'System.ApplicationException' occured in EasyHook.dll"

 

If this issue cannot be solved, can someone suggest a different api to be hooked for print monitoring?

Thank you in advance.

Aug 28, 2009 at 8:31 PM
I should say: 1) at my side the 2.6 binaries / ProcessMonitor.exe at the exactly same environment ( but plus .net framework 3.0 / 3.5, also, I have IIS installed ) is able to hook Winword.exe 2003 Prof SP3. 2) but, I have the problems of hooking the iexplore.exe (7) under Vista Business 64 / Vista Ultimate 32: "Unknown error code (-1073741502): The user defined managed entry point failed in the target process.". Please, drop the line if you will find the solution with the "binding NET Runtime". Good luck.