My created process is being terminated.

I am using Madshi codehook.
I create a iexplore process, then inject a library.
This works very good. But problem is that when i visit some sites (like
then entire process is terminated.
Untill now only this bug appeared on and not on any other sites. (But I guess there is more sites it will appear on)

Then I used mozilla /firefox to open the narutofan site. This time the process wasn't terminated.
This is the code I use to inject.

CreateProcess(nil, pchar(c:\PROGRAM FILES\INTERNET EXPLORER\IEXPLORE.EXE), nil, nil, False,0, nil, nil, StartInfo, ProcInfo);

  Process := ProcInfo.hProcess;
  GetCurrentDirectory(MAX_PATH, Path);
  Module := CreateFile(pchar('Some.dll'), GENERIC_READ, FILE_SHARE_READ, nil, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
  Size := GetFileSize(Module, nil);
  GetMem(Data, Size);
  ReadFile(Module, Data^, Size, BytesRead, nil);
  InjectLibrary(Process, Data);
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

so?? no one?
double question...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.