GetTemplateContent method

Pointer<COMObject> GetTemplateContent(
  1. int type
)

Implementation

Pointer<COMObject> GetTemplateContent(int type) {
  final retValuePtr = calloc<COMObject>();

  final hr = _thisPtr.ref.vtable
          .elementAt(8)
          .cast<
              Pointer<
                  NativeFunction<
                      HRESULT Function(
                          Pointer, Int32 type, Pointer<COMObject>)>>>()
          .value
          .asFunction<int Function(Pointer, int type, Pointer<COMObject>)>()(
      _thisPtr.ref.lpVtbl, type, retValuePtr);

  if (FAILED(hr)) throw WindowsException(hr);

  return retValuePtr;
}