int BuicScanPage(HWND hDlg) { char buf[256]; int iFormat; int iGrayFormat; int ret; short shReturn; static char OutputFileNameFront[256]; static char OutputFileNameBack [256]; static short FrontPage; static short BackPage; static char FrontSize[32]; static char BackSize[32]; static char MCode[256]; static char MCodeSize[32]; long lFrontSize; long lBackSize; long lMCodeSize; int i; int iNumberOutputBits; ret = -1; shReturn = 0; if(iFront) iFormat = BUIC_SCAN_FRONT; else iFormat = 0; if(iBack) iFormat |= BUIC_SCAN_BACK; if(iMicrOnOff) iFormat |= BUIC_SCAN_MICR; /* On the Fly Endorsements */ if(iEndorceInt && strlen(cPrintStringInt)) { sprintf(buf, cPrintStringInt, lItemNumber); ret = funcTS400SetPrint(TBPARAM_PRINT_IJSTRING, 20*24, buf); DisplayBUICErrorMessage(ret, "Setting IJ String"); } if(iScanMemory == 0 && iTwoImageMode == 0) { if(iImageFormat == 0 || iImageFormat == 1) { /* Black and White Image Scanning (iImageFormat < 2) */ if(!iFront || !iBack) iImageFormat = 0; /* Highest Speed Case */ sprintf(OutputFileNameFront, ".\\images\\f%07ld.tif", lItemNumber); FrontPage = 1; sprintf(OutputFileNameBack, ".\\images\\b%07ld.tif", lItemNumber); BackPage = 1; ret = BUICScan(iFormat,OutputFileNameFront, FrontSize, OutputFileNameBack, BackSize, MCode, MCodeSize); ....Here what I invent (The wheel may be :o))). May be I am totaly wrong.
iFormat = 5 STORE REPLICATE(CHR(0),256) TO OutputFileNameFront, OutputFileNameBack, MCode STORE REPLICATE(CHR(0), 32) TO FrontSize, BackSize, MCodeSize OutputFileNameFront = ".\images\Front_Page.Tif"+CHR(0) OutputFileNameBack = ".\images\Back_Page.Tif"+CHR(0) DECLARE INTEGER BUICScan IN buicap32.DLL INTEGER iFormat,; STRING OutputFileNameFront,; STRING @ FrontSize,; STRING OutputFileNameBack,; STRING @ BackSize,; STRING @ MCode,; STRING @ MCodeSize ret = BUICScan(iFormat,OutputFileNameFront, @FrontSize,; OutputFileNameBack, @BackSize, @MCode, @MCodeSize) WAIT WINDOW ret && For me here I get -100