guid

ID3DX10Mesh and ID3DXMesh Guids EXACTLY the same

I'm doing C# interop with Direct3D (I know about SlimDX and XNA so let's not get into the merits of this) and I'm calling D3DX10CreateMesh passing it my ID3DX10Mesh interface. I'm getting an error saying "No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))". The D3DX10CreateMesh call comes while I am trying t...

How unique is UUID?

How safe is it to use UUID to uniquely identify something (I'm using it for files uploaded to the server)? As I understand it, it is based off random numbers. However, it seems to me that given enough time, it would eventually repeat it self, just by pure chance. Is there a better system or a pattern of some type to alleviate this issue?...

Performance value of COMB guids

Jimmy Nilsson discusses his COMB guid concept here. This concept is popular in NHibernate, among other circles, for its supposed performance value over standard GUIDs which are typically far more random. However, in testing, this does not appear to be the case. Am I missing something? Test case: I have a table called temp (not a temp ...

SQL Server - Guid VS. Long

Hello! Up until now i've been using the C# "Guid = Guid.NewGuid();" method to generate a unique ID that can be stored as the ID field in some of my SQL Server database tables using Linq to SQL. I've been informed that for indexing reasons, using a GUID is a bad idea and that I should use an auto-incrementing Long instead. Will using a lo...

Shorter GUID using CRC

Hi, I am making a website in ASP.NET and want to be able to have a user profile which can be accessed via a URL with the users id at the end. Unique identifier is obviously a bad choice as it is long and (correct me if i am wrong) not really URL friendly. I was wondering if i produced a unique idnetifier on the ASP page then hashed it ...

is a GUID a good salt? is my register/login process got any flaw?

If my table inside the database look like: userid uniqueidentifier username varchar(20) password varbinary(max) When the user submit(to register), I send the user/pass to a stored procedure. The stored procedure create a new GUID(Using NEWID()) then I use the HashBytes(sha1) function of SQL Server to create the password based on t...

Generate number id from text/url for fast "SELECT"

I have the following problem: I have a feed capturer that captures news from different sources every half an hour. I only insert entries that don't have their URLs already in the database (URL is used to see if the record is already in database). Even with that, I get some repeated entries, because some sites report the same news (tha...

php - check for valid guid

I have a mssql database in which my primary keys are GUIDs. I am working on a web interface for inserting some data. I need a GUID, generated by php. I am using com_create_guid() function. So, before trying to insert I want to ensure that my parameters are valid. I can not find a way to check if a string(com_create_guid() returns string)...

Entity Frmwk pb: search for 'added' entities in current context

I'm using guids as PK for my entities. As EF doesn't support the newid() SQL statement, I force a Guid.NewGuid() in my creation methods. Here is my problem : I've a table with a clustered unique constraint (2 strings, not PK). I'm running some code in the same EF context which perfoms operations and adds/links entities, etc. Is it pos...

shortest encoding for Guid for use in a URL

The top result on google http://csharpfeeds.com/post/4382/A%5Fshorter%5Fand%5FURL%5Ffriendly%5FGUID.aspx will get one down to 00amyWGct0y_ze4lIsj2Mw Can it go smaller than that? ...

Using a GUID as the ID in a database with ASP.NET MVC

Hello SO: I am learning ASP.NET MVC. I am following one of the basic tutorials on asp.net. Since I do not always follow the tutorials to the letter, I decided to use a GUID as the identity column instead of an integer. Everything was working fine until I got up to the point of adding a new record to the database through the MVC applicat...

What's the C++ version of Guid.NewGuid()?

I need to create a GUID in an unmanaged windows C++ project. I'm used to C#, where I'd use Guid.NewGuid(). What's the (unmanaged windows) C++ version? ...

Strange 64/32-bit GUID issue under IIS7

One of my team has recently come across an interesting glitch in the matrix. If anyone can help explain this it'd be great. It is possibly a complicated to explain, so bear with me. We are building an ASP.Net application. In it we have a simple "if" statement. Guid adminId = Guid.Empty; if (mRoles.Contains("Admin")) { adminId = mU...

What's the purpose of Create GUID tool in Visual Studio?

Visual Studio has a Create GUID tool (Tools > Create GUID). What is it for? Can you remember what was the last time you used it? I just can't imagine why i should copy into the clipboard a new GUID with that tool. ...

Create new GUID in InnoSetup

Is there any way to generate a new GUID from inside an INNO Installer script? I'm not after a new AppId, just want to get some GUID text. Regards Tris ...

Represent a Guid as a set of integers

If I want to represent a guid as a set of integers how would I handle the conversion? I'm thinking along the lines of getting the byte array representation of the guid and breaking it up into the fewest possible 32 bit integers that can be converted back into the original guid. Code examples preferred... Also, what will the length of th...

Testing using a guid...how do I set the variable to a Guid?

I am testing some db layer functions. In one, I am similating the user passing in the id (a GUID). I have hardcoded the guid for testign purposes but can't seem to assign it to a variable , as rediculous as that sounds. In C# for a .NET 2.0 app. I have tried several ways, all failed. What is the proper way to set a guid to a variable. He...

Simple Generation of GUID in C

I feel like GUID/UUID questions have been done to death here, but I can't seem to find quite what I'm looking for. I need a function that will generate V4 GUIDs in C, i.e. something that is essentially compatibile with Guid.NewGuid from C#. This has to work on Windows (XP, Server 2003/8, etc) and 3 different distros of Unix (AIX, Sun, ...

How to Combine Two GUID Values

Hi, I want to combine two guid values and generate a 32 bit alphanumberic value(It can be done by using hashing). ...

Are GUIDs generated on Windows 2003 safe to use as session IDs?

My web application operates only over SSL and sets a time limited cookie for each user after they successfully login with a username and password. The biggest weaknesses in the system are one compromising an existing user's cookie. And two guessing a session ID GUID. I know of mechanisms for the first weakness but I'm wondering how muc...