I want to create a Windows DLL that can only be called by applications that are known to me.
Suppose that inside my application (a Windows DLL to speak the truth), I have a list of business partners and that we agree in some sort of identification. I want to block any attempts from applications that are not in this list to access an exported function in the dll.
I'm looking at Windows Authenticode but I'm not sure if there is a standard path to solve this type of problem. Help is appreciated.
It's simply not possible to secure executable code against execution once unauthorized party has access to it. You can make it hard to execute the code, but a party determined enough will find a way to run it. You're effectively fighting the same battle as application and game authors are fighting against pirates, and looking at the number of executables that aren't yet cracked, your chances aren't good.