/
ixmlnodelist.dart
80 lines (62 loc) · 2.29 KB
/
ixmlnodelist.dart
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
77
78
79
80
// ixmlnodelist.dart
// THIS FILE IS GENERATED AUTOMATICALLY AND SHOULD NOT BE EDITED DIRECTLY.
// ignore_for_file: unused_import, directives_ordering
// ignore_for_file: constant_identifier_names, non_constant_identifier_names
// ignore_for_file: no_leading_underscores_for_local_identifiers
import 'dart:ffi';
import 'package:ffi/ffi.dart';
import '../../../../api_ms_win_core_winrt_string_l1_1_0.dart';
import '../../../../combase.dart';
import '../../../../exceptions.dart';
import '../../../../macros.dart';
import '../../../../utils.dart';
import '../../../../types.dart';
import '../../../../winrt_callbacks.dart';
import '../../../../winrt_helpers.dart';
import '../../../../winrt/internal/hstring_array.dart';
import '../../../../winrt/data/xml/dom/ixmlnode.dart';
import '../../../../com/iinspectable.dart';
/// @nodoc
const IID_IXmlNodeList = '{8C60AD77-83A4-4EC1-9C54-7BA429E13DA6}';
/// {@category Interface}
/// {@category winrt}
class IXmlNodeList extends IInspectable {
// vtable begins at 6, is 2 entries long.
IXmlNodeList.fromRawPointer(super.ptr);
factory IXmlNodeList.from(IInspectable interface) =>
IXmlNodeList.fromRawPointer(interface.toInterface(IID_IXmlNodeList));
int get length {
final retValuePtr = calloc<Uint32>();
try {
final hr = ptr.ref.vtable
.elementAt(6)
.cast<
Pointer<
NativeFunction<HRESULT Function(Pointer, Pointer<Uint32>)>>>()
.value
.asFunction<
int Function(
Pointer, Pointer<Uint32>)>()(ptr.ref.lpVtbl, retValuePtr);
if (FAILED(hr)) throw WindowsException(hr);
final retValue = retValuePtr.value;
return retValue;
} finally {
free(retValuePtr);
}
}
Pointer<COMObject> item(int index) {
final retValuePtr = calloc<COMObject>();
final hr = ptr.ref.vtable
.elementAt(7)
.cast<
Pointer<
NativeFunction<
HRESULT Function(
Pointer, Uint32 index, Pointer<COMObject>)>>>()
.value
.asFunction<int Function(Pointer, int index, Pointer<COMObject>)>()(
ptr.ref.lpVtbl, index, retValuePtr);
if (FAILED(hr)) throw WindowsException(hr);
return retValuePtr;
}
}