LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How allocate memory by CIN

Hi, i tried to use CIN for allocate memory to create a memory space by DSNewPtr function.
This is my .c file:
#include "extcode.h"
MgErr CINRun(uInt32 Length, uInt32 *Address);
MgErr CINRun(uInt32 Length, uInt32 *Address)
   {
   
       
     Address = (uInt32 *)DSNewPtr(Length*(sizeof(uInt32)));
                       
     
      return noErr;
   }
I want use the return for write into the memory allocate, but when i start run this CIN a error occurs:"not enough memory for complete this operation"(also with Length=1).I don't understand why.
I use LabVIEW 8.0 and for compile the source file MIcrosoft Studio 2003.
Can you please help me for this problem
Sorry for my english
 
0 Kudos
Message 1 of 3
(2,459 Views)
Why not simply call DSNewPtr directly from LabVIEW.exe with a Call Libray Node?


CIN's are not officially obsolete, but no one I know recommends them.


Regards,


Wiebe.
Message 2 of 3
(2,441 Views)

CIN is like a SIN. Smiley Wink

So, avoid it as much as you can...

- Partha ( CLD until Oct 2024 🙂 )
Message 3 of 3
(2,436 Views)