There are a few possible changes to this call you can do:
- change declaration to
DECLARE INTEGER PcdGetChannelSetup IN SCommDll STRING @ , STRING @
channel = 'socket'
buffer = Repli(Chr(0),4096)
? PcdGetChannelSetup(@channel, @buffer)
- I'm not sure if you need that zero byte in PCDCANAL, just 'socket' is enough
- increase the size of PCDOPENDATA buffer to 1024, 2048, 4096
- from a description of PCDOPENDATA try to find out, whether you should fill some of its fields _before_ calling this function
- read a description of the PcdGetChannelSetup function again, may be you missed some important details
Combine these changes -- this way and that way, left and right, forwards and backwards etc...