Question : How convert this c++ code to csharp


Hi,

I need to use c++ call back in csharp code. I am using third party API and have a callback in this API. I am using delegate in my code. I need to use this below callback by delegates. Is it possible? Also i need to convert the below code.This code is c++ function. I want to convert this code in csharp.

void GetCommStatusFunc(void(*showStatusFun)(CommStatusCode))


set up the callback for comm status reports.This callback is called when communication status via the Net.dll  changes. The form of the callback must be as follows:

void MyStatusCallback(CommStatusCode code)
where CommStatusCode is an enumerated list supplied in netdll.h

         GetCommStatusFunc(MyStatusCallback)
MyStatusCallback is called when the status of the connection changes.

The above example is in my API. I hope that understand what i am expecting.

Thanks

Answer : How convert this c++ code to csharp

Random Solutions  
 
programming4us programming4us