R
roni
hi.
i have gc class that wraps call to unamanged function.
im confuse with the paramter allocation and gc when sending.
i wrote small sample ,to understand if i this is ok.
__gc class MyManagedClass{
public:
void Func1(){
UNAMANGEDDLL_DATA_ST dataSt ; //not pointer
m_pArr=new UNAMANGEDDLL_DATA_ST[15]; // point to array of structs
m_pDataSt = new UNAMANGEDDLL_DATA_ST; // point to struct
unamangedFunction(dataSt,m_pArr,m_pDataSt,m_nNumber ); // is there
problem to send this parameter to unmanaged function ? memory
problems ?
}
private:
UNAMANGEDDLL_DATA_ST * m_pDataSt ;
int m_nNumber ;
UNAMANGEDDLL_DATA_ST * m_pArr;
}
=================================================================
my question is:
all of the 4 parameters are __nogc ?
the gc deal with this paramters ? move them ? free them ?
is there somthing i need to do before sending this parameters to the
unmanaged function , or its safe ?
==================================================================
i have gc class that wraps call to unamanged function.
im confuse with the paramter allocation and gc when sending.
i wrote small sample ,to understand if i this is ok.
__gc class MyManagedClass{
public:
void Func1(){
UNAMANGEDDLL_DATA_ST dataSt ; //not pointer
m_pArr=new UNAMANGEDDLL_DATA_ST[15]; // point to array of structs
m_pDataSt = new UNAMANGEDDLL_DATA_ST; // point to struct
unamangedFunction(dataSt,m_pArr,m_pDataSt,m_nNumber ); // is there
problem to send this parameter to unmanaged function ? memory
problems ?
}
private:
UNAMANGEDDLL_DATA_ST * m_pDataSt ;
int m_nNumber ;
UNAMANGEDDLL_DATA_ST * m_pArr;
}
=================================================================
my question is:
all of the 4 parameters are __nogc ?
the gc deal with this paramters ? move them ? free them ?
is there somthing i need to do before sending this parameters to the
unmanaged function , or its safe ?
==================================================================