Leaked source code of windows server 2003
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.
 
 
 
 
 
 

349 lines
9.0 KiB

cpp_quote("/*******************************************************************************/" )
cpp_quote("/* */" )
cpp_quote("/* Copyright © Microsoft Corporation. All rights reserved. */" )
cpp_quote("/* */" )
/* REPOSIT.IDL */
/* */
cpp_quote("/*******************************************************************************/" )
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;
//***************************************************************************
//
//***************************************************************************
[object, local, 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, local, 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, local, 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, local, 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, local, 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);
};
}; // End of lib