Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Declare dll call caused an exception
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP2
Network:
Windows 2000 Pro
Database:
Visual FoxPro
Divers
Thread ID:
00979001
Message ID:
00982390
Vues:
49
Raphael,

I am not sure if this works, bacause I can't test it(no scanner here) But at least not booming :o)))
Here the C++ code (Somebody may find it usefull)
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
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform