Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TwainPro
Message
De
28/07/2005 16:08:54
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Titre:
TwainPro
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01036757
Message ID:
01036757
Vues:
102
When I try to set the DPI per the sample code in VFP I Get the attached
error when calling SetCapOut. If you notice in the watch area the CapType
is 2 (TWCAP_RANGE) Even though I've set it to TWCAP_ONEVALUE (0), and the
CapMin and CapMax properties seem strange to me also.

I'm using an HP 7450c scanner and VFP 9.0

HEre is the code
LOCAL ;
  llRtnVal, ;
  lnDPI
  
* Assume Failure
llRtnVal = .F.

DO WHILE .T.

   WITH ThisForm.TwainPro
       .Capability = 8		&& TWCAP_UNITS
       IF .CapSupported
           .CapTypeOut = TWCAP_ONEVALUE
           .CapValueOut = 5	&& TWUN_PIXELS
   ENDIF


        .Capability = TWCAP_XRESOLUTION
        IF .CapSupported
            .CapTypeOut = 0
            .CapValueOut = ThisForm.nDpI
            .SetCapOut()
        ENDIF


        .Capability = TWCAP_YRESOLUTION
        IF .CapSupported
            .CapTypeOut = 0
            .CapValueOut = ThisForm.nDpI
            .SetCapOut()
        ENDIF

ENDWITH

  llRtnVal = .T.
  EXIT
ENDDO

RETURN llRtnVal
I get and TWAIN ERROR:
Error Code : 10
Error String: Data parameter out of supported range
Répondre
Fil
Voir

Click here to load this message in the networking platform