addRef method

int addRef()
inherited

Increments the reference count for an interface pointer to a COM object.

You should call this method whenever you make a copy of an interface pointer.

Implementation

int addRef() => (ptr.ref.vtable + 1)
    .cast<Pointer<NativeFunction<Uint32 Function(Pointer)>>>()
    .value
    .asFunction<int Function(Pointer)>()(ptr.ref.lpVtbl);