comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Array has a corrupted descriptor
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Array has a corrupted descriptor [message #58704] Tue, 12 February 2008 09:41
zhouqiang.search is currently offline  zhouqiang.search
Messages: 6
Registered: February 2008
Junior Member
HI , folks

I try to complete a program with IDL invoking some function from
C ,it works well when I passing a float , double
array , and return a same type with input . Now there is a problem
that it didn't work while passing a complex array.
And the error "array has a corrupted descriptor" every time. I am a
newer with IDL , and I don't know too much
about that , if anyone can help me, please accept my wonderful
appreciate.

-----------------------c program-----------------------
DLLIMPORT void array_test(int argc, void *argv[])
{
int nr = *(int *) argv[0];
int ni = *(int *) argv[1];

// int *result = argv[2];
IDL_DCOMPLEX *result = argv[2];
int i , j;
for(i = 0;i< ni ; i++)
{
for(j=0;j<nr;j++)
{

result[i*ni+j].r = 5 ;
result[i*ni+j].i = 10 ;
}
}

}

----------------IDL program---------------------


function test1 , row , line
; result= lonarr(row,line)
result = complexarr(row , line)
s = call_external('C:\_test\test3\Project3.dll', 'array_test',row ,
line , result)
return, result
end

pro test
;p=lonarr(5,5)
p = complexarr(5,5)
p = test1(5,5)
print , p
end
[Message index]
 
Read Message
Previous Topic: mpfit: what's different
Next Topic: Object as a member to object/class

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:36:00 PDT 2025

Total time taken to generate the page: 0.00447 seconds