|
|
//*************************************************************************** // // (c) 1999 by Microsoft Corp. All Rights Reserved. // // REPOSIT.IDL // // raymcc 18-Mar-99 Created as prototype for Quasar. // raymcc 23-Mar-99 Misc. corrections; added IWmiDbIterator // cvadai 31-Mar-99 Added Cancel and timeout to IWmiDbIterator // cvadai 02-Apr-99 Modified IWmiDbBatchSession parameters. // cvadai 06-Apr-99 Changed Logon out parameter to IWmiDbSession. // raymcc 06-May-99 New handle type for duplication // cvadai 13-May-99 New flags for logon, security. // cvadai 29-Jul-99 Removed SetNamespacePath, added Logon param. // //***************************************************************************
import "..\wmiutils.idl";
[uuid(2af77340-dd7b-11d2-9217-00aa001f98b5)]
library WmiRepository_v0 { importlib("stdole32.tlb");
interface IWmiDbSession;
typedef BYTE *PNTSECURITY_DESCRIPTOR;
typedef enum { WMIDB_HANDLE_TYPE_INVALID = 0,
// Lock level WMIDB_HANDLE_TYPE_COOKIE = 0x1, WMIDB_HANDLE_TYPE_VERSIONED = 0x2, WMIDB_HANDLE_TYPE_PROTECTED = 0x3, WMIDB_HANDLE_TYPE_EXCLUSIVE = 0x4,
// Cache levels WMIDB_HANDLE_TYPE_NO_CACHE = 0x100, WMIDB_HANDLE_TYPE_WEAK_CACHE = 0x200, WMIDB_HANDLE_TYPE_STRONG_CACHE = 0x300,
// Special behavior WMIDB_HANDLE_TYPE_PERSISTENT = 0x1000, WMIDB_HANDLE_TYPE_AUTODELETE = 0x2000,
// Open Context WMIDB_HANDLE_TYPE_SCOPE = 0x10000, WMIDB_HANDLE_TYPE_CONTAINER = 0x20000,
WMIDB_HANDLE_TYPE_SUBSCOPED = 0x80000000
} WMIDB_HANDLE_TYPE;
typedef enum { // Batch operation flags
WMIDB_FLAG_BEST_EFFORT = 0x1, WMIDB_FLAG_ATOMIC = 0x2, WMIDB_FLAG_LOOKAHEAD = 0x10
} WMIDB_BATCH_FLAGS;
typedef enum { // Statistics flags
WMIDB_FLAG_TOTAL_HANDLES = 0x1, WMIDB_FLAG_CACHE_SATURATION = 0x2, WMIDB_FLAG_CACHE_HIT_RATE = 0x3
} WMIDB_STATISTICS_FLAGS;
typedef enum { // Logon flags
WMIDB_FLAG_ADMIN_VERIFIED = 0x10, WMIDB_FLAG_NO_INIT = 0x20
} WMIDB_LOGON_FLAGS;
typedef enum { // Security flags
WMIDB_FLAG_SECURITY_LOCAL_ONLY = 0x1, WMIDB_FLAG_SECURITY_PROPOGATED = 0x2
} WMIDB_SECURITY_FLAGS;
typedef enum { // Query flags
WMIDB_FLAG_QUERY_SHALLOW = 0x0, WMIDB_FLAG_QUERY_DEEP = 0x1
} WMIDB_QUERY_FLAGS;
typedef enum { WMIDB_ENABLE_EVENTS = 0x0, WMIDB_DISABLE_EVENTS = 0x1000
} WMIDB_EVENT_PUT_DELETE_FLAGS;
typedef enum { // shutdown flags WMIDB_SHUTDOWN_NET_STOP = 0x0, WMIDB_SHUTDOWN_MACHINE_DOWN = 0x1 } WMIDB_SHUTDOWN_FLAGS;
//*************************************************************************** // //***************************************************************************
[uuid(89B9BAF8-6A06-11d3-A5FE-00105A0A3102)] coclass WmiRepository_SQL { interface IWmiDbController; };
[uuid(89B9BAFC-6A06-11d3-A5FE-00105A0A3102)] coclass WmiRepository_Jet { interface IWmiDbController; };
[object, uuid(0bc53e37-dd83-11d2-9217-00aa001f98b5)]
interface IWmiDbHandle : IUnknown { HRESULT GetHandleType([out] DWORD *pdwType); };
//*************************************************************************** // // Logon template definitions // //***************************************************************************
typedef struct { DWORD dwId; DWORD dwFlags; BSTR strParmDisplayName; VARIANT Value; } WMIDB_LOGON_PARAMETER;
typedef struct { DWORD dwArraySize; [size_is(dwArraySize)] WMIDB_LOGON_PARAMETER *pParm; } WMIDB_LOGON_TEMPLATE;
//*************************************************************************** // //***************************************************************************
[object, uuid(2af77343-dd7b-11d2-9217-00aa001f98b5)]
interface IWmiDbController : IUnknown { HRESULT Logon( [in] WMIDB_LOGON_TEMPLATE *pLogonParms, [in] DWORD dwFlags, [in] DWORD dwRequestedHandleType, [out] IWmiDbSession **ppSession, [out] IWmiDbHandle **ppRootNamespace );
HRESULT GetLogonTemplate( [in] LCID lLocale, [in] DWORD dwFlags, [out] WMIDB_LOGON_TEMPLATE **ppLogonTemplate );
HRESULT FreeLogonTemplate( [in, out] WMIDB_LOGON_TEMPLATE **ppTemplate );
HRESULT Shutdown( [in] DWORD dwFlags );
HRESULT SetCallTimeout( [in] DWORD dwMaxTimeout );
HRESULT SetCacheValue( [in] DWORD dwMaxBytes );
HRESULT FlushCache( [in] DWORD dwFlags );
HRESULT GetStatistics( [in] DWORD dwParameter, [out] DWORD *pdwValue );
HRESULT Backup( [in] LPCWSTR szBackupFile, [in] long lFlags );
HRESULT Restore( [in] LPCWSTR szBackupFile, [in] long lFlags );
HRESULT LockRepository();
HRESULT UnlockRepository();
HRESULT GetRepositoryVersions( [out] DWORD *pdwOldVersion, [out] DWORD *pdwCurrentVersion ); };
//*************************************************************************** // //***************************************************************************
[object, uuid(2380c7e0-e14b-11d2-9220-00aa001f98b5)]
interface IWmiDbIterator : IUnknown { HRESULT Cancel ( [in] DWORD dwFlags, [in] void* pFiber);
HRESULT NextBatch( [in] DWORD dwNumRequested, [in] DWORD dwTimeOutSeconds, [in] DWORD dwFlags, [in] DWORD dwRequestedHandleType, [in] REFIID riid, [in] void* pFiber, [out] DWORD *pdwNumReturned, [out, size_is(dwNumRequested), length_is(*pdwNumReturned), iid_is(riid)] LPVOID *ppObjects ); };
//*************************************************************************** // //***************************************************************************
[object, uuid(2af77345-dd7b-11d2-9217-00aa001f98b5)]
interface IWmiDbSession : IUnknown { HRESULT GetObject( [in] IWmiDbHandle *pScope, [in] IWbemPath *pPath, [in] DWORD dwFlags, [in] DWORD dwRequestedHandleType, [out] IWmiDbHandle **ppResult );
HRESULT GetObjectDirect( [in] IWmiDbHandle *pScope, [in] IWbemPath *pPath, [in] DWORD dwFlags, [in] REFIID riid, [out, iid_is(riid)] LPVOID *pObj );
HRESULT PutObject( [in] IWmiDbHandle *pScope, [in] REFIID riid, [in, iid_is(riid)] LPVOID pObj, [in] DWORD dwFlags, [in] DWORD dwRequestedHandleType, [out] IWmiDbHandle **ppResult );
HRESULT DeleteObject( [in] IWmiDbHandle *pScope, [in] DWORD dwFlags, [in] REFIID riid, [in, iid_is(riid)] LPVOID pObj );
HRESULT ExecQuery( [in] IWmiDbHandle *pScope, [in] IWbemQuery *pQuery, [in] DWORD dwFlags, [in] DWORD dwRequestedHandleType, [out] DWORD *dwMessageFlags, [out] IWmiDbIterator **ppQueryResult );
HRESULT RenameObject( [in] IWbemPath *pOldPath, [in] IWbemPath *pNewPath, [in] DWORD dwFlags, [in] DWORD dwRequestedHandleType, [out] IWmiDbHandle **ppResult );
HRESULT Enumerate( [in] IWmiDbHandle *pScope, [in] DWORD dwFlags, [in] DWORD dwRequestedHandleType, [out] IWmiDbIterator **ppQueryResult );
HRESULT AddObject( [in] IWmiDbHandle *pScope, [in] IWbemPath *pPath, [in] DWORD dwFlags, [in] DWORD dwRequestedHandleType, [out] IWmiDbHandle **ppResult );
HRESULT RemoveObject ( [in] IWmiDbHandle *pScope, [in] IWbemPath *pPath, [in] DWORD dwFlags );
HRESULT SetDecoration( [in] LPWSTR lpMachineName, [in] LPWSTR lpNamespacePath );
HRESULT SupportsQueries( [in] DWORD *dwQuerySupportLevel ); };
[object, uuid(4b3cca15-0e03-44cb-9b7a-822f9faf6ec0)] interface IWmiDbSessionEx : IWmiDbSession { HRESULT GetObjectByPath( [in] IWmiDbHandle *pScope, [in, string] LPCWSTR wszPath, [in] DWORD dwFlags, [in] REFIID riid, [out, iid_is(riid)] LPVOID *pObj );
HRESULT DeleteObjectByPath( [in] IWmiDbHandle *pScope, [in, string] LPCWSTR wszPath, [in] DWORD dwFlags );
HRESULT BeginWriteTransaction([in] DWORD dwFlags); HRESULT BeginReadTransaction([in] DWORD dwFlags); HRESULT CommitTransaction([in] DWORD dwFlags); HRESULT AbortTransaction([in] DWORD dwFlags); };
// Dummy interface to work around MIDL not stripping all the interface // attributes for IWmiDbSession (MIDL 6.00.0328)
[object, uuid(15e6e24f-7432-4da9-9bd4-c33db0df06c0)] interface I15e6e24f74324da99bd4c33db0df06c0 : IUnknown { HRESULT foo(); };
//*************************************************************************** // //***************************************************************************
typedef struct { HRESULT hRes; DWORD dwFlags; IWbemPath *pPath; IUnknown *pHandle; IWmiDbHandle *pReturnHandle; } WMI_BATCH_OBJECT_ACCESS;
typedef struct { DWORD dwArraySize; [size_is(dwArraySize)] WMI_BATCH_OBJECT_ACCESS *pElements; } WMIOBJECT_BATCH;
//*************************************************************************** // //***************************************************************************
[object, uuid(0bc53e39-dd83-11d2-9217-00aa001f98b5)]
interface IWmiDbBatchSession : IUnknown { HRESULT GetObjects( [in] IWmiDbHandle *pScope, [in] DWORD dwFlags, [in] DWORD dwRequestedHandleType, [in, out] WMIOBJECT_BATCH *pBatch );
HRESULT PutObjects( [in] IWmiDbHandle *pScope, [in] DWORD dwFlags, [in] DWORD dwRequestedHandleType, [in, out] WMIOBJECT_BATCH *pBatch );
HRESULT DeleteObjects( [in] IWmiDbHandle *pScope, [in] DWORD dwFlags, [in] WMIOBJECT_BATCH *pBatch ); };
[object, uuid(843180D9-8489-42d7-BB07-3A5D91818E2E)]
interface IWmiDbBackupRestore : IUnknown { HRESULT Backup ( [in] LPCWSTR lpBackupPath, [in] DWORD dwFlags );
HRESULT Restore ( [in] LPCWSTR lpRestorePath, [in] LPCWSTR lpDestination, [in] DWORD dwFlags ); };
}; // End of lib
|