int getPageCount(Pointer<MuPdfInst> ctx) { Pointer<Int32> p = calloc<Int32>(); pdflib.getPageCount(ctx, p); int ret = p.value; calloc.free(p); return ret; }