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.
 
 
 
 
 
 

482 lines
11 KiB

//+--------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1996 - 1999
//
// File: certdb.idl
//
// Contents: IDL source for certdb.dll
//
//---------------------------------------------------------------------------
import "wtypes.idl";
import "certbase.idl";
import "certbcli.idl";
interface ICertDB;
interface ICertDBRow;
typedef struct _CERTTRANSDBATTRIBUTE // Marshalled form
{
ULONG obwszName;
ULONG obwszValue;
} CERTTRANSDBATTRIBUTE;
typedef struct _CERTDBATTRIBUTE // Native form
{
WCHAR *pwszName;
WCHAR *pwszValue;
} CERTDBATTRIBUTE;
typedef struct _CERTTRANSDBEXTENSION // Marshalled form
{
ULONG obwszName;
LONG ExtFlags;
DWORD cbValue;
ULONG obValue;
} CERTTRANSDBEXTENSION;
typedef struct _CERTDBEXTENSION // Native form
{
WCHAR *pwszName;
LONG ExtFlags;
DWORD cbValue;
BYTE *pbValue;
} CERTDBEXTENSION;
const LONG CDBENUM_ATTRIBUTES = 0x00000000;
const LONG CDBENUM_EXTENSIONS = 0x00000001;
//+--------------------------------------------------------------------------
// IEnumCERTDBCOLUMN class -- local COM interface
//+--------------------------------------------------------------------------
// IEnumCERTDBCOLUMN:Next return type
typedef struct _CERTTRANSDBCOLUMN // Marshalled form
{
DWORD Type;
DWORD Index;
DWORD cbMax;
ULONG obwszName;
ULONG obwszDisplayName;
} CERTTRANSDBCOLUMN;
typedef struct _CERTDBCOLUMN // Native form
{
DWORD Type;
DWORD Index;
DWORD cbMax;
WCHAR *pwszName;
WCHAR *pwszDisplayName;
} CERTDBCOLUMN;
[
object,
uuid(90a27030-8bd5-11d3-b32e-00c04f79dc72),
local,
helpstring("IEnumCERTDBCOLUMN Interface"),
pointer_default(unique)
]
interface IEnumCERTDBCOLUMN: IUnknown
{
import "oaidl.idl";
HRESULT Next(
[in] ULONG celt,
[out] CERTDBCOLUMN *rgelt,
[out] ULONG *pceltFetched);
HRESULT Skip(
[in] LONG celt,
[out] LONG *pielt);
HRESULT Reset(void);
HRESULT Clone(
[out] IEnumCERTDBCOLUMN **ppenum);
};
//+--------------------------------------------------------------------------
// ICertDBComputedColumn class -- local COM interface
//+--------------------------------------------------------------------------
[
object,
uuid(5ed15981-4055-43a5-b853-58c2cd3ec101),
local,
helpstring("ICertDBComputedColumn Interface"),
pointer_default(unique)
]
interface ICertDBComputedColumn: IUnknown
{
import "oaidl.idl";
HRESULT GetAlternateColumnId(
[in] DWORD ComputedColumnId,
[out] DWORD *pAlternateColumnId,
[out] DWORD *pPropType);
HRESULT ComputeColumnValue(
[in] DWORD ComputedColumnId,
[in] DWORD AlternateColumnId,
[in] DWORD PropType,
[in] DWORD cbProp,
[in] BYTE const *pbProp,
[out] DWORD *pdwValue);
};
//+--------------------------------------------------------------------------
// IEnumCERTDBRESULTROW class -- local COM interface
//+--------------------------------------------------------------------------
// IEnumCERTDBRESULTROW:Next return type
typedef struct _CERTTRANSDBRESULTCOLUMN // Marshalled form
{
DWORD Type;
DWORD Index;
ULONG obValue;
DWORD cbValue;
} CERTTRANSDBRESULTCOLUMN;
typedef struct _CERTDBRESULTCOLUMN // Native form
{
DWORD Type;
DWORD Index;
BYTE *pbValue;
DWORD cbValue;
} CERTDBRESULTCOLUMN;
typedef struct _CERTTRANSDBRESULTROW // Marshalled form
{
DWORD rowid;
DWORD ccol;
ULONG cbrow;
} CERTTRANSDBRESULTROW;
typedef struct _CERTDBRESULTROW // Native form
{
DWORD rowid;
DWORD ccol;
CERTDBRESULTCOLUMN *acol;
} CERTDBRESULTROW;
[
object,
uuid(915feb70-8bd5-11d3-b32e-00c04f79dc72),
local,
helpstring("IEnumCERTDBRESULTROW Interface"),
pointer_default(unique)
]
interface IEnumCERTDBRESULTROW: IUnknown
{
import "oaidl.idl";
HRESULT Next(
[in] ICertDBComputedColumn *pIComputedColumn,
[in] ULONG celt,
[out] CERTDBRESULTROW *rgelt,
[out] ULONG *pceltFetched);
HRESULT ReleaseResultRow(
[in] ULONG celt,
[in, out] CERTDBRESULTROW *rgelt);
HRESULT Skip(
[in] LONG celt,
[out] LONG *pielt);
HRESULT Reset(void);
HRESULT Clone(
[out] IEnumCERTDBRESULTROW **ppenum);
};
//+--------------------------------------------------------------------------
// IEnumCERTDBNAME class -- local COM interface
//+--------------------------------------------------------------------------
// IEnumCERTDBName:Next return type
typedef struct _CERTDBNAME
{
WCHAR *pwszName;
} CERTDBNAME;
[
object,
uuid(91dbb1a0-8bd5-11d3-b32e-00c04f79dc72),
local,
helpstring("IEnumCERTDBNAME Interface"),
pointer_default(unique)
]
interface IEnumCERTDBNAME: IUnknown
{
import "oaidl.idl";
HRESULT Next(
[in] ULONG celt,
[out] CERTDBNAME *rgelt,
[out] ULONG *pceltFetched);
HRESULT Skip(
[in] LONG celt,
[out] LONG *pielt);
HRESULT Reset(void);
HRESULT Clone(
[out] IEnumCERTDBNAME **ppenum);
};
//+--------------------------------------------------------------------------
// ICertDBRow class -- local COM interface
//+--------------------------------------------------------------------------
const LONG CDBROW_COMMIT_ROLLBACK = 0x00000000;
const LONG CDBROW_COMMIT_COMMIT = 0x00000001;
const LONG CDBROW_COMMIT_SOFTCOMMIT= 0x00000002;
[
object,
uuid(924b3e50-8bd5-11d3-b32e-00c04f79dc72),
local,
helpstring("ICertDBRow Interface"),
pointer_default(unique)
]
interface ICertDBRow: IUnknown
{
import "oaidl.idl";
HRESULT BeginTransaction();
HRESULT CommitTransaction(
[in] DWORD dwCommitFlags);
HRESULT GetRowId(
[out] DWORD *pRowId);
HRESULT Delete();
HRESULT SetProperty(
[in] WCHAR const *pwszPropName,
[in] DWORD dwFlags,
[in] DWORD cbProp,
[in] BYTE const *pbProp); // OPTIONAL
HRESULT GetProperty(
[in] WCHAR const *pwszPropName,
[in] DWORD dwFlags,
[in] ICertDBComputedColumn *pIComputedColumn,
[in, out] DWORD *pcbProp,
[out] BYTE *pbProp); // OPTIONAL
HRESULT SetExtension(
[in] WCHAR const *pwszExtensionName,
[in] DWORD dwExtFlags,
[in] DWORD cbValue,
[in] BYTE const *pbValue); // OPTIONAL
HRESULT GetExtension(
[in] WCHAR const *pwszExtensionName,
[out] DWORD *pdwExtFlags,
[in, out] DWORD *pcbValue,
[out] BYTE *pbValue); // OPTIONAL
HRESULT CopyRequestNames();
HRESULT EnumCertDBName(
[in] DWORD dwFlags,
[out] IEnumCERTDBNAME **ppenum);
};
//+--------------------------------------------------------------------------
// ICertDBBackup class -- local COM interface
//+--------------------------------------------------------------------------
[
object,
uuid(92a56660-8bd5-11d3-b32e-00c04f79dc72),
local,
helpstring("ICertDBBackup Interface"),
pointer_default(unique)
]
interface ICertDBBackup: IUnknown
{
import "oaidl.idl";
HRESULT GetDBFileList(
[in, out] DWORD *pcwcList,
[out] WCHAR *pwszzList); // OPTIONAL
HRESULT GetLogFileList(
[in, out] DWORD *pcwcList,
[out] WCHAR *pwszzList); // OPTIONAL
HRESULT OpenFile(
[in] WCHAR const *pwszFile,
[out] ULARGE_INTEGER *pliSize); // OPTIONAL
HRESULT ReadFile(
[in, out] DWORD *pcb,
[out] BYTE *pb);
HRESULT CloseFile();
HRESULT TruncateLog();
}
//+--------------------------------------------------------------------------
// ICertDBRestore class -- local COM interface
//+--------------------------------------------------------------------------
[
object,
uuid(93042400-8bd5-11d3-b32e-00c04f79dc72),
local,
helpstring("ICertDBRestore Interface"),
pointer_default(unique)
]
interface ICertDBRestore: IUnknown
{
import "oaidl.idl";
HRESULT RecoverAfterRestore(
[in] DWORD cSession,
[in] DWORD DBFlags,
[in] WCHAR const *pwszEventSource,
[in] WCHAR const *pwszLogDir,
[in] WCHAR const *pwszSystemDir,
[in] WCHAR const *pwszTempDir,
[in] WCHAR const *pwszCheckPointFile,
[in] WCHAR const *pwszLogPath,
[in] CSEDB_RSTMAPW rgrstmap[],
[in] LONG crstmap,
[in] WCHAR const *pwszBackupLogPath,
[in] DWORD genLow,
[in] DWORD genHigh);
}
//+--------------------------------------------------------------------------
// ICertDB class -- local COM interface
//+--------------------------------------------------------------------------
// ICertDB::OpenView dwFlags:
const LONG CDBOPENVIEW_WORKERTHREAD = 1;
// ICertDB::ShutDown dwFlags:
const LONG CDBSHUTDOWN_PENDING = 1;
[
object,
uuid(93582f50-8bd5-11d3-b32e-00c04f79dc72),
local,
helpstring("ICertDB Interface"),
pointer_default(unique)
]
interface ICertDB: IUnknown
{
import "oaidl.idl";
HRESULT Open(
[in] DWORD dwFlags, // DBFLAGS_*
[in] DWORD cSession,
[in] WCHAR const *pwszEventSource,
[in] WCHAR const *pwszDBFile,
[in] WCHAR const *pwszLogDir,
[in] WCHAR const *pwszSystemDir,
[in] WCHAR const *pwszTempDir);
HRESULT ShutDown(
[in] DWORD dwFlags);
HRESULT OpenRow(
[in] DWORD dwFlags,
[in] DWORD RowId,
[in] WCHAR const *pwszSerialNumberOrCertHash, // OPTIONAL
[out] ICertDBRow **pprow);
HRESULT OpenView(
[in] DWORD ccvr,
[in] CERTVIEWRESTRICTION const *acvr,
[in] DWORD ccolOut,
[in] DWORD const *acolOut,
[in] DWORD const dwFlags,
[out] IEnumCERTDBRESULTROW **ppenum);
HRESULT EnumCertDBColumn(
[in] DWORD dwTable,
[out] IEnumCERTDBCOLUMN **ppenum);
HRESULT OpenBackup(
[in] LONG grbitJet,
[out] ICertDBBackup **ppBackup);
HRESULT GetDefaultColumnSet(
[in] DWORD iColumnSetDefault,
[in] DWORD cColumnIds,
[out] DWORD *pcColumnIds,
[out, ref] DWORD *pColumnIds);
};
//+--------------------------------------------------------------------------
// certdb Type library
//+--------------------------------------------------------------------------
[
uuid(93adc1d0-8bd5-11d3-b32e-00c04f79dc72),
version(2.0),
helpstring("CertDB 2.0 Type Library")
]
library CERTDBLib
{
importlib("stdole2.tlb");
[
uuid(94142360-8bd5-11d3-b32e-00c04f79dc72),
helpstring("CertDBRestore Class")
]
coclass CCertDBRestore
{
[default] interface ICertDBRestore;
};
[
uuid(946e4b70-8bd5-11d3-b32e-00c04f79dc72),
helpstring("CertDB Class")
]
coclass CCertDB
{
[default] interface ICertDB;
};
};