문제

We have a powerbuilder application and we want use a scanner through this application with the use of the TWAIN drivers. Does anyone have previous experience or code samples about how this can be developed?

도움이 되었습니까?

해결책

It's hard (and may be impossible) to integrate TWAIN into PowerBuilder using plain PowerScript (without regard for possible ActiveX control).

Working solution (for me) was creation of Dll (C++) based on TWAIN Sample code. In brief

  • PowerBuilder app creates response window (modal dialog)
  • call Dll function to override window proc: SetWindowLong(handle(..), GWL_WNDPROC, MyFunction)
  • and initiate TWAIN transfer.

Sample application in C++ is working. But, of course, some changes required to adopt it for PowerBuilder.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top