问题
I have used the vlc.dll in my form. After installing this, if I install vlc outside this, my app starts using the dll from that folder. So, how can I force my app to use the dll from its own folder?
回答1:
If it's a native dll, Windows searches the application's own folder first. Dynamic-Link Library Search Order on msdn. It sounds like this is not happening, so ..
EDIT: For an ActiveX dll, you can use Registration-Free COM to tell your application to use a local version instead of the registered one.
if it's a managed dll, Windows searches the GAC first In what order are locations searched to load referenced DLLs?, which sounds like what you're experiencing.
You may need to rename the file so it appears to be different.
Do you have a good reason for using a private copy? By doing that, you won't benefit from security updates.
来源:https://stackoverflow.com/questions/36280623/how-to-use-vlc-dll-without-registration