DLM problem when returning an array of structures ... [message #27767] |
Wed, 31 October 2001 04:40 |
konrad.lang
Messages: 1 Registered: October 2001
|
Junior Member |
|
|
Hello!
I got a strange problem when trying to return a array of structures from a DLM
- sometimes works fine, then only one struct is returned, ... always using the
same call and data in the call
Following is the code snipped I use to return the structure data with IDL 5.2 &
5.3:
entry_struct = IDL_MakeStruct( NULL, entry_tags);
pentry_struct = IDL_MakeStruct( NULL, pentry_tags);
entry_dims[0] = 1;
pentry_dims[0] = 1;
entry_dims[1] = numElements;
pentry_dims[1] = numPointsNew;
cont_tags = (IDL_STRUCT_TAG_DEF *)malloc( sizeof(
IDL_STRUCT_TAG_DEF)*3);
(cont_tags)->name = "POLYGON";
(cont_tags)->dims = entry_dims;
(cont_tags)->type = (void *)entry_struct;
(cont_tags+1)->name = "POINT";
(cont_tags+1)->dims = pentry_dims;
(cont_tags+1)->type = (void *)pentry_struct;
(cont_tags+2)->name = 0;
(cont_tags+2)->dims = 0;
(cont_tags+2)->type = 0;
psDef = IDL_MakeStruct( NULL, cont_tags);
ilOne = 1;
ivReturn = IDL_ImportArray( 1, &ilOne, IDL_TYP_STRUCT, returnStructure,
NULL, psDef);
return (IDL_VPTR)ivReturn;
Any help is appreciated ...
konrad
--
Konrad Lang
Aero-Sensing Radarsysteme GmbH, c/o DLR Oberpfaffenhofen
82234 Wessling, Germany www.aerosensing.de
Tel.: +49-8153-908765 Fax: +40-8153-908700
|
|
|