Results 1 to 4 of 4

Thread: [RESOLVED] Get the GUID of the Application

Threaded View

  1. #1

    Thread Starter
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Resolved [RESOLVED] Get the GUID of the Application

    How can I get the GUID of an application?

    I found this code on the net:
    VB Code:
    1. System.Runtime.InteropServices.GuidAttribute guid = (System.Runtime.InteropServices.GuidAttribute)System.Reflection.Assembly.GetExecutingAssembly().GetCustomAttributes(System.Runtime.InteropServices.GuidAttribute, false);
    2. guid.ToString();

    The space is for GetCustomAttributes(). No idea why vBull breaks up a line in code tags via HTML so it inserts a space

    However, it gives me an error stating GetCustomAttributes requires a Type in the first parameter. I thought I was giving it a type?

    Is there a better way to do this or what is the problem with my code?

    Also, if I put this code into a DLL, will it give me the GUID of my DLL or the Application calling the DLL?
    Last edited by Kasracer; Mar 4th, 2006 at 12:49 AM.
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

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