establishContext method

  1. @override
Tuple2<SCardResult, SCardContext> establishContext(
  1. int dwScope
)
override

Implementation

@override
Tuple2<SCardResult, SCardContext> establishContext(int dwScope) {
  var phContext = calloc<SCARDCONTEXT>();

  try {
    var response = _winscard.SCardEstablishContext(dwScope, _nullptr, _nullptr, phContext);
    var result = SCardResult(response);

    return Tuple2(result, SCardContext(phContext.value));
  }
  finally {
    calloc.free(phContext);
  }
}