For EZTwain Pro 4 licensing, you input your licensing with a string and
key
string licString = "Your Licnese String Provided By Sales Here";
int
licKey = -1234567890; //integer (signed, so it may or may not be -) that sales
provided to go with your string here
EZTwain.UniversalLicense(licString, licKey);
However, some languages, (PowerBuilder in specific, but maybe others)
will fail this license call even when given the correct string and key
This is because EZTwain Pro expects an ANSI string, but newer PowerBuilder
(and other languages) may be Unicode based. The Unicoe string default for
PowerBuilder is causing licenses not to be recognized.
The fix is to force the stirng to ANSI
PowerBuilder:
licString = String("Your Licnese String Provided By Sales Here",
EncodingANSI!)
licKey = -1234567890 //integer (signed, so it may or may not
be -) that sales provided to go with your string here
TWAIN_UniversalLicense(licString, licKey)
Original Article:
Q10479 - FIX: EZTwain Pro 4 Licensing in PowerBuilder (and other Unicode Languages)