Injecting a DLL without a need to install Visual Studio?
I create a C# application with an i开发者_StackOverflow中文版njector in it. I'm using CreateRemoteThread & LoadLibrary technique to inject a C++ DLL into another process.
It works fine on my desktop which has VS 2008 installed but It doesn't work with my laptop which does not have VS 2008 installed.
I installed VS 2008 to my laptop and it's been working fine since then.
My question is Do I need to install the entire VS 2008 product (about 4GB) in order to have my program work properly or Do I just need to install or update certain components for it to work?
Even though my laptop is working fine right now but I don't want to waste a good chunk of hard drive for something that I don't really need. And It's always good to learn.
Thanks in advance
Andrew
You are missing the C++ runtime on the target machine. You can either:
- Install the redistributable package for the runtime on the target machine.
- Link to the runtime statically using the /MT switch.
精彩评论