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.
 
 
 
 
 
 

351 lines
8.9 KiB

// pstorec.idl : IDL source for pstorec.dll
//
// This file will be processed by the MIDL tool to
// produce the type library (pstorec.tlb) and marshalling code.
import "wtypes.idl";
import "..\..\common\dpapi\pstypes.idl";
[
object,
uuid(5A6F1EC1-2DB1-11D0-8C39-00C04FD9126B),
helpstring("IEnumPStoreItems Interface"),
pointer_default(unique)
]
interface IEnumPStoreItems : IUnknown
{
import "oaidl.idl";
// gets the next items
HRESULT Next(
[in] DWORD celt,
[out] LPWSTR *rgelt,
[in, out] DWORD *pceltFetched
);
// skips the requested number of items
HRESULT Skip(
[in] DWORD celt
);
// resets the enumeration
HRESULT Reset();
// clones the interface
HRESULT Clone(
[out] IEnumPStoreItems **ppenum
);
};
[
object,
uuid(789C1CBF-31EE-11d0-8C39-00C04FD9126B),
helpstring("IEnumPStoreTypes Interface"),
pointer_default(unique)
]
interface IEnumPStoreTypes : IUnknown
{
import "oaidl.idl";
// gets the next requested number of types
HRESULT Next(
[in] DWORD celt,
[size_is(*pceltFetched)]
[out] GUID *rgelt,
[in, out] DWORD *pceltFetched
);
// skips the requested number of types
HRESULT Skip(
[in] DWORD celt
);
// resets the enumeration
HRESULT Reset();
// clones the interface
HRESULT Clone(
[out] IEnumPStoreTypes **ppenum
);
};
[
object,
uuid(5A6F1EC0-2DB1-11D0-8C39-00C04FD9126B),
helpstring("IPStore Interface"),
pointer_default(unique)
]
interface IPStore : IUnknown
{
import "oaidl.idl";
// METHODS
// GetInfo - returns information on the provider
HRESULT GetInfo(
[out] PPST_PROVIDERINFO *ppProperties
);
// GetProvParam - gets the specificed parameter information
HRESULT GetProvParam(
[in] DWORD dwParam,
[out] DWORD *pcbData,
[out][size_is(,*pcbData)]
BYTE **ppbData,
[in] DWORD dwFlags
);
// SetProvParam - sets the specificed parameter information
HRESULT SetProvParam(
[in] DWORD dwParam,
[in] DWORD cbData,
[in][size_is(cbData)]
BYTE *pbData,
[in] DWORD dwFlags
);
// CreateType - creates a type
HRESULT CreateType(
[in] PST_KEY Key,
[in] const GUID *pType,
[in] PPST_TYPEINFO pInfo,
[in] DWORD dwFlags
);
// GetTypeInfo - gets the information associated with a type
HRESULT GetTypeInfo(
[in] PST_KEY Key,
[in] const GUID *pType,
[out] PPST_TYPEINFO *ppInfo,
[in] DWORD dwFlags
);
// DeleteType - deletes a type
HRESULT DeleteType(
[in] PST_KEY Key,
[in] const GUID *pType,
[in] DWORD dwFlags
);
// CreateSubtype - creates a type
HRESULT CreateSubtype(
[in] PST_KEY Key,
[in] const GUID *pType,
[in] const GUID *pSubtype,
[in] PPST_TYPEINFO pInfo,
[in] PPST_ACCESSRULESET pRules,
[in] DWORD dwFlags
);
// GetSubtypeInfo - gets the information associated with a subtype
HRESULT GetSubtypeInfo(
[in] PST_KEY Key,
[in] const GUID *pType,
[in] const GUID *pSubtype,
[out] PPST_TYPEINFO *ppInfo,
[in] DWORD dwFlags
);
// DeleteType - deletes a subtype
HRESULT DeleteSubtype(
[in] PST_KEY Key,
[in] const GUID *pType,
[in] const GUID *pSubtype,
[in] DWORD dwFlags
);
// ReadTypeAccessRuleset - reads the access rules for the given type
HRESULT ReadAccessRuleset(
[in] PST_KEY Key,
[in] const GUID *pType,
[in] const GUID *pSubtype,
[out] PPST_ACCESSRULESET *ppRules,
[in] DWORD dwFlags
);
// WriteTypeAccessRuleset - writes the access rules for the given type
HRESULT WriteAccessRuleset(
[in] PST_KEY Key,
[in] const GUID *pType,
[in] const GUID *pSubtype,
[in] PPST_ACCESSRULESET pRules,
[in] DWORD dwFlags
);
// EnumTypes - returns an interface for enumerating types
HRESULT EnumTypes(
[in] PST_KEY Key,
[in] DWORD dwFlags,
[in] IEnumPStoreTypes **ppenum
);
// EnumSubtypes - returns an interface for enumerating subtypes
HRESULT EnumSubtypes(
[in] PST_KEY Key,
[in] const GUID *pType,
[in] DWORD dwFlags,
[in] IEnumPStoreTypes **ppenum
);
// DeleteItem - deletes item from the protected storage
HRESULT DeleteItem(
[in] PST_KEY Key,
[in] const GUID *pItemType,
[in] const GUID *pItemSubtype,
[in] LPCWSTR szItemName,
[in] PPST_PROMPTINFO pPromptInfo,
[in] DWORD dwFlags
);
// ReadItem - reads item from the protected storage
HRESULT ReadItem(
[in] PST_KEY Key,
[in] const GUID *pItemType,
[in] const GUID *pItemSubtype,
[in] LPCWSTR szItemName,
[out] DWORD *pcbData,
[out][size_is(,*pcbData)]
BYTE **ppbData,
[in] PPST_PROMPTINFO pPromptInfo,
[in] DWORD dwFlags
);
// WriteItem - writes item to the protected storage
HRESULT WriteItem(
[in] PST_KEY Key,
[in] const GUID *pItemType,
[in] const GUID *pItemSubtype,
[in] LPCWSTR szItemName,
[in] DWORD cbData,
[in][size_is(cbData)]
BYTE *pbData,
[in] PPST_PROMPTINFO pPromptInfo,
[in] DWORD dwDefaultConfirmationStyle,
[in] DWORD dwFlags
);
// OpenItem - opens an item for multiple accesses
HRESULT OpenItem(
[in] PST_KEY Key,
[in] const GUID *pItemType,
[in] const GUID *pItemSubtype,
[in] LPCWSTR szItemName,
[in] PST_ACCESSMODE ModeFlags,
[in] PPST_PROMPTINFO pPromptInfo,
[in] DWORD dwFlags
);
// CloseItem - closes an item
HRESULT CloseItem(
[in] PST_KEY Key,
[in] const GUID *pItemType,
[in] const GUID *pItemSubtype,
[in] LPCWSTR szItemName,
[in] DWORD dwFlags
);
// get the interface pointer of a subtype for enumeration of items
HRESULT EnumItems(
[in] PST_KEY Key,
[in] const GUID *pItemType,
[in] const GUID *pItemSubtype,
[in] DWORD dwFlags,
[in] IEnumPStoreItems **ppenum
);
};
[
object,
uuid(5A6F1EBF-2DB1-11D0-8C39-00C04FD9126B),
helpstring("IEnumPStoreProviders Interface"),
pointer_default(unique)
]
interface IEnumPStoreProviders : IUnknown
{
import "oaidl.idl";
// gets the next provider
HRESULT Next(
[in] DWORD celt,
[size_is(*pceltFetched)]
[out] PST_PROVIDERINFO **rgelt,
[in, out] DWORD *pceltFetched
);
// skips the requested provider
HRESULT Skip(
[in] DWORD celt
);
// resets the enumeration
HRESULT Reset();
// clones the interface
HRESULT Clone(
[out] IEnumPStoreProviders **ppenum
);
};
[
uuid(5A6F1EBD-2DB1-11D0-8C39-00C04FD9126B),
version(1.0),
helpstring("PStore 1.0 Type Library")
]
library PSTORECLib
{
importlib("stdole2.tlb");
[
uuid(5A6F1EC3-2DB1-11D0-8C39-00C04FD9126B),
helpstring("PStore Class")
]
coclass CPStore
{
[default] interface IEnumPStoreProviders;
interface IPStore;
};
[
uuid(09BB61E7-31EC-11d0-8C39-00C04FD9126B),
helpstring("CEnumTypes Class")
]
coclass CEnumTypes
{
[default] interface IEnumPStoreTypes;
};
[
uuid(09BB61E6-31EC-11d0-8C39-00C04FD9126B),
helpstring("CEnumPStoreItems Class")
]
coclass CEnumItems
{
[default] interface IEnumPStoreItems;
};
};
// functions exported from the DLL
// PStoreCreateInstance - gets interface to a specific storage provider
HRESULT
__stdcall
PStoreCreateInstance(
IPStore **ppProvider, // out
PST_PROVIDERID *pProviderID, // in
void *pReserved, // in
DWORD dwFlags); // in
// PStoreEnumProviders - returns an interface for enumerating providers
HRESULT
__stdcall
PStoreEnumProviders(
DWORD dwFlags, // in
IEnumPStoreProviders **ppenum); // out