1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
//+--------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1992 - 1992.
//
// File: expiter.hxx
//
// Contents: CExposedIterator header file
//
// Classes: CExposedIterator
//
//---------------------------------------------------------------
#ifndef __EXPITER_HXX__
#define __EXPITER_HXX__
#include <dfmsp.hxx>
#include <lock.hxx>
#include <peiter.hxx>
class CPubIter;
class CDirectStream;
//+--------------------------------------------------------------
//
// Class: CExposedIterator (ei)
//
// Purpose: Iterator for wrapped DocFiles
//
// Interface: See below
//
//---------------------------------------------------------------
interface CExposedIterator
: public IEnumSTATSTG, public PExposedIterator
{
public:
CExposedIterator(CPubIter *ppi, ULONG ulOffset);
~CExposedIterator(void);
// From IUnknown
STDMETHOD(QueryInterface)(REFIID iid, void **ppvObj);
STDMETHOD_(ULONG,AddRef)(void);
STDMETHOD_(ULONG,Release)(void);
// New methods
STDMETHOD(Next)(ULONG celt, STATSTG FAR *rgelt, ULONG *pceltFetched);
SCODE Next(ULONG celt, STATSTGW FAR *rgelt, ULONG *pceltFetched);
STDMETHOD(Skip)(ULONG celt);
STDMETHOD(Reset)(void);
STDMETHOD(Clone)(IEnumSTATSTG **ppenm);
inline SCODE Validate(void) const;
};
// DocFileIter signatures
#define CEXPOSEDITER_SIG LONGSIG('E', 'D', 'F', 'I')
#define CEXPOSEDITER_SIGDEL LONGSIG('E', 'd', 'F', 'i')
//+--------------------------------------------------------------
//
// Member: CExposedIterator::Validate, public
//
// Synopsis: Validates the signature
//
// Returns: Returns STG_E_INVALIDHANDLE if the signature doesn't match
//
//---------------------------------------------------------------
inline SCODE CExposedIterator::Validate(void) const
{
return (this == NULL || _sig != CEXPOSEDITER_SIG) ? STG_E_INVALIDHANDLE :
S_OK;
}
#endif
|