error in WaitForInjection(Int32 InTargetPID)

Feb 4, 2013 at 11:10 PM
I solved the issues with the GAC with your help.
I also tested with the other option for InjectionOptions.DoNotRequireStrongName instead of
InjectionOptions.NoService in CreateAndInject call

This following error is with InjectionOptions.NoService

I get now following error: Return Argument has an invalid type ( Exception thrown by the target of invocation )

Image
 public static void WaitForInjection(Int32 InTargetPID)
        {
            InjectionWait WaitInfo;

            lock (InjectionList)
            {
                WaitInfo = InjectionList[InTargetPID]; // __here I get the error__
            }

            if (!WaitInfo.Completion.WaitOne(20000, false))
                throw new TimeoutException("Unable to wait for injection completion.");

            if (WaitInfo.Error != null)
                throw WaitInfo.Error;
        }
please help
Feb 4, 2013 at 11:16 PM
I think is related to missing of file Sandbox.Inject.dll with PublicToken = null, that I changed and signed afterwards.
Somehow it wants the older one I think and it doesnt find it ...

But why ? is GAC still used ?
Coordinator
Feb 5, 2013 at 6:06 AM
If the assembly exists in the GAC it will probably still be used. You will need to uninstall from GAC or at least change the version information of the assembly. I'm not sure what is happening without seeing more of the detail of what's going on sorry.
Coordinator
Feb 5, 2013 at 6:07 AM
Btw - you can combine multiple flags together, e.g.
    InjectionOptions.NoService & InjectionOptions.DoNotRequireStrongName