Re: Structure in argument #2 -> With IDL ActiveX control [message #13587] |
Wed, 25 November 1998 00:00 |
mark
Messages: 28 Registered: September 1992
|
Junior Member |
|
|
On Mon, 23 Nov 1998 08:13:43 -0700, "Matthew J. Sheats"
<sheats@lanl.gov> wrote:
>> Does the GetNamedData() function of the IDL ActiveX control support the
>> structure definition?
>
> Well, the GetNamedData() function returns data as a variant which needs
> casting. If you have a user defined structure, then there isn't a
> default cast for it, but what you might be able to do, is write a VB
> function that could rip the Variant apart into the structure you need.
>
> The only issue is, I don't know how IDL would handle a request to
> return a structure in this way. If it returns bits, then you're ok, but
> if it doesn't know what to do.. you probably will just get an error.
>
> Let me know if you figure it out, I've never tried that before.
>
> Matt Sheats
> Los Alamos National Laboratory
GetNamedData will return an empty variant if the IDL variable that you
are getting is a structure. The data types that you can retrieve
using this function are scalars of type byte, short, long, float,
double and string.
=====================================================
Mark Leaming
Research Systems, Inc.
=====================================================
|
|
|
RE: Structure in argument #2 -> With IDL ActiveX control [message #13620 is a reply to message #13587] |
Mon, 23 November 1998 00:00  |
Matthew J. Sheats
Messages: 19 Registered: September 1997
|
Junior Member |
|
|
> Does the GetNamedData() function of the IDL ActiveX control support the
> structure definition?
Well, the GetNamedData() function returns data as a variant which needs
casting. If you have a user defined structure, then there isn't a
default cast for it, but what you might be able to do, is write a VB
function that could rip the Variant apart into the structure you need.
The only issue is, I don't know how IDL would handle a request to
return a structure in this way. If it returns bits, then you're ok, but
if it doesn't know what to do.. you probably will just get an error.
Let me know if you figure it out, I've never tried that before.
Matt Sheats
Los Alamos National Laboratory
|
|
|
|