GUID

Posts 1–15 of 25 · Page 1 of 2
GUID
I can't wrap my head around this. So recently i generated a guid number with CoCreateGUID() and every time it is called it is a different guid number. How am i supposed to associate a certain user with the number if every time i check for their guid using that api it's changing. So i can't store it in a database since it changes everytime. I don't want to store the number on some .txt file hidden in the c drive or something because it's not as professional. So i guess this is kind of like a discussion more than a question. I have the code working and everything it's just that i don't understand how i can implement it. Thanks.
You should just generate the GUID once and store it in database. Check the database for GUID and if it exists don't create it again.
Thx for the fast reply at @Hassan. The issue is that theguid number is constantly being changed so I can't store it in a database since the next time they choose to open the app the guid number will be different. Do u get me?
You don't have to recreate the GUID every time ! Doing that would obviously result in new GUID. What I am saying is that you should first check the database for the GUID against a user. If it exists, no need to create it again, and if it doesn't create one and store in database. Get it ?
Well how would I know which user is using the app? I could make them put in a username but then they will share the username. So what exactly do you check against? @Hassan
Quote Originally Posted by 258456 View Post
Well how would I know which user is using the app? I could make them put in a username but then they will share the username. So what exactly do you check against? @Hassan
Passwords ? Wouldn't users get a password to login ?
Well the issue is its an exe so I wouldn't have to do guid if there was a login system @Hassan I am just curious how people have been using guids
Quote Originally Posted by 258456 View Post
Well the issue is its an exe so I wouldn't have to do guid if there was a login system @Hassan I am just curious how people have been using guids
@258456
I doubt you can create a non-shared login system using GUID's. If you are to use GUID only, then you'll have to either store one time generated GUID to registry or some setting file by encrypting it.
Quote Originally Posted by intervention61 View Post
have a look at GetVolumeInformation which you can use it to get serial number of hard drive
What if the user wants to use his application from some other computer ?
Quote Originally Posted by intervention61 View Post
have a look at GetVolumeInformation which you can use it to get serial number of hard drive
Ya that's what i was doing but it isn't as long as the guid. I think i am just gonna do that and do some mathematical operations on it.

---------- Post added at 02:46 PM ---------- Previous post was at 02:41 PM ----------

Quote Originally Posted by Hassan View Post


What if the user wants to use his application from some other computer ?
Well i will set a limit on how long they have to wait to do that because that's how people share their accounts. So if they want to then they will have to request it from me. I think the real issue is, what if they change their hard drive? I know some people use multiple drives but oh well, i think i will just take this method. Thanks guys. We can continue discussion if you guys want since i know there are other people who have been wanting to know this.
Edit:

I think I am just going to grab a bunch of numbers on the computer that aren't changing like serial number for hardrive maybe mac address and such. Thanks guys.
Quote Originally Posted by 258456 View Post
Edit:

I think I am just going to grab a bunch of numbers on the computer that aren't changing like serial number for hardrive maybe mac address and such. Thanks guys.
That will be an inefficient way of limiting the usage. There are better ways and you should consider them.
Quote Originally Posted by Hassan View Post


That will be an inefficient way of limiting the usage. There are better ways and you should consider them.
Like what? @Hassan.
Quote Originally Posted by 258456 View Post
Like what? @Hassan.
I mean, unless you generate it again, it will limit the application to be used on one computer only. Not a big deal really, but not a good thing too ! I would never use HWID as a unique key.
Posts 1–15 of 25 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us