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.
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.
Last edited by Hassan; 01-27-2012 at 11:37 PM. Reason: NVM :P
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
Last edited by 258456; 01-28-2012 at 12:16 AM.
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
Last edited by 258456; 01-28-2012 at 12:46 AM.
@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.
have a look at GetVolumeInformation which you can use it to get serial number of hard drive
"Joker: why the hakcer are steaklign us name it´s the greatest asshole and motherfucker and i fuck him or her mother"
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 ----------
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.
Like what? @Hassan.