Passing strings to a plugin

Bob.Cowdery at CGI-Europe.com Bob.Cowdery at CGI-Europe.com
Sun Apr 2 12:00:12 UTC 2006


Hi

I have a plugin as follows:

run: hostApi inDev: inDeviceName outDev: outDeviceName rate: sampleRate
frames: frames latency: latency 

	self export: true.

	self 	primitive: 'run'
		parameters:#(String String String SmallInteger SmallInteger
SmallInteger).

	(self
		cCode: 'sdrOpenMainStream(hostApi, inDeviceName,
outDeviceName, sampleRate, frames, latency)'
		inSmalltalk: [false])
		ifFalse: [^ interpreterProxy primitiveFail].

When I look at the parameters on the C side the strings are sometimes
correct (depending on their length and content) and sometimes have rubbish
after them like the terminator is missing. The integers are always ok. Do I
have to explicitly terminate the strings?

Thanks for any help.

Bob

*** Confidentiality Notice *** Proprietary/Confidential
Information belonging to CGI Group Inc. and its affiliates
may be contained in this message. If you are not a recipient
indicated or intended in this message (or responsible for
delivery of this message to such person), or you think for
any reason that this message may have been addressed to you
in error, you may not use or copy or deliver this message
to anyone else.  In such case, you should destroy this
message and are asked to notify the sender by reply email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20060402/cd76f690/attachment.htm


More information about the Squeak-dev mailing list