Results 1 to 7 of 7

Thread: Serial Key

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    May 2007
    Location
    Merced
    Posts
    868

    Serial Key

    I have an idea and Im wondering if anyone will help me out. So the client has the application and their serial number is in a caption. Before the user can see the main application they have to press a vailidate button. Thats where winsock comes to play.

    So on the server side of the application it waits for the connection from the user. This should be able to accept many applications at one time. In a listview it shows all they keys that are vaild,number of licences,and number of uses. So what the server will do is wait for the client to connect check the key from the caption then see how many times they key can be used and make that equal to the number of uses if their are uses left subtract one of the uses then allow the client to use the main application. Then lets say their are no more users left tell the client they have to turn off the application on one of the other clients.

    Can this be done? If so can someone be willing to provide a basic example and I can build up from there?

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    May 2007
    Location
    Merced
    Posts
    868

    Re: Serial Key

    No one to help?

  3. #3
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,250

    Re: Serial Key

    I think you have some potential problems you will want to address.

    1. What if the user does not have an internet/server connection? Will they be prevented from using your application?

    2. What if some, but not all, users have internet/server connections? Will the ones without the connection be prevented from using the application?

    3. If you are subtracting one for each user, then you need to add one each time a user closes the application, correct? Same problems as above. What if user's connection fails and the closing application cannot connect? What if the user's application is closed from task manager or something else and does not notify your server?

    Regarding examples of the server accepting multiple connections, you can find plenty of examples on this forum and the code bank. Any chat program does this. I would think that a permanent connection is never needed: connect, verify, disconnect.

    P.S. Where is this server? Is it in a network you control or will it be on the internet? Will the clients be required to stay connected to the server until the application is closed?
    Last edited by LaVolpe; Nov 2nd, 2009 at 01:06 PM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    May 2007
    Location
    Merced
    Posts
    868

    Re: Serial Key

    Quote Originally Posted by LaVolpe View Post
    I think you have some potential problems you will want to address.

    1. What if the user does not have an internet/server connection? Will they be prevented from using your application?

    2. What if some, but not all, users have internet/server connections? Will the ones without the connection be prevented from using the application?

    3. If you are subtracting one for each user, then you need to add one each time a user closes the application, correct? Same problems as above. What if user's connection fails and the closing application cannot connect? What if the user's application is closed from task manager or something else and does not notify your server?

    Regarding examples of the server accepting multiple connections, you can find plenty of examples on this forum and the code bank. Any chat program does this. I would think that a permanent connection is never needed: connect, verify, disconnect.

    P.S. Where is this server? Is it in a network you control or will it be on the internet? Will the clients be required to stay connected to the server until the application is closed?
    Thanks for your reply LaVolpe, and I have an answer to all your questions.

    1. Yes sadley, that is what I'm going for and the application will still be usable but some features will be "disabled".
    2. The same answer as #1, this application was made to use the internet and it will still be unsaleable except some features will be "disabled".
    3. Yes LaVolpe that is correct and that is the same concept that I'm going for. When the application is ran then it subtracts a use and if the application is closed then it adds a use back. That is a good question and what will happen is in a time period if there is no response from the computer the connection will automatically be closed/dropped.
    4. It is on a network that I control. (The SerVer) Yes, the clients will have to stay connected to the server until the application is closed.

  5. #5
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,250

    Re: Serial Key

    Well, it's been awhile since I worked with Winsock. I think by looking at some chat programs you can answer most of your questions. Chat programs have a server and multiple clients.

    1. Your client will connect to the server
    2. If no more client connections are authorized, reject the connection. Otherwise accept the connection and subtract from your count.
    3. If your client is denied a connection inform the user that no more connections are authorized or internet/server connection is lost & abort/unload your app.
    4. Once a client app is about to close, in Form_QueryUnload or Form_Unload, send to server a message indicating they are closing so you can disconnect and increment your count. If a client is aborted via task manager, the winsock connection will close too. Your sever should get that notice via its Winsock_Close event.
    Last edited by LaVolpe; Nov 3rd, 2009 at 01:21 PM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    May 2007
    Location
    Merced
    Posts
    868

    Re: Serial Key

    Can you point me in the right direction because I know that I can work with chat programs that are aviavilbe I'm just wondering about the whole sending the serial key and locking on to the server...

  7. #7
    Frenzied Member Jim Davis's Avatar
    Join Date
    Mar 2001
    Location
    Mars base one Username: Jim Davis Password: yCrm33
    Posts
    1,284

    Re: Serial Key

    he didn't meant to use a chat program, but what is he pointing on is a chat server/client expample that you can modify to make it suitable for your needs. you don't even need the textboxes and such from the chat client, but the 'engine' only, that is you can use to send the key, and receive commands, that makes the application to unlock itself for the actual session.

    here is a chat server example, but you can find zillions of that even on planet-source-code.com.
    http://planet-source-code.com/vb/scr...=7090&lngWId=1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width