Embed C++ Libraries into .Net Libraries
问题 In my .Net assemblies I would have to make use of some native (C++ ) dlls. Usually we need to copy the C++ dlls into the bin folder and use PInvoke to call it. To save the distribution cost, I want to embed the C++ into my .Net dll direct, so that the number of assemblies distributed would be less. Any idea how to do this? 回答1: You would embed your native DLLs as resources. Then at runtime, you would have to extract those native DLLs into a temporary folder; you don't necessarily have write