first, a little background...i want my Carbon app to run on BOTH Classic
MacOS v8/9 as well as MacOS X. therefore i build it as a CFM app, not a
Mach-O one (currently using CWPro9). here are the MacOS TWAIN DSM CFM
shared library files that i am aware of:
\System Folder\Extensions\TWAIN Source Manager (from TWAIN SDK v1.7)
\System\Library\CFMSupport\TWAIN Source Manager.shlib (from TWAIN SDK
v1.9)
Problem #1:
...the TWAIN CFM library that comes with v1.7 of the SDK appears to
require InterfaceLib, which is available in Classic MacOS, but not in
MacOS X. so i cannot weak-link my Carbon app to the v1.7 CFM library if
i want it to run in MacOS X, correct? however, it appears that i also
cannot weak-link my Carbon app to the v1.9 CFM library if i want it to
run in Classic MacOS, because i think that one calls through to
TWAIN.framework, correct? so in short, i'm curious what the solution is
(if any) if i want to build a *single* CFM Carbon app that can run in
both Classic MacOS and MacOS X, and can communicate with the DSM in both
environments? is that possible?
Problem #2:
....for testing purposes, i've set up my Carbon app to weak-link to v1.9
of the CFM DSM shared library (the one in \System\Library\CFMSupport)
and i am just testing it under OS X for the time being. when i
initialize via TWInitialize() (found in TWGlue.c), it appears that by
copying certain strings into the 'Manufacturer' field of the TW_IDENTITY
structure, TWSelectDS() will fail later on with a result code of -4971
(an error code that's associated with the DataBrowser object in the
selection popup). for example, "\pWorking Group" doesn't cause any
problems, but "\pEggshell Software" results in the error. another
example: "\pBig John Productions" is fine, but "\pLittle John
Productions" is not. TWOpenDSM() does get through successfully (it
returns 'TWRC_SUCCESS'), so i'm not sure what's going on here. to verify
that it's not my app, i "Carbonized" the Sample App code that
accompanied v1.7 of the TWAIN SDK and weak-linked it to the same CFM
TWAIN DSM library (v1.9), and i notice the same results. however, the
sample app that accompanies v1.9 of the TWAIN SDK is a Mach-O target,
and that seems to work fine with any manufacturer name i set. any ideas?
has anyone else encountered this problem with a CFM app running under OS
X?
TIA -phil.