Results 1 to 6 of 6

Thread: Generating unique IDs

  1. #1

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    Resolved Generating unique IDs

    I need to generate a random unique ID to be used as an unique identifier for a message that needs to be sent to another application.

    The idea, is that this other application does not answer, the message will be re-sent. And if this application wants to answer... it would be great to know which is "he" responding to.

    In other words, I need unique identifiers (for each message being sent) so that the program can identify which answer belong to each question. TIA,
    Last edited by Mc Brain; Apr 7th, 2005 at 12:59 PM.
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  2. #2
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: Generating unique IDs

    Try GUIDGEN.EXE

    Incedentally, are you using DCOM? If not, what then?

    Dave
    Nobody knows what software they want until after you've delivered what they originally asked for.

    Don't solve problems which don't exist.

    "If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)

    2 idiots don't make a genius.

  3. #3
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: Generating unique IDs

    What are you using to send messages from one application to the other?

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Generating unique IDs

    If you need a GUID for each message sent, there's an API call that will generate one. I *think* it's "CreateGUID" but not sure.

    I've used it before but don't have the code infront of me.

    Tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  5. #5

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    Re: Generating unique IDs

    Quote Originally Posted by techgnome
    If you need a GUID for each message sent, there's an API call that will generate one. I *think* it's "CreateGUID" but not sure.

    I've used it before but don't have the code infront of me.

    Tg
    Thank you. I knew there was an API (because I've seen if before) but could remember the name.

    http://www.mentalis.org/apilist/CoCreateGuid.shtml
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  6. #6

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    Re: Generating unique IDs

    Quote Originally Posted by DigiRev
    What are you using to send messages from one application to the other?
    I'm using Microsoft Winsock.
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

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