Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Idl-pvware > Array has a cor...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 5423 of 6022
Post > Topic >>

Array has a corrupted descriptor

by zhouqiang.search@[EMAIL PROTECTED] Feb 12, 2008 at 09:41 AM

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-----------------------
DLLIM****T 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
 




 5 Posts in Topic:
Array has a corrupted descriptor
zhouqiang.search@[EMAIL P  2008-02-12 09:41:26 
Re: Array has a corrupted descriptor
=?ISO-8859-2?Q?F=D6LDY_La  2008-02-12 19:00:39 
Re: Array has a corrupted descriptor
zhouqiang.search@[EMAIL P  2008-02-12 13:38:38 
Re: Array has a corrupted descriptor
"Peter Mason" &  2008-02-12 23:38:07 
Re: Array has a corrupted descriptor
zhouqiang.search@[EMAIL P  2008-02-13 03:02:06 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 4:41:14 CDT 2008.