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.

102 lines
2.3 KiB

  1. /*++
  2. Copyright (c) 1994-1998 Microsoft Corporation
  3. Module Name :
  4. stdafx.cpp
  5. Abstract:
  6. Pre-compiled header file
  7. Author:
  8. Ronald Meijer (ronaldm)
  9. Project:
  10. Internet Services Manager
  11. Revision History:
  12. --*/
  13. #define OEMRESOURCE // Give me OEM resource definitions
  14. #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
  15. #include <stdio.h>
  16. #include <afxwin.h>
  17. #include <afxdlgs.h>
  18. #include <afxext.h> // MFC extensions
  19. #include <afxcoll.h> // collection class
  20. #include <afxdisp.h> // CG: added by OLE Control Containment component
  21. #include <afxpriv.h>
  22. #include <atlbase.h>
  23. #ifndef _AFX_NO_AFXCMN_SUPPORT
  24. #include <afxcmn.h>
  25. #endif // _AFX_NO_AFXCMN_SUPPORT
  26. #include <tchar.h>
  27. class CFlexComModule : public CComModule
  28. {
  29. public:
  30. CFlexComModule() : CComModule() {}
  31. HRESULT WINAPI UpdateRegistryClass(
  32. const CLSID& clsid,
  33. LPCTSTR lpszProgID,
  34. LPCTSTR lpszVerIndProgID,
  35. UINT nDescID,
  36. DWORD dwFlags,
  37. BOOL bRegister
  38. );
  39. };
  40. //extern CComModule _Module;
  41. extern CFlexComModule _Module;
  42. #include <atlcom.h>
  43. #ifndef MIDL_INTERFACE
  44. #define MIDL_INTERFACE(x) struct
  45. #endif // MIDL_INTERFACE
  46. #ifndef __RPCNDR_H_VERSION__
  47. #define __RPCNDR_H_VERSION__ 440
  48. #endif // __RPCNDR_H_VERSION__
  49. #pragma comment(lib, "mmc")
  50. #include <mmc.h>
  51. #include "afxtempl.h"
  52. #include "guids.h"
  53. #include "winsock2.h" // WinSock definitions
  54. #include <aclapi.h>
  55. //
  56. // Debug instance counter
  57. //
  58. #ifdef _DEBUG
  59. inline void DbgInstanceRemaining(char * pszClassName, int cInstRem)
  60. {
  61. //char buf[100];
  62. //wsprintfA(buf, "%s has %d instances left over.", pszClassName, cInstRem);
  63. //::MessageBoxA(NULL, buf, "Memory Leak!!!", MB_OK);
  64. }
  65. #define DEBUG_DECLARE_INSTANCE_COUNTER(cls) extern int s_cInst_##cls = 0
  66. #define DEBUG_INCREMENT_INSTANCE_COUNTER(cls) ++(s_cInst_##cls);
  67. #define DEBUG_DECREMENT_INSTANCE_COUNTER(cls) --(s_cInst_##cls);
  68. #define DEBUG_VERIFY_INSTANCE_COUNT(cls) \
  69. extern int s_cInst_##cls; \
  70. if (s_cInst_##cls) DbgInstanceRemaining(#cls, s_cInst_##cls);
  71. #else
  72. #define DEBUG_DECLARE_INSTANCE_COUNTER(cls)
  73. #define DEBUG_INCREMENT_INSTANCE_COUNTER(cls)
  74. #define DEBUG_DECREMENT_INSTANCE_COUNTER(cls)
  75. #define DEBUG_VERIFY_INSTANCE_COUNT(cls)
  76. #endif // _DEBUG