> ret = BUICScan(iFormat,OutputFileNameFront, FrontSize, > OutputFileNameBack, BackSize, MCode, MCodeSize); >>and here is the 'definition' from the .H file
>/*-----------------02-18-97 12:18pm----------------- > BUICScan - Scan one check and place the image > in the files named by the passed parameters. > iJobType specifies which images (information) > is captured and stored. > > PARAMETERS: > iJobType - > 1 - Front > 2 - Back > 3 - Front and Back > 4 - MICR > 5 - Front and MICR > 6 - Back and MICR > 7 - Front, Back and Micr > lpFront - File name for front of the check image. > lpLenFront - Length of the file (ASCII) for the front of the check image. > lpBack - File name for back of the check image. > lpLenBack - Length of the file (ASCII) for the back of the check image. > lpCode - File name for MICR of the check. > lpLenCode - Length of the file (ASCII) containing the MICR. > > RETURN: > TRUE - Everything okay. > BUIC_ERROR_NOINIT - Have not initialized the scanner > before starting this scan. > BUIC_ERROR_BADJOB - Job type not within range of known types. > >--------------------------------------------------*/ >CFUNCTIONSDLLCALLS int FAR PASCAL BUICScan(int iJobType, > LPSTR lpFront, LPSTR lpLenFront, > LPSTR lpBack, LPSTR lpLenBack, > LPSTR lpCode, LPSTR lpLenCode); > >>
Declare Long RtlMoveMemory in Kernel32 as Copy2Mem ; Long pDest, String @cSource, Long nLength Declare Long LocalAlloc in Kernel32 Long uFlags, Long dwBytes Declare Long LocalFree in Kernel32 Long hMem Declare Integer BUICScan in BUICAP32.DLL ; Integer iJobType, ; Long lpFront, Long lpLenFront, ; Long lpBack, Long lpLenBack, ; Long lpCode, Long lpLenCode iFormat = 1 && get FrontFilename only pFrontFileName = LocalAlloc( 64, 256 ) pFrontSize = LocalAlloc( 64, 256) pBackFileName = LocalAlloc( 64, 256 ) pBackSize = LocalAlloc( 64, 256 ) pCode = LocalAlloc( 64, 256 ) pCodeSize = LocalAlloc( 64, 256 ) cFrontFileName = 'FrontOut.TIF' Copy2Mem( pFrontFileName, cFrontFileName, len( cFrontFileName )) Copy2Mem( pFrontSize, Num2DWord(len( cFrontFileName )), 4 ) ? BUICScan( iFormat, pFrontFileName, pFrontSize, ; pBackFileName, pBackSize, pCode, pCodeSize ) LocalFree( pFrontFileName ) LocalFree( pFrontSize ) LocalFree( pBackFileName ) LocalFree( pBackSize ) LocalFree( pCode ) LocalFree( pCodeSize ) Function Num2DWord( tn_Num ) Local lc_0, lc_1, lc_2, lc_3 If (tn_Num < 0) ** Transform SDWord into DWord ** Works for VFP6 and later tn_Num = val(transform( 0x100000000 + tn_Num, '@0' )) endif lc_3 = chr(int( tn_Num / 0x1000000 )) tn_Num = mod( tn_Num, 0x1000000 ) lc_2 = chr(int( tn_Num / 0x10000 )) tn_Num = mod( tn_Num, 0x10000 ) lc_1 = chr(int( tn_Num / 0x100 )) lc_0 = chr(mod( tn_Num, 0x100 )) endif Return lc_0 + lc_1 + lc_2 + lc_3 EndFunc