How are you using the FILE_INFO_var on the client side? I suspect
you're doing something like:
FILE_INFO_var fi;
LoadFile(fi);
.. which will fail with the inout parameter because the _var contains a
null pointer. Instead, it should be:
FILE_INFO_var fi = new FILE_INFO;
LoadFile(fi);
Hope that helps.
p.s. If I'm interpreting your idl correctly, you don't need FILE_INFO
because, rather than sending the readsize separately you could use the
length() method of the FILE sequence var type. Then again, I don't
really know what you're using readsize for.
zhi lee wrote:
I made a mistake in the last mail
it should be "boolean LoadFile( ..., out FILE_INFO file );" in the
second idl file
2008/9/19 zhi lee <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
the idl file is defined as follows:
//start
typedef sequence<octet> FILE;
struct FILE_INFO
{
FILE file;
long readsize;
};
boolean LoadFile( ..., inout FILE_INFO file );
//end
i used FILE_INFO_var to deliver and get the context of a file.
but when i called the function LoadFild(...), it failed at the
client point.
and when i debug and trace where it failed, i found it throwed an
exception when corba called invoke.
but when i defined idl as follows and use TVarVar.out(), it works
well.
//start
typedef sequence<octet> FILE;
struct FILE_INFO
{
FILE file;
long readsize;
};
boolean LoadFile( ..., inout FILE_INFO file );
//end
I don't know why, and hope someone can help me to solve this problem.
note: the main purpose of this function is to load file from a server
------------------------------------------------------------------------
_______________________________________________
Mico-devel mailing list
Mico-devel@mico.org
http://www.mico.org/mailman/listinfo/mico-devel
begin:vcard
fn:Robert F. Gunion
n:Gunion;Robert
org:Lawrence Berkeley National Laboratory;Engineering/Center for X-Ray Optics
adr:MS 2-400;;1 Cyclotron Road;Berkeley;CA;94720;USA
email;internet:[EMAIL PROTECTED]
title:Software Engineer
tel;work:510-486-4131
tel;fax:510-486-4550
x-mozilla-html:TRUE
url:http://www.cxro.lbl.gov
version:2.1
end:vcard
_______________________________________________
Mico-devel mailing list
Mico-devel@mico.org
http://www.mico.org/mailman/listinfo/mico-devel