This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Tuesday, April 3, 2007 9:04:24 AM(UTC)
Groups: Registered
Posts: 1
Hello
I apologize beforehand for my bad English
I utilise your functions(offices) TWAIN with WINDEV and i have a problem with the function L_TwainInitSession() : it return me "-789" and i don't know why
I copy you my code to see if you find the problem
HndlLib est un entier
nHandle est un entier = Handle(FEN_test)
HTWAINSESSION est un entier sans signe sur 4
APPLICATIONDATA est une structure
uStructSize est un entier
hWnd est un entier
zManufacturerName est une chaîne fixe de 256
zAppProductFamily est une chaîne fixe de 256
szVersionInfo est une chaîne fixe de 32
szAppName est une chaîne fixe de 256
FIN
PAppData est un APPLICATIONDATA
PAppData:hWnd = Handle(FEN_test)
PAppData:uStructSize = 4+4+256+256+32+256
HTWAINSESSION=Null
// Chargement de la librairie
HndlLib=ChargeDLL("Lttwn15u.dll")
SI HndlLib=0 ALORS
Info("La Librairie n'est pas chargée")
RETOUR
FIN
Trace("twain source : " + AppelDLL32("Lttwn15u.dll","L_IsTwainAvailable",nHandle))
Trace("Initialisation : " + AppelDLL32("Lttwn15u.dll","L_TwainInitSession", &HTWAINSESSION, &PAppData))
// Décharge la librairie
DéchargeDLL(HndlLib)
Furthermore, I do not find the value of SUCCESS in the documentation; would you do can indicate it to me svp?
Thanks
Karine
#2
Posted
:
Thursday, April 5, 2007 7:50:14 AM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
Hello,
This error is ERROR_INVALID_STRUCT_SIZE "Invalid structure size".
I checked the size of the APPLICATIONDATA structure and it supposed to be 1612. Try to set the size of the structure to the correct value in your code and retry the same issue.
Thanks,
Maen Badwan
LEADTOOLS Technical Support
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.