I am writing a DLL for a program I'm making, and I want to make sure other programs can't use the DLL. I was thinking, maybe I could calculate the MD5 checksum of the calling exe to check if it is my program. I know how to calculate an MD5 checksum, but I don't know how to get the path of the calling exe. Is there any way to read argv[0] (the path of the exe) in a dll? Or is there another way to do this?