Source code of Windows XP (NT5)
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.

85 lines
2.0 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1999, Microsoft Corp. All rights reserved.
  4. //
  5. // FILE
  6. //
  7. // precomp.h
  8. //
  9. // SYNOPSIS
  10. //
  11. // Include file for the inf2db project
  12. //
  13. // MODIFICATION HISTORY
  14. //
  15. // 02/12/1999 Original version.
  16. //
  17. //////////////////////////////////////////////////////////////////////////////
  18. #if !defined(PRECOMP_H__61594E40_C20F_11D2_9E31_00C04F6EA5B6__INCLUDED_)
  19. #define PRECOMP_H__61594E40_C20F_11D2_9E31_00C04F6EA5B6__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. ////////////////////////
  24. // Old-type defines
  25. ////////////////////////
  26. #define DBINITCONSTANTS // Initialize OLE constants...
  27. #define SIZELINEMAX 512
  28. ////////////////////////////////////
  29. // Macro
  30. ////////////////////////////////////
  31. #define CHECK_CALL_HRES(expr) \
  32. hres = expr; \
  33. if (FAILED(hres)) \
  34. { \
  35. TracePrintf("%s returned 0x%X\n", ## #expr, hres); \
  36. return hres; \
  37. }
  38. // Return the error code from a failed COM invocation. Useful if you don't
  39. // have to do any special clean-up.
  40. #define RETURN_ERROR(expr) \
  41. { HRESULT __hr__ = (expr); if (FAILED(__hr__)) return __hr__; }
  42. #include <atlbase.h>
  43. #include <crtdbg.h>
  44. #include <iostream>
  45. #include <vector>
  46. #include <list>
  47. #include <string>
  48. #include "oledb.h"
  49. #include "oledberr.h"
  50. #include "setupapi.h"
  51. namespace
  52. {
  53. const WCHAR TABLE_SECTION[] = L"Tables";
  54. const WCHAR VERSION_SECTION[] = L"Version";
  55. const WCHAR DATABASE_KEY[] = L"Database";
  56. const WCHAR TEMPORARY_FILENAME[] = L".\\_temporary.mdb";
  57. const long SIZELONGMAX = 10; //10 digits ?
  58. const int NUMBER_ARGUMENTS = 4;
  59. const long SIZE_MEMO_MAX = 32768;
  60. }
  61. // from helper
  62. HRESULT ConvertTypeStringToLong(const WCHAR *lColumnType, LONG *pType);
  63. void __cdecl TracePrintf(IN PCSTR szFormat, ...);
  64. void TraceString(IN WCHAR* wcString);
  65. void TraceString(IN char* cString);
  66. #endif
  67. // !defined(PRECOMP_H__61594E40_C20F_11D2_9E31_00C04F6EA5B6__INCLUDED_)