469,902 Members | 1,971 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,902 developers. It's quick & easy.

guid retrieval of assembly

Is there anyway to retrieve the GUID code of an assembly for use in the
application as a unique identifier? thanks!
Nov 20 '05 #1
2 1099
Dim a As Reflection.Assembly =
Reflection.Assembly.LoadFrom("fileLocationGoesHere ")
Dim i As Integer, guid As String
For i = 0 To a.GetCustomAttributes(False).GetUpperBound(0)
Dim obj As Object = a.GetCustomAttributes(False).GetValue(i)
If TypeOf (obj) Is System.Runtime.InteropServices.GuidAttribute Then
guid = CType(obj,
System.Runtime.InteropServices.GuidAttribute).Valu e
End If
Next
"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:ur**************@TK2MSFTNGP09.phx.gbl...
Is there anyway to retrieve the GUID code of an assembly for use in the
application as a unique identifier? thanks!

Nov 20 '05 #2
thanks! that worked good

"Scott" <sc*****@yahoo.com> wrote in message
news:eT****************@TK2MSFTNGP11.phx.gbl...
Dim a As Reflection.Assembly =
Reflection.Assembly.LoadFrom("fileLocationGoesHere ")
Dim i As Integer, guid As String
For i = 0 To a.GetCustomAttributes(False).GetUpperBound(0)
Dim obj As Object = a.GetCustomAttributes(False).GetValue(i)
If TypeOf (obj) Is System.Runtime.InteropServices.GuidAttribute Then
guid = CType(obj,
System.Runtime.InteropServices.GuidAttribute).Valu e
End If
Next
"Brian Henry" <brianiup[nospam]@adelphia.net> wrote in message
news:ur**************@TK2MSFTNGP09.phx.gbl...
Is there anyway to retrieve the GUID code of an assembly for use in the
application as a unique identifier? thanks!


Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by ME | last post: by
14 posts views Thread by Nak | last post: by
9 posts views Thread by Mis Dep. | last post: by
1 post views Thread by Brian Henry | last post: by
4 posts views Thread by Doug Bell | last post: by
3 posts views Thread by Jozef | last post: by
2 posts views Thread by Rob R. Ainscough | last post: by
4 posts views Thread by Ron M. Newman | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.