Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
3.2 KiB

  1. utillib.lib - A collection of routines used by some of the samples applications.
  2. //***************************************************************************
  3. // Function: WbemErrorString
  4. // Purpose: Turns sc into a text string
  5. //***************************************************************************
  6. //***************************************************************************
  7. // Function: PrintError
  8. // Purpose: Formats and prints the error message
  9. //***************************************************************************
  10. //***************************************************************************
  11. // Function: PrintErrorAndExit
  12. // Purpose: Formats an error message & exits program
  13. //***************************************************************************
  14. //***************************************************************************
  15. // Function: PrintErrorAndAsk
  16. // Purpose: Prints the error message and prompts to continue
  17. //***************************************************************************
  18. //*****************************************************************************
  19. // Function: TypeToString
  20. // Purpose: Takes a variant, returns a pointer to a string that is the variant type
  21. //*****************************************************************************
  22. //*****************************************************************************
  23. // Function: TypeToString
  24. // Purpose: Takes a VARTYPE, returns a pointer to a string that is the variant type
  25. //*****************************************************************************
  26. //*****************************************************************************
  27. // Function: TypeToString
  28. // Purpose: Takes a CIMTYPE, returns a pointer to a string that is the variant type
  29. //*****************************************************************************
  30. //*****************************************************************************
  31. // Function: ValueToString
  32. // Purpose: Takes a variant, returns a string representation of that variant
  33. //*****************************************************************************
  34. //*****************************************************************************
  35. // Function: cvt
  36. // Purpose: Converts unicode to oem for console output
  37. // Note: y must be freed by caller
  38. //*****************************************************************************
  39. //*****************************************************************************
  40. // Function: myWFPrintf
  41. // Purpose: Checks to see if outputing to console and converts strings
  42. // to oem if necessary.
  43. // Note: Returns number of characters written (ie if we write 3 oem
  44. // chars, it returns 3. If it writes 4 wchars, it returns 4).
  45. //*****************************************************************************
  46. //*****************************************************************************
  47. // Function: difftime
  48. // Purpose: Returns the elapsed time between two _timeb structures
  49. // Note: This is different from the crt routine which works on time_t
  50. // structures.
  51. //*****************************************************************************