473,288 Members | 1,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,288 software developers and data experts.

System.Type.GUID inter computer consistency (???)

Hi,

I am using the System.Type.GUID to identify similar types on different
computers, one computer send the GUID through a socket while the other
resolve the GUID and identify the type, when working on a single computer
everything works fine, BUT, when working on two different computers the GUID
extracted from one type is different from the GUID extracted from the same
type on the other computer. why is that happening? shouldn't a guid
representing one type on one computer be similar to the guid of the same type
on the other computer?????
Is there any other consistent identifier ( of a constant size ) that can be
extracted from a type? in the unmanaged reflection API I could use the
TokenId of the type BUT, I didn't find a way to get this ID through managed
code...
--
Nadav
http://www.ddevel.com
Nov 16 '05 #1
2 3875
qty

On 12-Sep-2004, "=?Utf-8?B?TmFkYXY=?=" <Na***@discussions.microsoft.com>
wrote:
shouldn't a guid
representing one type on one computer be similar to the guid of the same
type
on the other computer?????


Definitely not. A GUID is GLOBALLY unique, that's what the G stands for
Nov 16 '05 #2
Nadav wrote:
I am using the System.Type.GUID to identify similar types on different
computers, one computer send the GUID through a socket while the other
resolve the GUID and identify the type, when working on a single computer
everything works fine, BUT, when working on two different computers the GUID
extracted from one type is different from the GUID extracted from the same
type on the other computer. why is that happening? shouldn't a guid
representing one type on one computer be similar to the guid of the same type
on the other computer?????
Are you defining your *own* Guids with the
System.Runtime.InteropServices.GuidAttribute?
If not, you're looking for trouble, because
the Guids are automatically generated at compile
time.
Is there any other consistent identifier ( of a constant size ) that can be
extracted from a type? in the unmanaged reflection API I could use the
TokenId of the type BUT, I didn't find a way to get this ID through managed
code...


The most consistent indentifier is the type itself,
so try to send a serialized type over the wire.
This implies, that all computers have the save
type version, so you have to build an assemby
from that "remoted" types and keep it in sync
on all computers.

If you don't care about the type versioning,
then you may send the type name, but you're still
looking for trouble, because you may exchange
soma data between computers having different
versions of that type.

Finally, why on earth aren't you using remoting??

bye
Rob
Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Thomas Born | last post by:
Hi; I use following code in an ASP page to generate a GUID: <% dim obj Set obj = Server.CreateObject("Scriptlet.TypeLib") Response.Write(obj.guid) Set obj = nothing %>
7
by: headware | last post by:
Is the GUID generated by the .NET System.Guid.NewGuid() function compatible with Access' Replication ID field type? Dave
10
by: www.dir | last post by:
Hi, The following is from MSDN. "A GUID is a 128-bit integer (16 bytes) that can be used across all computers and networks wherever a unique identifier is required. Such an identifier has a...
2
by: Lee Crabtree | last post by:
I've been wrapping an unmanaged class, and everything has gone well. That is...until now. I've hit a wall while trying to marshal the System::Guid type down into the unmanaged GUID structure...
5
by: rcolby | last post by:
Evening, Wondering if someone can point me in the right direction, on how I would compare a system.guid with a system.byte. system.guid (pulled from sql server table with a data type of...
5
by: Michael Primeaux | last post by:
I have a simple .NET 2.0 web service created with VS.NET 2005 with a single web method with the following signature: void HelloWorld(Guid parameter1); When calling this method I receive the...
1
by: Jeff | last post by:
ASP.NET 2.0 In the code below, the reader has a column named "Id". The MsgInfo class needs that value sent into its constructor. But MsgInfo need it as a System.Guid datatype. How do I convert...
2
by: Jeff | last post by:
ASP.NET 2.0 I have a GridView on my webpage. As one of its columns I've put a HiddenField into a TemplateField. The porpose of this HiddenField is to hold the ID of the row. Each row in the...
2
by: Jeff | last post by:
ASP.NET 2.0 I'm wondering how to convert a string into a System.Guid! I have this code where I want to use the convert: Message.DeleteMessage(hidden.Value);. Here DeleteMessage wants an...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.