getInternetConnectionProfile method

Pointer<COMObject> getInternetConnectionProfile()

Implementation

Pointer<COMObject> getInternetConnectionProfile() {
  final retValuePtr = calloc<COMObject>();

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

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

  return retValuePtr;
}