home *** CD-ROM | disk | FTP | other *** search
/ Chip 1999 September / CHIPCD_9_99.iso / software / uaktualnienia / OptionPackPL / MTS4.CAB / TServer_StdAfx.h < prev    next >
C/C++ Source or Header  |  1998-04-27  |  2KB  |  68 lines

  1. // Filename: stdafx.h
  2. //
  3. // Description: Include file for standard system include files,
  4. //                or project specific include files that are used frequently,
  5. //                but are changed infrequently
  6. //
  7. // This file is provided as part of the Microsoft Transaction Server Samples
  8. //
  9. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT 
  10. // WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, 
  11. // INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES 
  12. // OF MERCHANTABILITY AND/OR FITNESS FOR A  PARTICULAR 
  13. // PURPOSE.
  14. //
  15. // Copyright (C) 1997 Microsoft Corporation, All rights reserved
  16.  
  17. #define _ATL_STATIC_REGISTRY
  18.  
  19. #if !defined(AFX_STDAFX_H__AA22C995_FD72_11D0_B5DC_00C04FB957D8__INCLUDED_)
  20. #define AFX_STDAFX_H__AA22C995_FD72_11D0_B5DC_00C04FB957D8__INCLUDED_
  21.  
  22. #if _MSC_VER >= 1000
  23. #pragma once
  24. #endif // _MSC_VER >= 1000
  25.  
  26. #define STRICT
  27.  
  28.  
  29. #define _WIN32_WINNT 0x0400
  30. #define _ATL_APARTMENT_THREADED
  31.  
  32.  
  33. #include <atlbase.h>
  34. //You may derive a class from CComModule and use it if you want to override
  35. //something, but do not change the name of _Module
  36. extern CComModule _Module;
  37. #include <atlcom.h>
  38.  
  39.  
  40. #define THROW_ERR(exp) if (FAILED (hr = (exp))) throw hr
  41.  
  42. inline BSTR TCHAR2BSTR (TCHAR* szBuf) {
  43.  
  44.     WCHAR* wszBuf;
  45.  
  46. #ifndef UNICODE
  47.     wszBuf = new WCHAR [512];
  48.     MultiByteToWideChar( CP_ACP, 0, szBuf, -1, wszBuf, 512 );
  49. #else
  50.     wszBuf = szBuf;
  51. #endif
  52.     
  53.     BSTR bstrNew = ::SysAllocString (wszBuf);
  54.  
  55. #ifndef UNICODE
  56.     delete [] wszBuf;
  57. #endif
  58.  
  59.     return bstrNew;
  60. }
  61.  
  62.  
  63. //{{AFX_INSERT_LOCATION}}
  64. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  65.  
  66. #endif // !defined(AFX_STDAFX_H__AA22C995_FD72_11D0_B5DC_00C04FB957D8__INCLUDED)
  67.  
  68.