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.

75 lines
1.4 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Abstract:
  4. @doc
  5. @module Util.cpp | Implementation of utility functions
  6. @end
  7. Author:
  8. Adi Oltean [aoltean] 12/02/1999
  9. TBD:
  10. Add comments.
  11. Revision History:
  12. Name Date Comments
  13. aoltean 12/02/1999 Created
  14. --*/
  15. /////////////////////////////////////////////////////////////////////////////
  16. // Defines
  17. // C4290: C++ Exception Specification ignored
  18. #pragma warning(disable:4290)
  19. // warning C4511: 'CVssCOMApplication' : copy constructor could not be generated
  20. #pragma warning(disable:4511)
  21. // warning C4127: conditional expression is constant
  22. #pragma warning(disable:4127)
  23. /////////////////////////////////////////////////////////////////////////////
  24. // Includes
  25. #include <wtypes.h>
  26. #include <stddef.h>
  27. #include <oleauto.h>
  28. #include <comadmin.h>
  29. #include "vs_assert.hxx"
  30. // ATL
  31. #include <atlconv.h>
  32. #include <atlbase.h>
  33. extern CComModule _Module;
  34. #include <atlcom.h>
  35. #include "vs_inc.hxx"
  36. #include "comadmin.hxx"
  37. #include "vsevent.h"
  38. #include "writer.h"
  39. LPWSTR QueryString(LPWSTR wszPrompt)
  40. {
  41. static WCHAR wszBuffer[200];
  42. wprintf(wszPrompt);
  43. return _getws(wszBuffer);
  44. }
  45. INT QueryInt(LPWSTR wszPrompt)
  46. {
  47. static WCHAR wszBuffer[20];
  48. wprintf(wszPrompt);
  49. _getws(wszBuffer);
  50. return _wtoi(wszBuffer);
  51. }