l4-hackers Digest, Vol 72, Issue 8
fang zhengshu
fangzhsh07 at gmail.com
Mon Jul 6 03:51:51 CEST 2009
hi all,
when I write a function in the IDL file, there is a problem:want to write a
different-length string to a array like:
interface test{
int write([string]char* str, int len);
int read([out,prealloc_client, size_is(size), prealloc_server]char
str[], int size);
};
I have defined a fixed size array in the server like array[256].
In the write() function I write a different length string to the array, then
I want to read parts or all of the array in the read() function, the process
will be like the following:
string[len] str[size]
| ^
| |
--------->array[256] -----------|
but when I put the function above and compile it, there are some error
happen. I have change the size_is() with length_is() or max_is(), but there
still error when I compile it. I know if I define a fix array str[256] the
code can be work, but I just want to use a unfixed length array to get the
string.
could someone please give me some advice?if I describe the problem clearly,
please let me know.
thank you!
--
fang,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://os.inf.tu-dresden.de/pipermail/l4-hackers/attachments/20090706/fad401e9/attachment.html>
More information about the l4-hackers
mailing list