Get GUID from calling application?
I have multiple applications that will be calling a DLL.
Is there a way to get the GUID from the calling application without passing it?
I would like to use the GUID to verify the parent application and open up rights within the DLL for a specific app but not others.
Thanks.
Re: Get GUID from calling application?
There certainly isn't a GOOD way that I can think of. You could have the dll use API functions to steal the data from the main app, but what's the point? What's wrong with passing it in?
Re: Get GUID from calling application?
Quote:
Originally Posted by
Shaggy Hiker
There certainly isn't a GOOD way that I can think of. You could have the dll use API functions to steal the data from the main app, but what's the point? What's wrong with passing it in?
Thanks for the response. I was going to use it as a security measure to verify the correct parent application.
Any suggestions on how to use an API function to find the GUID of the calling application?
Re: Get GUID from calling application?
I have never tried. You might ask over in the API section of the forum. Normally you might look for a certain form being displayed, but if all you are really looking for is whether or not a certain process is running, then that would be one option.
On the other hand, if only certain apps should be allowed to call your dll methods, how about requiring them to first call a method and pass in a callback method. The dll would then call that callback to get the GUID. Actually, that doesn't strike me as being quite secure. Requiring a callback method would be fairly opaque to a casual hacker, but anybody who saw the code would realize that all they would need to do would be to create a method that could be called which spoofed the GUID. Still, it might be a start in the right direction. I have no idea how secure or unique the GUID you are looking for would actually be.