Пример #1
0
 public void Reset()  // walk back to the first project in the chain
 {
     while (_currentTypeLibStruct.Prev != IntPtr.Zero)
     {
         _currentTypeLibPtr    = _currentTypeLibStruct.Prev;
         _currentTypeLibStruct = StructHelper.ReadStructureSafe <VBETypeLibObj>(_currentTypeLibPtr);
     }
     _isStart = true;
 }
Пример #2
0
        public bool MoveNext()
        {
            if (_isStart)
            {
                _isStart = false;  // MoveNext is called before accessing the very first item
                return(true);
            }

            if (_currentTypeLibStruct.Next == IntPtr.Zero)
            {
                return(false);
            }

            _currentTypeLibPtr    = _currentTypeLibStruct.Next;
            _currentTypeLibStruct = StructHelper.ReadStructureSafe <VBETypeLibObj>(_currentTypeLibPtr);
            return(true);
        }
Пример #3
0
 public VBETypeLibsIterator(IntPtr typeLibPtr)
 {
     _currentTypeLibPtr    = typeLibPtr;
     _currentTypeLibStruct = StructHelper.ReadStructureSafe <VBETypeLibObj>(_currentTypeLibPtr);
     Reset();
 }