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.

91 lines
1.9 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Abstract:
  4. @doc
  5. @module VssTest.h | Main header file for the test application
  6. @end
  7. Author:
  8. Adi Oltean [aoltean] 07/22/1999
  9. Revision History:
  10. Name Date Comments
  11. aoltean 07/22/1999 Created
  12. --*/
  13. #if !defined(__VSS_TEST_H__)
  14. #define __VSS_TEST_H__
  15. #if _MSC_VER > 1000
  16. #pragma once
  17. #endif // _MSC_VER > 1000
  18. #ifndef __AFXWIN_H__
  19. #error include 'stdafx.hxx' before including this file for PCH
  20. #endif
  21. #include "resource.h" // main symbols
  22. /////////////////////////////////////////////////////////////////////////////
  23. // CVssTestApp:
  24. // See Test.cpp for the implementation of this class
  25. //
  26. class CVssTestApp : public CWinApp
  27. {
  28. public:
  29. CVssTestApp();
  30. // Overrides
  31. // ClassWizard generated virtual function overrides
  32. //{{AFX_VIRTUAL(CVssTestApp)
  33. public:
  34. virtual BOOL InitInstance();
  35. virtual BOOL ExitInstance();
  36. //}}AFX_VIRTUAL
  37. // Implementation
  38. //{{AFX_MSG(CVssTestApp)
  39. // NOTE - the ClassWizard will add and remove member functions here.
  40. // DO NOT EDIT what you see in these blocks of generated code !
  41. //}}AFX_MSG
  42. DECLARE_MESSAGE_MAP()
  43. };
  44. inline void AFXAPI DDX_Text(CDataExchange* pDX, int nIDC, GUID& value)
  45. {
  46. if (pDX->m_bSaveAndValidate)
  47. {
  48. CString str;
  49. DDX_Text(pDX, nIDC, str);
  50. LPTSTR ptszObjectId = const_cast<LPTSTR>(LPCTSTR(str));
  51. HRESULT hr = ::CLSIDFromString(T2OLE(ptszObjectId), &value);
  52. if (hr != S_OK)
  53. pDX->Fail(); // throws exception
  54. }
  55. else
  56. {
  57. CString str;
  58. str.Format(WSTR_GUID_FMT, GUID_PRINTF_ARG(value));
  59. DDX_Text(pDX, nIDC, str);
  60. }
  61. }
  62. /////////////////////////////////////////////////////////////////////////////
  63. //{{AFX_INSERT_LOCATION}}
  64. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  65. #endif // !defined(__VSS_TEST_H__)