|
|
|
| 1 |
|
//*************************************************************************** |
| 2 |
|
// |
| 3 |
|
// Copyright (c) Microsoft Corporation. All rights reserved. |
| 4 |
|
// |
| 5 |
|
// FWcommon.h |
| 6 |
|
// |
| 7 |
|
// Purpose: Definition of EventProvider class |
| 8 |
|
// |
| 9 |
|
//*************************************************************************** |
| 10 |
|
|
| 11 |
|
#if _MSC_VER > 1000 |
| 12 |
|
#pragma once |
| 13 |
|
#endif |
| 14 |
|
|
| 15 |
|
#define FRAMEWORK_ALLOW_DEPRECATED 0 |
| 16 |
|
|
| 17 |
|
// ALWAYS INCLUDE THIS FILE FIRST! |
| 18 |
|
|
| 19 |
|
#ifndef _FW_COMMON_H_ |
| 20 |
|
#define _FW_COMMON_H_ |
| 21 |
|
|
| 22 |
|
// move warnings to level four |
| 23 |
|
#pragma warning(4 : 4275 4800 4786 4251) |
| 24 |
|
// C4275: non DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier' |
| 25 |
|
// C4800: forcing bool variable to one or zero, possible performance loss |
| 26 |
|
// C4786: 'identifier' : identifier was truncated to 'number' characters in the debug information |
| 27 |
|
// C4251: 'identifier' : class 'type' needs to have dll-interface to export class 'type2' |
| 28 |
|
|
| 29 |
|
|
| 30 |
|
#include "windows.h" |
| 31 |
|
|
| 32 |
|
// This function gets macro'ed to GetObjectW and GetObjectA based on the |
| 33 |
|
// contents of UNICODE. However, we USE a function called GetObject. For |
| 34 |
|
// single binary support, we can't have this being macro'ed. If the actual |
| 35 |
|
// win32 api GetObject is needed, call the GetObjectW or GetObjectA directly. |
| 36 |
|
#undef GetObject |
| 37 |
|
#include <wbemidl.h> |
| 38 |
|
#include <wmiutils.h> |
| 39 |
|
|
| 40 |
|
// If USE_POLARITY not defined, some Framedyn.dll symbols may not resolve correctly |
| 41 |
|
// It's a declspec(dllimport/dllexport) issue. |
| 42 |
|
#ifndef USE_POLARITY |
| 43 |
|
|
| 44 |
|
// For most users, this is the correct setting for POLARITY. |
| 45 |
|
#define USE_POLARITY |
| 46 |
|
|
| 47 |
|
#endif |
| 48 |
|
|
| 49 |
|
// Required since TCHAR.H defines _ttoi64 -> atoi64, which requires oldnames.lib, which |
| 50 |
|
// we don't use. |
| 51 |
|
#define atoi64 _atoi64 |
| 52 |
|
|
| 53 |
|
#include <Polarity.h> |
| 54 |
|
|
| 55 |
|
|
| 56 |
|
#ifndef EXPORT_LOCKIT |
| 57 |
|
|
| 58 |
|
#undef _CRTIMP |
| 59 |
|
#define _CRTIMP |
| 60 |
|
#include <yvals.h> |
| 61 |
|
#undef _CRTIMP |
| 62 |
|
|
| 63 |
|
#else |
| 64 |
|
|
| 65 |
|
#undef _CRTIMP |
| 66 |
|
#define _CRTIMP POLARITY |
| 67 |
|
#include <yvals.h> |
| 68 |
|
#undef _CRTIMP |
| 69 |
|
|
| 70 |
|
#endif |
| 71 |
|
|
| 72 |
|
#include <stllock.h> |
| 73 |
|
extern POLARITY CCritSec g_cs; |
| 74 |
|
|
| 75 |
|
#include "utillib.h" |
| 76 |
|
#include "ThrdBase.h" |
| 77 |
|
#include "RefPtrCo.h" |
| 78 |
|
#include "MethodCo.h" |
| 79 |
|
#include "FRQuery.h" |
| 80 |
|
#include "wbemglue.h" |
| 81 |
|
#include "instance.h" |
| 82 |
|
|
| 83 |
|
class CFramework_Exception |
| 84 |
|
{ |
| 85 |
|
private: |
| 86 |
|
|
| 87 |
|
CHString m_sErrorText; |