Results 1 to 4 of 4

Thread: Get GUID from calling application?

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2010
    Posts
    6

    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.

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,109

    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?
    My usual boring signature: Nothing

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2010
    Posts
    6

    Re: Get GUID from calling application?

    Quote Originally Posted by Shaggy Hiker View Post
    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?

  4. #4
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,109

    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.
    My usual boring signature: Nothing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width