PDA

View Full Version : Problem with External DLL in A5V5


ABC123

JerryRobbins
02-24-2005, 03:28 PM
Why would the following work in A5 version 4.x but not in version 5?

DECLARE wsc32 SioGetc II

dim charcode as n
charcode=SioGetc(val(VC_SCANNER_PORT)-1)

I've tried fully qualifying the DLL in the Declare statment ("c:\Windows\wsc32.dll"), but that didn't work.

The function normally returns the next byte from the receive queue of the selected serial port. In Version 5, it returns 65535.

Does anybody know what's changed?

Thanks!!!!
Jerry

Edward Larrabee
02-25-2005, 06:22 AM
Perhaps you need to include the name of the library. See DECLARE.

JerryRobbins
02-25-2005, 07:14 AM
Thanks,
I tried that, but it didn't help.
I've tried these approaches to the DECLARE...

declare wsc32 SioGetc@SioGetc II
declare wsc32@wsc32 SioGetc@SioGetc II
declare c:\Windows\wsc32.dll SioGetc@SioGetc II

I've experimented with changing the argument declarations from Integer to Long. That did change the return value to an expected error code. But it's still not working.

Did something change in A5 specific to this that I'm just not aware of?

JerryRobbins
02-26-2005, 01:43 PM
I changed all instances of "I" to "L" and all the functions in the DLL work correctly now.
It's clear that A5V5 is doing certain things here differently that A5V4.5 did.

In any event, it's working now.

BTW, for the record, I love version 5!
(I'll upgrade to v6 very soon.)