How can I get the GUID of an application?
I found this code on the net:
VB Code:
System.Runtime.InteropServices.GuidAttribute guid = (System.Runtime.InteropServices.GuidAttribute)System.Reflection.Assembly.GetExecutingAssembly().GetCustomAttributes(System.Runtime.InteropServices.GuidAttribute, false); 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?




Reply With Quote