#include "extcode.h" 
BOOL WINAPI DllMain(HANDLE handle, 
					DWORD dwFunction, 
					LPVOID lpNot) 
{ 
	return TRUE; 
} 
_declspec (dllexport) int trial(int **arr) 
{ 
	MgErr err = NumericArrayResize(iL,1,(UHandle*)&arr,10); 
	if(err == noErr) 
	{ 
		//(*arr)[0] = 10; 
		for(int i=1;i<10;i++) 
			(*arr)= i+1; 
		return 2; 
	} 
    return 4; 
} 
This is the code I am trying with, but the application is crashing again n again and my VI application is showing the array size ZERO.  
But since the return type which I am getting is 2, means the function is getting executed. 
During my search I came to know that the array in LV is like "First 32 Bytes for array length and other for data means n+4 bytes for n unsigned-8 bit data". 
So when I am de-commenting the comment, my VI program is executing well and my VI is showing the array size 10. (Is it the write way to allocate memory???? or is it a BUG??) 
NOW the main question where is the problem???  
1) IS NumericArraySize not allocating the required memory (if this is the case then why MgErr == noErr ??) 
2) Is there something else which I am missing????