Hi everyone i've created a DLL in c++ and i'm using it in C# like:
[DllImport("IMDistortions.dll", CallingConvention = CallingConvention.Cdecl)]
public static unsafe extern void ProcessBarrelDistortion(byte* bytes, int stride, int width, int height, byte pixelSize, double a, double b, double c, double d);
Everything works fine but this function i'm calling in BackgroundWorker DoWork function and i'd like to stop function using code:
if(cancel)return;
In my c++ DLL where cancel is aa pointer to worker CancelationPending, but CancelationPending is a property so i can't get pointer to it like:
bool *cancel=&worker.CancelationPending;
And then send it as a argument in my function. Can anybody help me how to solve this problem? Also looking for Report Progress but not so much.