Home › Forums › TWAIN Classic › Success loaded Twain_32.dll and GetLastError = 203
- This topic has 1 reply, 2 voices, and was last updated 11 years, 7 months ago by MarkM.
- AuthorPosts
Hello,
I have following problem in my app:
Twain_32.dll is loaded with success – handle is not NULL, but GetLastError() returns 203 – ERROR_ENVVAR_NOT_FOUND. Does anybody had similar problem?
Then GetProcAdress also end with success and GetLastError returns 203.
In next steps app can connect with scanner, but after enable DS, scanner stops scanning without any error. It doesn’t return MSG_XFERREADY. I think app gets other msg, maybe MSG_CLOSEDS or CLOSE or MSG_CLOSEREQ.I don’t know why it is happening in that way, because I didn’t get any error messages…
The strangest thing is that LoadLibrary succeses and error is 203.The scanner is Dell p513w with 32bit app on 64bit Windows 7. When using the same scanner in Photoshop with twain driver, everything works fine. I also tested other scanners with that app on 64bit Windows and it worked without problems.
Does anybody have any suggestions?
There are two different issues here…
First, GetLastError is only going to have meaning for a win32 call if it
returns an error, otherwise the value stays unchanged. LoadLibrary
is an exception, because the DLL’s DllMain is run, and it can make
all kinds of calls. That 203 just means an optional environment
variable wasn’t found, it’s not really an issue…The other problem can happen for any number of reasons. You
should ask the scanner vendor for help.As a stopgap, try issuing DG_IMAGE/DAT_IMAGEINFO/MSG_GET every
second, until you get TWRC_SUCCESS and see if the driver is
actually getting into state 6…- AuthorPosts