I have software where I am Negotiating the capabilities of a TWAIN scanner.
Definition of routine in VB:
[tt]Public Overloads Function NegotiateCapability( _
ByVal capability As Capabilities, _
ByVal capabilityValue As Object _
) As Boolean[/tt]
The problem I'm having is that the particular three capabilities I'm negotiating require an Unsigned 16 bit integer as the capabilityValue.
I have tried sending just a value:
[tt] jnCapability = 3
STORE oleTWAINControl.NegotiateCapability(ICAP_PIXELTYPE, @M.jnCapability) TO jlSuccess[/tt]
Nope.
I have tried sending as a double CHR:
[tt] jnCapability = CHR(0) + CHR(3)
STORE oleTWAINControl.NegotiateCapability(ICAP_PIXELTYPE, @M.jnCapability) TO jlSuccess[/tt]
Nope.
I have tried sending as a single CHR:
[tt] jnCapability = CHR(3)
STORE oleTWAINControl.NegotiateCapability(ICAP_PIXELTYPE, @M.jnCapability) TO jlSuccess[/tt]
Nope.
On the Nopes, I get a "Type Mismatch" error.
The three capabilities I'm trying to negotiate are CAP_DUPLEX, ICAP_PIXELTYPE, and ICAP_BITDEPTH. It seems I can negotiate Boolean and FIX32 objects fine (at least I'm getting a successful return).
Any ideas? Is there a good place to find out how to convert a VFP9 value to UINT16 or FIX32?
Many thanks in advance!
[tt][/tt]
Definition of routine in VB:
[tt]Public Overloads Function NegotiateCapability( _
ByVal capability As Capabilities, _
ByVal capabilityValue As Object _
) As Boolean[/tt]
The problem I'm having is that the particular three capabilities I'm negotiating require an Unsigned 16 bit integer as the capabilityValue.
I have tried sending just a value:
[tt] jnCapability = 3
STORE oleTWAINControl.NegotiateCapability(ICAP_PIXELTYPE, @M.jnCapability) TO jlSuccess[/tt]
Nope.
I have tried sending as a double CHR:
[tt] jnCapability = CHR(0) + CHR(3)
STORE oleTWAINControl.NegotiateCapability(ICAP_PIXELTYPE, @M.jnCapability) TO jlSuccess[/tt]
Nope.
I have tried sending as a single CHR:
[tt] jnCapability = CHR(3)
STORE oleTWAINControl.NegotiateCapability(ICAP_PIXELTYPE, @M.jnCapability) TO jlSuccess[/tt]
Nope.
On the Nopes, I get a "Type Mismatch" error.
The three capabilities I'm trying to negotiate are CAP_DUPLEX, ICAP_PIXELTYPE, and ICAP_BITDEPTH. It seems I can negotiate Boolean and FIX32 objects fine (at least I'm getting a successful return).
Any ideas? Is there a good place to find out how to convert a VFP9 value to UINT16 or FIX32?
Many thanks in advance!
[tt][/tt]