如何实现下面的C#代码?这是来自非托管C / C ++ DLL的回调函数。
extern void (*NdProcSamples)(word dc, word phase, word sum_st, const NdPackChan *chans);//This function is in Third party(C/C++ DLL).
typedef void (*TProcSamples)(word dc, word phase, word sum_st, const NdPackChan *chans); //Call back Fucntion
TProcSamples *pProcSamples;
pProcSamples = (TProcSamples*) GetProcAddress(drv_lib, "NdProcSamples") //Gets address of function
*pProcSamples = NdProcSamples;
// Function below gets called by driver(DLL)
void NdProcSamples(word dc, word phase, word sum_st, const NdPackChan *chans)
{
//logic goes here
}