2025-04-27 07:49:33 -04:00

508 lines
19 KiB
Plaintext

cpp_quote ("/*++")
cpp_quote(" ")
cpp_quote("Copyright (c) 1997 Microsoft Corporation")
cpp_quote(" ")
cpp_quote("Module Name: iadm.h")
cpp_quote(" ")
cpp_quote(" Admin Objects Interfaces")
cpp_quote(" ")
cpp_quote ("--*/")
cpp_quote("#ifndef _ADM_IADM_")
cpp_quote("#define _ADM_IADM_")
import "mddef.idl";
import "unknwn.idl";
import "wtypes.idl";
import "objidl.idl";
import "ocidl.idl";
import "iiscblob.h"; // Removed by POSTMIDL.SCR after IADM.H is generated!
cpp_quote("#include <mdcommsg.h>")
cpp_quote("#include <mdmsg.h>")
cpp_quote("/* ")
cpp_quote(" Error Codes ")
cpp_quote(" ")
cpp_quote(" Admin api's all return HRESULTS. Since internal results are either ")
cpp_quote(" winerrors or Metadata specific return codes (see mdmsg.h), they are ")
cpp_quote(" converted to HRESULTS using the RETURNCODETOHRESULT macro (see ")
cpp_quote(" commsg.h). ")
cpp_quote("*/ ")
cpp_quote(" ")
cpp_quote("/* ")
cpp_quote(" Max Name Length ")
cpp_quote(" The maximum number of characters in the length of a metaobject name, ")
cpp_quote(" including the terminating NULL. This refers to each node in the tree, ")
cpp_quote(" not the entire path. ")
cpp_quote(" eg. strlen(\"Root\") < ADMINDATA_MAX_NAME_LEN ")
cpp_quote("*/ ")
#define ADMINDATA_MAX_NAME_LEN 256
cpp_quote("#define ADMINDATA_MAX_NAME_LEN 256")
cpp_quote(" ")
cpp_quote("DEFINE_GUID(CLSID_MSAdminBase, 0x88e4ba60, 0x537b, 0x11d0, 0x9b, 0x8e, 0x0, 0xa0, 0xc9, 0x22, 0xe7, 0x3);")
cpp_quote("DEFINE_GUID(IID_IMSAdminBase, 0xcba424f0, 0x483a, 0x11d0, 0x9d, 0x2a, 0x0,0xa0, 0xc9, 0x22, 0xe7, 0x3);")
cpp_quote("DEFINE_GUID(CLSID_MSAdminBaseExe, 0xdf380700, 0x537d, 0x11d0, 0x9b, 0x8e, 0x0, 0xa0, 0xc9, 0x22, 0xe7, 0x3);")
cpp_quote("DEFINE_GUID(CLSID_MSAdmin, 0x668583f0, 0x6fdb, 0x11d0, 0xb9, 0xb0, 0x0, 0xa0, 0xc9, 0x22, 0xe7, 0x50);")
cpp_quote("DEFINE_GUID(IID_IMSAdminBaseSink, 0x1e056350, 0x761e, 0x11d0, 0x9b, 0xa1, 0x0, 0xa0, 0xc9, 0x22, 0xe7, 0x03);")
cpp_quote("DEFINE_GUID(IID_IMSMetaBase, 0xc1bea50, 0x4fd7, 0x11d0, 0xb9, 0xac, 0x0, 0xa0, 0xc9, 0x22, 0xe7, 0x50);")
cpp_quote("DEFINE_GUID(IID_IMSMetaDataItem, 0x3e31f00, 0x627c, 0x11d0, 0xb9, 0xad, 0x0, 0xa0, 0xc9, 0x22, 0xe7, 0x50);")
cpp_quote("DEFINE_GUID(IID_IMSMetaKey, 0x34617b10, 0x7fbc, 0x11d0, 0xb9, 0xb1, 0x0, 0xa0, 0xc9, 0x22, 0xe7, 0x50);")
//cpp_quote("DEFINE_GUID(DIID_IMSAdminSCRIPT, 0x850f0fa0, 0x4fd5, 0x11d0, 0xb9, 0xac, 0x0, 0xa0, 0xc9, 0x22, 0xe7, 0x50);")
cpp_quote("DEFINE_GUID(LIBID_MSAdmin, 0x1b890330, 0x4f09, 0x11d0, 0xb9, 0xac, 0x0, 0xa0, 0xc9, 0x22, 0xe7, 0x50);")
cpp_quote("#define GETAdminBaseCLSID(IsService) ((IsService) ? CLSID_MSAdminBase : CLSID_MSAdminBaseExe)")
cpp_quote("/* ")
cpp_quote("The Main Interface ")
cpp_quote("*/ ")
[
object,
uuid(CBA424F0-483A-11D0-9D2A-00A0C922E703),
pointer_default(unique)
]
interface IMSAdminBase : IUnknown {
// Interfaces
HRESULT AddKey([in] METADATA_HANDLE hMDHandle,
[unique, in, string] unsigned char *pszMDPath);
HRESULT DeleteKey([in] METADATA_HANDLE hMDHandle,
[unique, in, string] unsigned char *pszMDPath);
HRESULT DeleteChildKeys([in] METADATA_HANDLE hMDHandle,
[unique, in, string] unsigned char *pszMDPath);
HRESULT EnumKeys([in] METADATA_HANDLE hMDHandle,
[unique, in, string] unsigned char *pszMDPath,
[out, size_is(ADMINDATA_MAX_NAME_LEN)] unsigned char *pszMDName,
[in] DWORD dwMDEnumObjectIndex);
HRESULT CopyKey([in] METADATA_HANDLE hMDSourceHandle,
[unique, in, string] unsigned char *pszMDSourcePath,
[in] METADATA_HANDLE hMDDestHandle,
[unique, in, string] unsigned char *pszMDDestPath,
[in] BOOL bMDOverwriteFlag,
[in] BOOL bMDCopyFlag);
HRESULT RenameKey([in] METADATA_HANDLE hMDHandle,
[unique, in, string] unsigned char *pszMDPath,
[unique, in, string] unsigned char *pszMDNewName);
[local]
HRESULT SetData([in] METADATA_HANDLE hMDHandle,
[unique, in, string] unsigned char *pszMDPath,
[in] PMETADATA_RECORD pmdrMDData);
[call_as(SetData)]
HRESULT R_SetData([in] METADATA_HANDLE hMDHandle,
[unique, in, string] unsigned char *pszMDPath,
[in] PMETADATA_RECORD pmdrMDData);
[local]
HRESULT GetData([in] METADATA_HANDLE hMDHandle,
[unique, in, string] unsigned char *pszMDPath,
[in, out] PMETADATA_RECORD pmdrMDData,
[out] DWORD *pdwMDRequiredDataLen);
[call_as(GetData)]
HRESULT R_GetData([in] METADATA_HANDLE hMDHandle,
[unique, in, string] unsigned char *pszMDPath,
[in, out] PMETADATA_RECORD pmdrMDData,
[out] DWORD *pdwMDRequiredDataLen,
[out] struct _IIS_CRYPTO_BLOB **ppDataBlob);
HRESULT DeleteData([in] METADATA_HANDLE hMDHandle,
[unique, in, string] unsigned char *pszMDPath,
[in] DWORD dwMDIdentifier,
[in] DWORD dwMDDataType);
[local]
HRESULT EnumData([in] METADATA_HANDLE hMDHandle,
[unique, in, string] unsigned char *pszMDPath,
[in, out] PMETADATA_RECORD pmdrMDData,
[in] DWORD dwMDEnumDataIndex,
[out] DWORD *pdwMDRequiredDataLen);
[call_as(EnumData)]
HRESULT R_EnumData([in] METADATA_HANDLE hMDHandle,
[unique, in, string] unsigned char *pszMDPath,
[in, out] PMETADATA_RECORD pmdrMDData,
[in] DWORD dwMDEnumDataIndex,
[out] DWORD *pdwMDRequiredDataLen,
[out] struct _IIS_CRYPTO_BLOB **ppDataBlob);
[local]
HRESULT GetAllData([in] METADATA_HANDLE hMDHandle,
[unique, in, string] unsigned char *pszMDPath,
[in] DWORD dwMDAttributes,
[in] DWORD dwMDUserType,
[in] DWORD dwMDDataType,
[out] DWORD *pdwMDNumDataEntries,
[out] DWORD *pdwMDDataSetNumber,
[in] DWORD dwMDBufferSize,
[out, size_is(dwMDBufferSize)] unsigned char *pbBuffer,
[out] DWORD *pdwMDRequiredBufferSize);
[call_as(GetAllData)]
HRESULT R_GetAllData([in] METADATA_HANDLE hMDHandle,
[unique, in, string] unsigned char *pszMDPath,
[in] DWORD dwMDAttributes,
[in] DWORD dwMDUserType,
[in] DWORD dwMDDataType,
[out] DWORD *pdwMDNumDataEntries,
[out] DWORD *pdwMDDataSetNumber,
[in] DWORD dwMDBufferSize,
[out] DWORD *pdwMDRequiredBufferSize,
[out] struct _IIS_CRYPTO_BLOB **ppDataBlob);
HRESULT DeleteAllData([in] METADATA_HANDLE hMDHandle,
[unique, in, string] unsigned char *pszMDPath,
[in] DWORD dwMDUserType,
[in] DWORD dwMDDataType);
HRESULT CopyData([in] METADATA_HANDLE hMDSourceHandle,
[unique, in, string] unsigned char *pszMDSourcePath,
[in] METADATA_HANDLE hMDDestHandle,
[unique, in, string] unsigned char *pszMDDestPath,
[in] DWORD dwMDAttributes,
[in] DWORD dwMDUserType,
[in] DWORD dwMDDataType,
[in] BOOL bMDCopyFlag);
/*
HRESULT SetReferenceObject([in] METADATA_HANDLE hMDReferenceHandle,
[unique, in, string] unsigned char *pszMDReferencePath,
[in] METADATA_HANDLE hMDSubjectHandle,
[unique, in, string] unsigned char *pszMDSubjectPath);
*/
HRESULT OpenKey([in] METADATA_HANDLE hMDHandle,
[unique, in, string] unsigned char *pszMDPath,
[in] DWORD dwMDAccessRequested,
[in] DWORD dwMDTimeOut,
[out] PMETADATA_HANDLE phMDNewHandle);
HRESULT CloseKey([in] METADATA_HANDLE hMDHandle);
HRESULT ChangePermissions([in] METADATA_HANDLE hMDHandle,
[in] DWORD dwMDTimeOut,
[in] DWORD dwMDAccessRequested);
HRESULT SaveData();
HRESULT GetHandleInfo([in] METADATA_HANDLE hMDHandle,
[out] PMETADATA_HANDLE_INFO pmdhiInfo);
HRESULT GetSystemChangeNumber([out] DWORD *pdwSystemChangeNumber);
HRESULT GetDataSetNumber([in] METADATA_HANDLE hMDHandle,
[unique, in, string] unsigned char *pszMDPath,
[out] DWORD *pdwMDDataSetNumber);
HRESULT ReleaseReferenceData([in] DWORD dwMDDataTag);
HRESULT SetLastChangeTime([in] METADATA_HANDLE hMDHandle,
[unique, in, string] unsigned char *pszMDPath,
[in] PFILETIME pftMDLastChangeTime,
[in] BOOL bLocalTime);
HRESULT GetLastChangeTime([in] METADATA_HANDLE hMDHandle,
[unique, in, string] unsigned char *pszMDPath,
[out] PFILETIME pftMDLastChangeTime,
[in] BOOL bLocalTime);
[local, restricted]
HRESULT KeyExchangePhase1();
[local, restricted]
HRESULT KeyExchangePhase2();
[call_as(KeyExchangePhase1)]
HRESULT R_KeyExchangePhase1(
[unique, in] struct _IIS_CRYPTO_BLOB *pClientKeyExchangeKeyBlob,
[unique, in] struct _IIS_CRYPTO_BLOB *pClientSignatureKeyBlob,
[out] struct _IIS_CRYPTO_BLOB **ppServerKeyExchangeKeyBlob,
[out] struct _IIS_CRYPTO_BLOB **ppServerSignatureKeyBlob,
[out] struct _IIS_CRYPTO_BLOB **ppServerSessionKeyBlob
);
[call_as(KeyExchangePhase2)]
HRESULT R_KeyExchangePhase2(
[unique, in] struct _IIS_CRYPTO_BLOB *pClientSessionKeyBlob,
[unique, in] struct _IIS_CRYPTO_BLOB *pClientHashBlob,
[out] struct _IIS_CRYPTO_BLOB **ppServerHashBlob
);
};
//LIBID_MSAdmin
[
uuid(1B890330-4F09-11d0-B9AC-00A0C922E750)
, helpstring("IIS Admin Objects Type Library")
, lcid(0x0000)
, version(1.0)
]
library MSAdminTypeLibrary
{
importlib("STDOLE2.TLB");
[
dual,
object,
uuid(03E31F00-627C-11d0-B9AD-00A0C922E750),
oleautomation
]
interface IMSMetaDataItem : IDispatch {
[propget, id(0), helpstring("Return Data Identifier.")]
HRESULT Identifier(
[out, retval] long *pdwIdentifier);
[propput, helpstring("Set Data Identifier.")]
HRESULT Identifier(
[in] long dwIdentifier);
[propget, helpstring("Return Data Attributes.")]
HRESULT Attributes(
[out, retval] long *pdwAttributes);
[propput, helpstring("Set Data Attributes.")]
HRESULT Attributes(
[in] long dwAttributes);
[propget, helpstring("Return Inherit Attribute.")]
HRESULT InheritAttribute(
[out, retval] BOOL *pbInherit);
[propput, helpstring("Set Inherit Attribute.")]
HRESULT InheritAttribute(
[in] BOOL bInherit);
[propget, helpstring("Return Partial Path Attribute.")]
HRESULT ParialPathAttribute(
[out, retval] BOOL *pbParialPath);
[propput, helpstring("Get Parial Path Attribute.")]
HRESULT PartialPathAttribute(
[in] BOOL bPartialPath);
[propget, helpstring("Return Secure Attribute.")]
HRESULT SecureAttribute(
[out, retval] BOOL *pbSecure);
[propput, helpstring("Get Secure Attribute.")]
HRESULT SecureAttribute(
[in] BOOL bSecure);
[propget, helpstring("Return Reference Attribute.")]
HRESULT ReferenceAttribute(
[out, retval] BOOL *pbReference);
[propput, helpstring("Get Reference Attribute.")]
HRESULT ReferenceAttribute(
[in] BOOL bReference);
[propget, helpstring("Return Data User Type.")]
HRESULT UserType(
[out, retval] long *pdwUserType);
[propput, helpstring("Set Data User Type.")]
HRESULT UserType(
[in] long dwUserType);
[propget, helpstring("Return Data Type.")]
HRESULT DataType(
[out, retval] long *pdwDataType);
[propput, helpstring("Set Data Type.")]
HRESULT DataType(
[in] long dwDataType);
// [propget, helpstring("Return Data Length.")]
// HRESULT GetDataLen(
// [out, retval] long *pdwDataLen);
// [propput, helpstring("Set Data Length.")]
// HRESULT SetDataLen(
// [in] long dwDataLen);
[propget, helpstring("Return Data.")]
HRESULT Value(
[out, retval] VARIANTARG *pvaData);
[propput, helpstring("Set Data.")]
HRESULT Value(
[in] VARIANTARG *pvaData);
}
// {34617B10-7FBC-11d0-B9B1-00A0C922E750}
//static const GUID <<name>> =
//{ 0x34617b10, 0x7fbc, 0x11d0, { 0xb9, 0xb1, 0x0, 0xa0, 0xc9, 0x22, 0xe7, 0x50 } };
[
dual,
object,
uuid(34617B10-7FBC-11d0-B9B1-00A0C922E750),
oleautomation
]
interface IMSMetaKey : IDispatch {
HRESULT AddKey([in, optional] VARIANTARG *pvaPath);
HRESULT DeleteKey([in, optional] VARIANTARG *pvaPath);
HRESULT DeleteChildKeys([in, optional] VARIANTARG *pvaPath);
HRESULT EnumKeys([out] VARIANTARG *pvaName,
[in] long dwEnumObjectIndex,
[in, optional] VARIANTARG *pvaPath);
[propget, helpstring("Return Data Object.")]
HRESULT DataItem([out, retval] IMSMetaDataItem **ppmdiData);
HRESULT SetData([in] IMSMetaDataItem *pmdiData,
[in, optional] VARIANTARG *pvaPath);
HRESULT GetData([out][in] IMSMetaDataItem **ppmdiData,
[in, optional] VARIANTARG *pvaPath);
HRESULT DeleteData([in] long dwIdentifier,
[in] long dwDataType,
[in, optional] VARIANTARG *pvaPath);
HRESULT EnumData([in, out] IMSMetaDataItem **ppmdiData,
[in] long dwEnumDataIndex,
[in, optional] VARIANTARG *pvaPath);
HRESULT GetAllData([in] long dwAttributes,
[in] long dwUserType,
[in] long dwDataType,
[out] long *pdwDataSetNumber,
[out] VARIANTARG *pvaDataObjectsArray,
[in, optional] VARIANTARG *pvaPath);
HRESULT DeleteAllData([in] long dwUserType,
[in] long dwDataType,
[in, optional] VARIANTARG *pvaPath);
HRESULT OpenKey([in] long dwAccessRequested,
[in, optional] VARIANTARG vaTimeOut,
[in, optional] VARIANTARG *pvaPath,
[out, retval] IMSMetaKey **ppmkKey);
HRESULT Close();
HRESULT ChangePermissions([in] long dwAccessRequested,
[in, optional] VARIANTARG vaTimeOut);
HRESULT GetKeyInfo([out] long *dwPermissions,
[out] long *dwSystemChangeNumber);
HRESULT GetDataSetNumber([out] long *pdwDataSetNumber,
[in, optional] VARIANTARG *pvaPath);
HRESULT SetLastChangeTime([in] DATE dLastChangeTime,
[in, optional] VARIANTARG vaLocalTime,
[in, optional] VARIANTARG *pvaPath);
HRESULT GetLastChangeTime([out] DATE *pdLastChangeTime,
[in, optional] VARIANTARG vaLocalTime,
[in, optional] VARIANTARG *pvaPath);
}
[
dual,
object,
uuid(0C1BEA50-4FD7-11d0-B9AC-00A0C922E750),
oleautomation
]
interface IMSMetaBase : IDispatch {
HRESULT CopyKey([in] IMSMetaKey *pmkSourceKey,
[in] IMSMetaKey *pmkDestKey,
[in] BOOL bOverwriteFlag,
[in] BOOL bCopyFlag,
[in, optional] VARIANTARG *pvaSourcePath,
[in, optional] VARIANTARG *pvaDestPath);
HRESULT CopyData([in] IMSMetaKey *pmkSourceKey,
[in] IMSMetaKey *pmkDestKey,
[in] long dwAttributes,
[in] long dwUserType,
[in] long dwDataType,
[in] BOOL bCopyFlag,
[in, optional] VARIANTARG *pvaSourcePath,
[in, optional] VARIANTARG *pvaDestPath);
HRESULT OpenKey([in] long dwAccessRequested,
[in, optional] VARIANTARG vaTimeOut,
[in, optional] VARIANTARG *pvaPath,
[out, retval] IMSMetaKey **ppmkKey);
HRESULT FlushData();
HRESULT GetSystemChangeNumber([out] VARIANTARG *pdwSystemChangeNumber);
}
/*
//DIID_IMSAdminSCRIPT
[
uuid(850F0FA0-4FD5-11d0-B9AC-00A0C922E750)
, helpstring("Definition of dispinterface DIMDCOM")
]
dispinterface DIMDCOMSCRIPT
{
interface IMDCOMSCRIPT;
}
*/
//CLSID_MSAdminBase
[
uuid(668583F0-6FDB-11d0-B9B0-00A0C922E750)
, helpstring("IIS Admin Objects Type Information")
]
coclass MSAdmin
{
interface IMSMetaBase;
interface IMSMetaKey;
interface IMSMetaDataItem;
// interface IMSAdmin;
}
};
//
// IID_IMSAdminBaseSink
//
[
object,
uuid(1E056350-761E-11d0-9BA1-00A0C922E703),
pointer_default(unique)
]
interface IMSAdminBaseSink:IUnknown
{
HRESULT SinkNotify(
[in] DWORD dwMDNumElements,
[in, size_is(dwMDNumElements)] MD_CHANGE_OBJECT pcoChangeList[]);
}
cpp_quote("#endif")