Results 1 to 3 of 3

Thread: Getting the constant string of an integer

  1. #1

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827

    Getting the constant string of an integer

    I am using "GetLastError()" to get the error I got but it always returns that as an integer value. All the errors do have a string descriptive constant with them (eg WSAENOINIT). How would I get that string instead of the actual number?
    Baaaaaaaaah

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Use FormatMessage to get an error description. The descriptive constant you mean is only a symbol for easier coding and is not available at runtime.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    Ok thanks.
    Baaaaaaaaah

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